A PHP library for working with JSON API servers.
The following features are supported:
- loading resource collections
- loading individual resources by identifier
- creating resources
- saving resources
- to one relationships
- to many relationships
The ResourceStore is responsible for performing HTTP requests and caching
resources. The following APIs are provided:
peek()- look for a cached resource without hitting the backend serverquery()- look for a resource while always hitting the backend serverfind()- look for a resource using cache if available, hit the backend if the cached resource is not availablecreate()- make a new resouresave()- save a resourcedelete()- delete a resource
The Guzzle HTTP library is used to make requests.
Make sure the silverorange composer repository is added to the composer.json
for the project and then run:
composer require silverorange/json-api-client