Releases
v2.0.0
Version 2 is a complete rewrite of the PHP API Client with the following goals in mind:
Make the tests run faster. Which means mocking the API calls, reducing the number of tests and making them easier to write.
Make the code as DRY (Do not Repeat Yourself) as possible and improve maintainability.
Improve the way we handle chaining.
Better handling of routes.
Handle errors well.
Changed:
Only use plural resource name
Added a base class for resources
Added findMany method
Added createMany method
Added updateMany method, supports both ways of updating
Added deleteMany method
Change update so that it takes an ID as first param
Change delete so that it takes an ID
Change interface of find to just take ID, then params
Add property chained properties to store all previous chained calls
Removed setting of last ID on instantiation of Resource
Allowed pattern $client->tickets(id)->find() for consistency with chaining pattern
Make $id in delete and update optional to allow passing of the id via chaining pattern
Remove filtering of allowed query parameters on GET requests
Let Guzzle do the bulk of handling API response exceptions
Improvements:
Added pagination examples and upgrade guide to README
Better sample codes, improved existing ones and added samples for OAuth flows
OAuth now uses Guzzle to request for an access token
Build passes tests using PHP7-RC2
You can’t perform that action at this time.