Update README with API versioning documentation
This commit is contained in:
parent
7501c8ca77
commit
32ebfc511b
1 changed files with 11 additions and 0 deletions
|
@ -41,6 +41,17 @@ The OpenPhoto Python class hierarchy mirrors the [OpenPhoto API](http://theopenp
|
|||
* client.photos.list() -> /photos/list.json
|
||||
* photos[0].update() -> /photo/<id>/update.json
|
||||
|
||||
<a name="api_versioning"></a>
|
||||
### API Versioning
|
||||
|
||||
It may be useful to lock your application to a particular version of the OpenPhoto API.
|
||||
This ensures that future API updates won't cause unexpected breakages.
|
||||
|
||||
To do this, add the optional ```api_version``` parameter when creating the client object:
|
||||
|
||||
from openphoto import OpenPhoto
|
||||
client = OpenPhoto(host, consumerKey, consumerSecret, token, tokenSecret, api_version=2)
|
||||
|
||||
----------------------------------------
|
||||
|
||||
<a name="cli"></a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue