From 31335d9cb6d6e7d35fa095a2e532f25428b03934 Mon Sep 17 00:00:00 2001 From: sneakypete81 Date: Tue, 14 May 2013 19:22:24 +0200 Subject: [PATCH] Added Python example to PostPhotoDelete --- docs/api/PostPhotoDelete.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/api/PostPhotoDelete.markdown b/docs/api/PostPhotoDelete.markdown index 7a839c3..c928981 100644 --- a/docs/api/PostPhotoDelete.markdown +++ b/docs/api/PostPhotoDelete.markdown @@ -10,6 +10,7 @@ Delete Photo 1. [Examples][examples] * [Command line][example-cli] * [PHP][example-php] + * [Python][example-python] 1. [Response][response] * [Sample][sample] @@ -50,6 +51,13 @@ _None_ $client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret); $response = $client->post("/photo/a/delete.json"); + +#### Python (using [openphoto-python][openphoto-python]) + + client = openphoto.OpenPhoto() + photo = client.photos.list()[0] # Returns the first photo in the list + photo.delete() + ---------------------------------------- @@ -77,6 +85,8 @@ 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 [openphoto-php]: https://github.com/photo/openphoto-php +[openphoto-python]: https://github.com/photo/openphoto-python