In the specification file I'll present how to manage the API, every client should follow those recommandations and have to to be integrated to the project (official/supported client).
The sample pseudo code proposed should work whatever the language.
Please give comments and don't hesitate to start discussion like :
Are all names ok ?
they have to be self explanatory, and if possible short and link to the API URL, or view name.
Accessors should be protected ?
- pro
access to token have to be limited.
Should they be named _token & _allgo_url if protected ?
- pro
self explaining name for developpers.
What should be the behaviour in case of error ?
I defined some errors for simple case, should we describe every failure behaviour ?