https://github.com/robertmain/communique-interceptor-json
A JSON response formatter for Communique REST client
https://github.com/robertmain/communique-interceptor-json
communique json json-interceptor rest-api
Last synced: about 1 month ago
JSON representation
A JSON response formatter for Communique REST client
- Host: GitHub
- URL: https://github.com/robertmain/communique-interceptor-json
- Owner: robertmain
- License: gpl-2.0
- Created: 2015-09-13T20:45:06.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-05T21:36:54.000Z (over 10 years ago)
- Last Synced: 2025-01-07T13:47:05.717Z (over 1 year ago)
- Topics: communique, json, json-interceptor, rest-api
- Language: PHP
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#JSON Interceptor for Communique
Provides a JSON inteceptor for Communique REST client. You can find the documentation for Communique [here](http://robertmain.github.io/communique).
##Installation
The easiest way to install is using composer:
`composer install communique-interceptor-json`
###Typical Usage
In order to be loaded and considered valid, all inteceptors must implement the [\Communique\Interceptor](http://robertmain.github.io/communique/classes/Communique.Interceptor.html) Interface.
To use the JSON interceptor with Communique, you can do the following:
```php
get('users/1');
//The response will be a nested array, so we can do something like this:
echo $response->payload[0]['forename']; //Returns user 0's forename.
?>
```
##Licensing
Licensed under the GPL - please see the file called LICENSE for more info.
##Contacts
- If you want to submit a bug report or issue, please do so using the issue tracker on GitHub
##Documentation
The documentation can be found [here](http://robertmain.github.io/communique-interceptor-json)