photo-documentation/docs/api/PostTagUpdate.markdown
2013-01-28 22:49:14 -05:00

2.2 KiB

Update Tag


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

Purpose of the update Tag API

Use this API to update a tag.


Endpoint

Authentication: required

POST /tag/:id/update.json

Parameters

  1. count (optional), Number of photos which contain this tag
  2. email (optional), An email address that corresponds to this tag
  3. latitude (optional), i.e. 34.76 - A decimal representation of latitude.
  4. longitude (optional), i.e. -87.45 - A decimal representation of longitude.

Examples

Command Line (using openphoto-php)

./openphoto -p -X POST -h current.openphoto.me -e /tag/sunnyvale/update.json -F 'count=10'

PHP (using openphoto-php)

$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$response = $client->post("/tag/sunnyvale/update.json", array('count' => 10));

Response

The response is in a standard response envelope.

  • message, A string describing the result. Don't use this for anything but reading.
  • code, 200 on success
  • result, A Tag object or FALSE on error

Sample

{
  "message":"",
  "code":200,
  "result":
  {
    "id": "mountain",
    "count": 1
  }
}