
* Add actor/owner (although I'm not sure exactly what these mean) * Add delete tag API * Mark create/delete API as "internal" * Create API returns TRUE, not the created tag * Removed update API examples
2.1 KiB
2.1 KiB
Create Tag
Purpose of the Create Tag API
This API is used internally to create a tag. External applications should use the Photo Update API to create tags.
Endpoint
Authentication: required
POST /tag/create.json
Parameters
- tag (required), The name of the tag to create
- count (optional), Number of photos which contain this tag
Examples
Command Line (using openphoto-php)
./openphoto -p -X POST -h current.openphoto.me -e /tag/create.json -F 'tag=sunnyvale' -F 'count=10'
PHP (using openphoto-php)
$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$response = $client->post("/tag/create.json", array('tag' => 'sunnyvale', '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, 201 on success
- result, TRUE if the tag was successfully created
Sample
{
"message":"",
"code":201,
"result":TRUE
}