Repository navigation
Version 2 Beta
Pre-release
Pre-release
Version 2 beta 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:
- 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->ticket(id)->find()for consistency with chaining pattern - Make $id in delete and update optional to allow passing of the id via chaining pattern
Forums
- remove CRUD methods - (most methods)
- no unique case so test is empty
Tickets
- markAsSpam() now only accepts an int value for an ID or an array of ID's
- Can no longer do $client->tickets(["organization_id" -> 1231])->findAll(), etc. (also user_id)
Topics
- removed Topics::create() - was implementing lastId
- remove Topics::findAll() - can no longer do $client->users(123)->topics()->findAll()
UserFields
- Remove CRUD methods
Users
- Remove tickets(), identities(), and other relational methods