diff --git a/docs/api/GetPhotoNextPrevious.markdown b/docs/api/GetPhotoNextPrevious.markdown index d5e9207..d8a0fad 100644 --- a/docs/api/GetPhotoNextPrevious.markdown +++ b/docs/api/GetPhotoNextPrevious.markdown @@ -10,6 +10,7 @@ Get Next/Previous Photo 1. [Examples][examples] * [Command line][example-cli] * [PHP][example-php] + * [Python][example-python] 1. [Response][response] * [Sample][sample] @@ -53,6 +54,15 @@ _Authentication: optional_ $client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret); $response = $client->get("/photo/b/nextprevious.json"); + +#### Python (using [openphoto-python][openphoto-python]) + + client = openphoto.OpenPhoto() + photo = client.photos.list()[1] # Returns the second photo in the list + print photo.next_previous() + + {'previous': [], 'next': []} + ---------------------------------------- @@ -152,8 +162,10 @@ The response is in a standard [response envelope](http://theopenphotoproject.org [examples]: #examples [example-cli]: #example-cli [example-php]: #example-php +[example-python]: #example-python [response]: #response [sample]: #sample [photogeneration]: http://theopenphotoproject.org/documentation/faq/PhotoGeneration [ReturnSizes]: http://theopenphotoproject.org/documentation/faq/ReturnSizes [openphoto-php]: https://github.com/photo/openphoto-php +[openphoto-python]: https://github.com/photo/openphoto-python