Added Python example

This commit is contained in:
sneakypete81 2013-05-14 19:13:43 +02:00
parent f470635b14
commit 43771afa83

View file

@ -10,6 +10,7 @@ Get Tags
1. [Examples][examples] 1. [Examples][examples]
* [Command line][example-cli] * [Command line][example-cli]
* [PHP][example-php] * [PHP][example-php]
* [Python][example-python]
1. [Response][response] 1. [Response][response]
* [Sample][sample] * [Sample][sample]
@ -50,6 +51,14 @@ _None_
$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret); $client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$response = $client->get("/tags/list.json"); $response = $client->get("/tags/list.json");
<a name="example-python"></a>
#### Python (using [openphoto-python][openphoto-python])
client = openphoto.OpenPhoto()
client.tags.list()
[<openphoto.objects.Tag id='australia'>, <openphoto.objects.Tag id='Boracay Philippines'>, ...]
---------------------------------------- ----------------------------------------
<a name="response"></a> <a name="response"></a>
@ -102,6 +111,8 @@ The response is in a standard [response envelope](http://theopenphotoproject.org
[examples]: #examples [examples]: #examples
[example-cli]: #example-cli [example-cli]: #example-cli
[example-php]: #example-php [example-php]: #example-php
[example-python]: #example-python
[response]: #response [response]: #response
[sample]: #sample [sample]: #sample
[openphoto-php]: https://github.com/photo/openphoto-php [openphoto-php]: https://github.com/photo/openphoto-php
[openphoto-python]: https://github.com/photo/openphoto-python