photo-documentation/docs/api/PostPhotoDelete.markdown
2013-05-14 19:22:24 +02:00

2.1 KiB

Delete Photo


  1. Purpose
  2. Endpoint
  3. Parameters
  4. Examples
  1. Response

Purpose of the delete action API

Use this API to delete an action.


Endpoint

Authentication: required

POST /photo/:id/delete.json

Parameters

None


Examples

Command Line (using openphoto-php)

./openphoto -p -X POST -h current.openphoto.me -e /photo/a/delete.json

PHP (using openphoto-php)

$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$response = $client->post("/photo/a/delete.json");

Python (using openphoto-python)

client = openphoto.OpenPhoto()
photo = client.photos.list()[0] # Returns the first photo in the list
photo.delete()

Response

The response is in a standard response envelope.

  • message, A string describing the result. Don't use this for anything but reading.
  • code, 204 on success
  • result, Boolean

Sample

{
  "message":"",
  "code":204,
  "result":true
}