https://github.com/phramework/jsonapi-client
JSONAPI client, helps creating SDK to consume your JSON API services
https://github.com/phramework/jsonapi-client
jsonapi
Last synced: 2 months ago
JSON representation
JSONAPI client, helps creating SDK to consume your JSON API services
- Host: GitHub
- URL: https://github.com/phramework/jsonapi-client
- Owner: phramework
- License: apache-2.0
- Created: 2016-03-29T18:49:34.000Z (almost 10 years ago)
- Default Branch: 2.x
- Last Pushed: 2023-04-19T19:33:10.000Z (almost 3 years ago)
- Last Synced: 2025-08-30T22:37:47.173Z (7 months ago)
- Topics: jsonapi
- Language: PHP
- Homepage:
- Size: 247 KB
- Stars: 2
- Watchers: 4
- Forks: 3
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonapi-client
JSONAPI client, helps creating SDK to consume your JSON RESTful APIs
[](https://travis-ci.org/phramework/jsonapi-client)
[](https://coveralls.io/github/phramework/jsonapi-client?branch=2.x)
## Usage
Require package using composer
```bash
composer require phramework/jsonapi-client
```
### GET a collection
```php
setUrl('http://localhost:8005/article/');
/**
* Get a collection of all `article`s, including their author
*/
$response = $endpoint->get(
new IncludeRelationship('author')
);
/*
* Display article collection
*/
print_r($articles = $response->getData());
```
## License
Copyright 2016-2019 Xenofon Spafaridis
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
```
http://www.apache.org/licenses/LICENSE-2.0
```
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.