2017 © Pedro Peláez
 

library wordpress-api-response-parser

Allows to map responses provided by any Wordpress API.

image

astronati/wordpress-api-response-parser

Allows to map responses provided by any Wordpress API.

  • Thursday, May 24, 2018
  • by Andrea Stronati
  • Repository
  • 1 Watchers
  • 0 Stars
  • 100 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 12 Versions
  • 104 % Grown

The README.md

Build Status Codacy Badge Codacy Badge Latest Stable Version License, (*1)

Wordpress API Response Parser

Allows to map responses provided by Wordpress API., (*2)

Supported Responses

Not all responses are currently supported but we are happy to work for you if you need some of them., (*3)

NOTE: To add another response into the supported list, please file a new issue., (*4)

To do that please file a new issue., (*5)

Installation

You can install the library and its dependencies using composer running:, (*6)

$ composer require astronati/wordpress-api-response-parser

Usage

The library allows to return a model per each response and its content (post, tag, category, etc...)., (*7)

Example

The following snippet can be helpful:, (*8)

use WARP\Response\ResponseParser;
...
// Obtain a Response
$apiResponse = ['id' => 123, ...] // Save the response from a Wordpress API
$response = ResponseParser::create($apiResponse, ResponseParser::CREATE_POST);
...
// Get post
$post = $response->getPost();
echo $post->getID(); // 123

For more details please take a look at Response., (*9)

Development

The environment requires phpunit, that has been already included in the dev-dependencies of the composer.json., (*10)

Dependencies

To install all modules you just need to run following command:, (*11)

$ composer install

Testing

Tests files are created in dedicates folders that replicate the src structure as follows:, (*12)

.
+-- src
|   +-- [folder-name]
|   |   +-- [file-name].php
|   ...
+-- tests
|   +-- [folder-name]
|   |   +-- [file-name]Test.php

Execute following command to run the tests suite:, (*13)

$ composer test

Run what follows to see the code coverage:, (*14)

$ composer coverage

License

This package is released under the MIT license., (*15)

The Versions

24/05 2018

dev-master

9999999-dev

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

24/05 2018

1.4.0

1.4.0.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

24/05 2018

dev-issues/20

dev-issues/20

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

23/05 2018

1.3.3

1.3.3.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

23/05 2018

dev-17/follow-up

dev-17/follow-up

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

23/05 2018

1.3.2

1.3.2.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

23/05 2018

dev-issues/17

dev-issues/17

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

09/05 2018

1.3.1

1.3.1.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

09/05 2018

1.3.0

1.3.0.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

08/05 2018

1.2.0

1.2.0.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

07/05 2018

1.1.0

1.1.0.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati

07/05 2018

1.0.0

1.0.0.0

Allows to map responses provided by any Wordpress API.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

by Avatar Andrea Stronati