Flickrex.Flickr.Photos (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Add tags to a photo.
Delete a photo from flickr.
Returns all visible sets and pools the photo belongs to.
Fetch a list of recent photos from the calling users' contacts.
Fetch a list of recent public photos from a users' contacts.
Returns next and previous photos for a photo in a photostream.
Gets a list of photo counts for the given date ranges for the calling user.
Retrieves a list of EXIF/TIFF/GPS tags for a given photo. The calling user must have permission to view the photo.
Returns the list of people who have favorited a given photo.
Get information about a photo. The calling user must have permission to view the photo.
Returns a list of your photos that are not part of any sets.
Get permissions for a photo.
Returns a list of popular photos
Returns a list of the latest public photos uploaded to flickr.
Returns the available sizes for a photo. The calling user must have permission to view the photo.
Returns a list of your photos with no tags.
Returns a list of your geo-tagged photos.
Returns a list of your photos which haven't been geo-tagged.
Return a list of your photos that have been recently created or which have been recently modified.
Remove a tag from a photo.
Return a list of photos matching some criteria. Only photos visible to the calling user will be returned. To return private or semi-private photos, the caller must be authenticated with 'read' permissions, and have permission to view the photos. Unauthenticated calls will only return public photos.
Set the content type of a photo.
Set one or both of the dates for a photo.
Set the meta information for a photo.
Set permissions for a photo.
Set the safety level of a photo.
Set the tags for a photo.
Link to this section Types
Specs
arg() :: String.Chars.t()
Specs
operation() :: Flickrex.Operation.Rest.t()
Specs
opts() :: Flickrex.Rest.args()
Link to this section Functions
Specs
Add tags to a photo.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to add tags to.tags- The tags to add to the photo.
Specs
Delete a photo from flickr.
This method requires authentication with "delete" permission.
Arguments
photo_id- The id of the photo to delete.
Specs
Returns all visible sets and pools the photo belongs to.
This method does not require authentication.
Arguments
photo_id- The photo to return information for.
Example response
%{
"pool" => %{"id" => "34427465471@N01", "title" => "FlickrDiscuss"},
"set" => %{"id" => "392", "title" => "记忆群组"},
"stat" => "ok"
} Specs
Fetch a list of recent photos from the calling users' contacts.
This method requires authentication with "read" permission.
Options
count- Number of photos to return. Defaults to 10, maximum 50. This is only used if <code>single_photo</code> is not passed.just_friends- set as 1 to only show photos from friends and family (excluding regular contacts).single_photo- Only fetch one photo (the latest) per contact, instead of all photos in chronological order.include_self- Set to 1 to include photos from the calling user.extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields include: license, date_upload, date_taken, owner_name, icon_server, original_format, last_update. For more information see extras under <a href="https://www.flickr.com/services/api/flickr.photos.search.html">flickr.photos.search</a>.
Example response
%{
"photos" => %{
"photo" => [
%{
"id" => "2801",
"owner" => "12037949629@N01",
"secret" => "123456",
"server" => "1",
"title" => "grease",
"username" => "Eric is the best"
},
%{
"id" => "2499",
"owner" => "33853651809@N01",
"secret" => "123456",
"server" => "1",
"title" => "36679_o",
"username" => "cal18"
},
%{
"id" => "2437",
"owner" => "12037951898@N01",
"secret" => "123456",
"server" => "1",
"title" => "phoenix9_stewart",
"username" => "georgie parker"
}
]
},
"stat" => "ok"
} Specs
Fetch a list of recent public photos from a users' contacts.
This method does not require authentication.
Arguments
user_id- The NSID of the user to fetch photos for.
Options
count- Number of photos to return. Defaults to 10, maximum 50. This is only used if <code>single_photo</code> is not passed.just_friends- set as 1 to only show photos from friends and family (excluding regular contacts).single_photo- Only fetch one photo (the latest) per contact, instead of all photos in chronological order.include_self- Set to 1 to include photos from the user specified by user_id.extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: license, date_upload, date_taken, owner_name, icon_server, original_format, last_update.
Example response
%{
"photos" => %{
"photo" => [
%{
"id" => "2801",
"owner" => "12037949629@N01",
"secret" => "123456",
"server" => "1",
"title" => "grease",
"username" => "Eric is the best"
},
%{
"id" => "2499",
"owner" => "33853651809@N01",
"secret" => "123456",
"server" => "1",
"title" => "36679_o",
"username" => "cal18"
},
%{
"id" => "2437",
"owner" => "12037951898@N01",
"secret" => "123456",
"server" => "1",
"title" => "phoenix9_stewart",
"username" => "georgie parker"
}
]
},
"stat" => "ok"
} Specs
Returns next and previous photos for a photo in a photostream.
This method does not require authentication.
Arguments
photo_id- The id of the photo to fetch the context for.
Example response
%{
"nextphoto" => %{
"id" => "2985",
"secret" => "059b664012",
"title" => "Amsterdam Amstel",
"url" => "/photos/bees/2985/"
},
"prevphoto" => %{
"id" => "2980",
"secret" => "973da1e709",
"title" => "boo!",
"url" => "/photos/bees/2980/"
},
"stat" => "ok"
} Specs
Gets a list of photo counts for the given date ranges for the calling user.
This method requires authentication with "read" permission.
Options
dates- A comma delimited list of unix timestamps, denoting the periods to return counts for. They should be specified <b>smallest first</b>.taken_dates- A comma delimited list of mysql datetimes, denoting the periods to return counts for. They should be specified <b>smallest first</b>.
Example response
%{
"photocounts" => %{
"photocount" => [
%{"count" => "4", "fromdate" => "1093566950", "todate" => "1093653350"},
%{"count" => "0", "fromdate" => "1093653350", "todate" => "1093739750"},
%{"count" => "0", "fromdate" => "1093739750", "todate" => "1093826150"},
%{"count" => "2", "fromdate" => "1093826150", "todate" => "1093912550"},
%{"count" => "0", "fromdate" => "1093912550", "todate" => "1093998950"},
%{"count" => "0", "fromdate" => "1093998950", "todate" => "1094085350"},
%{"count" => "0", "fromdate" => "1094085350", "todate" => "1094171750"}
]
},
"stat" => "ok"
} Specs
Retrieves a list of EXIF/TIFF/GPS tags for a given photo. The calling user must have permission to view the photo.
This method does not require authentication.
Arguments
photo_id- The id of the photo to fetch information for.
Options
secret- The secret for the photo. If the correct secret is passed then permissions checking is skipped. This enables the 'sharing' of individual photos by passing around the id and secret.
Example response
%{
"photo" => %{
"exif" => [
%{
"label" => "Manufacturer",
"raw" => %{"_content" => "Canon"},
"tag" => "271",
"tagspace" => "TIFF",
"tagspaceid" => "1"
},
%{
"clean" => %{"_content" => "f/9"},
"label" => "Aperture",
"raw" => %{"_content" => "90/10"},
"tag" => "33437",
"tagspace" => "EXIF",
"tagspaceid" => "0"
},
%{
"clean" => %{"_content" => "64° 42' 44.14\""},
"label" => "Longitude",
"raw" => %{"_content" => "64/1, 42/1, 4414/100"},
"tag" => "4",
"tagspace" => "GPS",
"tagspaceid" => "3"
}
],
"id" => "4424",
"secret" => "06b8e43bc7",
"server" => "2"
},
"stat" => "ok"
} Specs
Returns the list of people who have favorited a given photo.
This method does not require authentication.
Arguments
photo_id- The ID of the photo to fetch the favoriters list for.
Options
page- The page of results to return. If this argument is omitted, it defaults to 1.per_page- Number of usres to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 50.
Example response
%{
"photo" => %{
"farm" => "1",
"id" => "1253576",
"page" => "1",
"pages" => "3",
"perpage" => "10",
"person" => [
%{
"favedate" => "1166689690",
"nsid" => "33939862@N00",
"username" => "Dementation"
},
%{
"favedate" => "1166573724",
"nsid" => "49485425@N00",
"username" => "indigenous_prodigy"
},
%{
"favedate" => "1161874052",
"nsid" => "46834205@N00",
"username" => "smaaz"
},
%{
"favedate" => "1160528154",
"nsid" => "95626108@N00",
"username" => "chrome Foxpuppy"
},
%{
"favedate" => "1159828789",
"nsid" => "44991966@N00",
"username" => "getnoid"
},
%{
"favedate" => "1158034266",
"nsid" => "92544710@N00",
"username" => "miss_rogue"
},
%{
"favedate" => "1155317436",
"nsid" => "50944224@N00",
"username" => "Infollatus"
},
%{
"favedate" => "1148511763",
"nsid" => "80544408@N00",
"username" => "DafyddLlyr"
},
%{
"favedate" => "1143085224",
"nsid" => "31154299@N00",
"username" => "c r i s"
},
%{
"favedate" => "1142584219",
"nsid" => "54309070@N00",
"username" => "Shinayaker"
}
],
"secret" => "81b96be690",
"server" => "1",
"total" => "27"
},
"stat" => "ok"
} Specs
Get information about a photo. The calling user must have permission to view the photo.
This method does not require authentication.
Arguments
photo_id- The id of the photo to get information for.
Options
secret- The secret for the photo. If the correct secret is passed then permissions checking is skipped. This enables the 'sharing' of individual photos by passing around the id and secret.
Example response
%{
"photo" => %{
"comments" => %{"_content" => "1"},
"dates" => %{
"lastupdate" => "1093022469",
"posted" => "1100897479",
"taken" => "2004-11-19 12:51:19",
"takengranularity" => "0"
},
"description" => %{"_content" => "hello!"},
"editability" => %{"canaddmeta" => "1", "cancomment" => "1"},
"id" => "2733",
"isfavorite" => "0",
"license" => "3",
"notes" => %{
"note" => %{
"_content" => "foo",
"author" => "12037949754@N01",
"authorname" => "Bees",
"h" => "50",
"id" => "313",
"w" => "50",
"x" => "10",
"y" => "10"
}
},
"originalformat" => "png",
"originalsecret" => "1bc09ce34a",
"owner" => %{
"location" => "Bedford, UK",
"nsid" => "12037949754@N01",
"realname" => "Cal Henderson",
"username" => "Bees"
},
"permissions" => %{"permaddmeta" => "2", "permcomment" => "3"},
"rotation" => "90",
"secret" => "123456",
"server" => "12",
"tags" => %{
"tag" => [
%{
"_content" => "wooyay",
"author" => "12037949754@N01",
"id" => "1234",
"raw" => "woo yay"
},
%{
"_content" => "hoopla",
"author" => "12037949754@N01",
"id" => "1235",
"raw" => "hoopla"
}
]
},
"title" => %{"_content" => "orford_castle_taster"},
"urls" => %{
"url" => %{
"_content" => "http://www.flickr.com/photos/bees/2733/",
"type" => "photopage"
}
},
"visibility" => %{"isfamily" => "0", "isfriend" => "0", "ispublic" => "1"}
},
"stat" => "ok"
} Specs
Returns a list of your photos that are not part of any sets.
This method requires authentication with "read" permission.
Options
max_upload_date- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.min_taken_date- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.max_taken_date- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.privacy_filter- Return photos only matching a certain privacy level. Valid values are: <ul> <li>1 public photos</li> <li>2 private photos visible to friends</li> <li>3 private photos visible to family</li> <li>4 private photos visible to friends & family</li> <li>5 completely private photos</li> </ul>media- Filter results by media type. Possible values are <code>all</code> (default), <code>photos</code> or <code>videos</code>min_upload_date- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Specs
Get permissions for a photo.
This method requires authentication with "read" permission.
Arguments
photo_id- The id of the photo to get permissions for.
Example response
%{
"perms" => %{
"id" => "2733",
"isfamily" => "0",
"isfriend" => "1",
"ispublic" => "1",
"permaddmeta" => "1",
"permcomment" => "0"
},
"stat" => "ok"
} Specs
Returns a list of popular photos
This method does not require authentication.
Options
user_id- The NSID of the user to get a galleries list for. If none is specified, the calling user is assumed.sort- The sort order. One of <code>faves</code>, <code>views</code>, <code>comments</code> or <code>interesting</code>. Defaults to <code>interesting</code>.extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Specs
Returns a list of the latest public photos uploaded to flickr.
This method does not require authentication.
Options
extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Specs
Returns the available sizes for a photo. The calling user must have permission to view the photo.
This method does not require authentication.
Arguments
photo_id- The id of the photo to fetch size information for.
Example response
%{
"sizes" => %{
"canblog" => "1",
"candownload" => "1",
"canprint" => "1",
"size" => [
%{
"height" => "75",
"label" => "Square",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_s.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/sq/",
"width" => "75"
},
%{
"height" => "150",
"label" => "Large Square",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_q.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/q/",
"width" => "150"
},
%{
"height" => "75",
"label" => "Thumbnail",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_t.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/t/",
"width" => "100"
},
%{
"height" => "180",
"label" => "Small",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_m.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/s/",
"width" => "240"
},
%{
"height" => "240",
"label" => "Small 320",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_n.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/n/",
"width" => "320"
},
%{
"height" => "375",
"label" => "Medium",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/m/",
"width" => "500"
},
%{
"height" => "480",
"label" => "Medium 640",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_z.jpg?zz=1",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/z/",
"width" => "640"
},
%{
"height" => "600",
"label" => "Medium 800",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_c.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/c/",
"width" => "800"
},
%{
"height" => "768",
"label" => "Large",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_2cf8456f01_b.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/l/",
"width" => "1024"
},
%{
"height" => "1800",
"label" => "Original",
"media" => "photo",
"source" => "http://farm2.staticflickr.com/1103/567229075_6dc09dc6da_o.jpg",
"url" => "http://www.flickr.com/photos/stewart/567229075/sizes/o/",
"width" => "2400"
}
]
},
"stat" => "ok"
} Specs
Returns a list of your photos with no tags.
This method requires authentication with "read" permission.
Options
min_upload_date- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.max_upload_date- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.min_taken_date- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date should be in the form of a mysql datetime or unix timestamp.max_taken_date- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.privacy_filter- Return photos only matching a certain privacy level. Valid values are: <ul> <li>1 public photos</li> <li>2 private photos visible to friends</li> <li>3 private photos visible to family</li> <li>4 private photos visible to friends & family</li> <li>5 completely private photos</li> </ul>media- Filter results by media type. Possible values are <code>all</code> (default), <code>photos</code> or <code>videos</code>extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Specs
Returns a list of your geo-tagged photos.
This method requires authentication with "read" permission.
Options
min_upload_date- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date should be in the form of a unix timestamp.max_upload_date- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date should be in the form of a unix timestamp.min_taken_date- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date should be in the form of a mysql datetime.max_taken_date- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date should be in the form of a mysql datetime.privacy_filter- Return photos only matching a certain privacy level. Valid values are: <ul> <li>1 public photos</li> <li>2 private photos visible to friends</li> <li>3 private photos visible to family</li> <li>4 private photos visible to friends & family</li> <li>5 completely private photos</li> </ul>sort- The order in which to sort returned photos. Defaults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.media- Filter results by media type. Possible values are <code>all</code> (default), <code>photos</code> or <code>videos</code>extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Specs
Returns a list of your photos which haven't been geo-tagged.
This method requires authentication with "read" permission.
Options
max_upload_date- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date should be in the form of a unix timestamp.min_taken_date- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.max_taken_date- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.privacy_filter- Return photos only matching a certain privacy level. Valid values are: <ul> <li>1 public photos</li> <li>2 private photos visible to friends</li> <li>3 private photos visible to family</li> <li>4 private photos visible to friends & family</li> <li>5 completely private photos</li> </ul>sort- The order in which to sort returned photos. Defaults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.media- Filter results by media type. Possible values are <code>all</code> (default), <code>photos</code> or <code>videos</code>min_upload_date- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Specs
Return a list of your photos that have been recently created or which have been recently modified.
Recently modified may mean that the photo's metadata (title, description, tags) may have been changed or a comment has been added (or just modified somehow :-)
This method requires authentication with "read" permission.
Arguments
min_date- A Unix timestamp or any English textual datetime description indicating the date from which modifications should be compared.
Options
extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Example response
%{
"photos" => %{
"page" => "1",
"pages" => "1",
"perpage" => "100",
"photo" => [
%{
"id" => "169885459",
"isfamily" => "0",
"isfriend" => "0",
"ispublic" => "1",
"lastupdate" => "1150755888",
"owner" => "35034348999@N01",
"secret" => "c85114c195",
"server" => "46",
"title" => "Doubting Michael"
},
%{
"id" => "85022332",
"isfamily" => "0",
"isfriend" => "0",
"ispublic" => "1",
"lastupdate" => "1150564974",
"owner" => "35034348999@N01",
"secret" => "23de6de0c0",
"server" => "41",
"title" => ""Do you think we're allowed to tape stuff to the walls?""
}
],
"total" => "2"
},
"stat" => "ok"
} Specs
Remove a tag from a photo.
This method requires authentication with "write" permission.
Arguments
tag_id- The tag to remove from the photo. This parameter should contain a tag id, as returned by <a href="https://www.flickr.com/services/api/flickr.photos.getInfo.html">flickr.photos.getInfo</a>.
Specs
Return a list of photos matching some criteria. Only photos visible to the calling user will be returned. To return private or semi-private photos, the caller must be authenticated with 'read' permissions, and have permission to view the photos. Unauthenticated calls will only return public photos.
This method does not require authentication.
Options
user_id- The NSID of the user who's photo to search. If this parameter isn't passed then everybody's public photos will be searched. A value of "me" will search against the calling user's photos for authenticated calls.tags- A comma-delimited list of tags. Photos with one or more of the tags listed will be returned. You can exclude results that match a term by prepending it with a - character.tag_mode- Either 'any' for an OR combination of tags, or 'all' for an AND combination. Defaults to 'any' if not specified.text- A free text search. Photos who's title, description or tags contain the text will be returned. You can exclude results that match a term by prepending it with a - character.min_upload_date- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.max_upload_date- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime.min_taken_date- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.max_taken_date- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp.license- The license id for photos (for possible values see the flickr.photos.licenses.getInfo method). Multiple licenses may be comma-separated.sort- The order in which to sort returned photos. Defaults to date-posted-desc (unless you are doing a radial geo query, in which case the default sorting is by ascending distance from the point specified). The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, and relevance.privacy_filter- Return photos only matching a certain privacy level. This only applies when making an authenticated call to view photos you own. Valid values are: <ul> <li>1 public photos</li> <li>2 private photos visible to friends</li> <li>3 private photos visible to family</li> <li>4 private photos visible to friends & family</li> <li>5 completely private photos</li> </ul>bbox- A comma-delimited list of 4 values defining the Bounding Box of the area that will be searched. <br /><br /> The 4 values represent the bottom-left corner of the box and the top-right corner, minimum_longitude, minimum_latitude, maximum_longitude, maximum_latitude. <br /><br /> Longitude has a range of -180 to 180 , latitude of -90 to 90. Defaults to -180, -90, 180, 90 if not specified. <br /><br /> Unlike standard photo queries, geo (or bounding box) queries will only return 250 results per page. <br /><br /> Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. <br /><br /> A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).accuracy- Recorded accuracy level of the location information. Current range is 1-16 : <ul> <li>World level is 1</li> <li>Country is ~3</li> <li>Region is ~6</li> <li>City is ~11</li> <li>Street is ~16</li> </ul> Defaults to maximum value if not specified.safe_search- Safe search setting: <ul> <li>1 for safe.</li> <li>2 for moderate.</li> <li>3 for restricted.</li> </ul> (Please note: Un-authed calls can only see Safe content.)content_type- Content Type setting: <ul> <li>1 for photos only.</li> <li>2 for screenshots only.</li> <li>3 for 'other' only.</li> <li>4 for photos and screenshots.</li> <li>5 for screenshots and 'other'.</li> <li>6 for photos and 'other'.</li> <li>7 for photos, screenshots, and 'other' (all).</li> </ul>machine_tags- Aside from passing in a fully formed machine tag, there is a special syntax for searching on specific properties : <ul> <li>Find photos using the 'dc' namespace : <code>"machine_tags" => "dc:"</code></li> <li> Find photos with a title in the 'dc' namespace : <code>"machine_tags" => "dc:title="</code></li> <li>Find photos titled "mr. camera" in the 'dc' namespace : <code>"machine_tags" => "dc:title=\"mr. camera\"</code></li> <li>Find photos whose value is "mr. camera" : <code>"machine_tags" => ":=\"mr. camera\""</code></li> <li>Find photos that have a title, in any namespace : <code>"machine_tags" => ":title="</code></li> <li>Find photos that have a title, in any namespace, whose value is "mr. camera" : <code>"machine_tags" => ":title=\"mr. camera\""</code></li> <li>Find photos, in the 'dc' namespace whose value is "mr. camera" : <code>"machine_tags" => "dc:*=\"mr. camera\""</code></li> </ul> Multiple machine tags may be queried by passing a comma-separated list. The number of machine tags you can pass in a single query depends on the tag mode (AND or OR) that you are querying with. "AND" queries are limited to (16) machine tags. "OR" queries are limited to (8).machine_tag_mode- Either 'any' for an OR combination of tags, or 'all' for an AND combination. Defaults to 'any' if not specified.group_id- The id of a group who's pool to search. If specified, only matching photos posted to the group's pool will be returned.contacts- Search your contacts. Either 'all' or 'ff' for just friends and family. (Experimental)woe_id- A 32-bit identifier that uniquely represents spatial entities. (not used if bbox argument is present). <br /><br /> Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. <br /><br /> A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).place_id- A Flickr place id. (not used if bbox argument is present). <br /><br /> Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. <br /><br /> A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).media- Filter results by media type. Possible values are <code>all</code> (default), <code>photos</code> or <code>videos</code>has_geo- Any photo that has been geotagged, or if the value is "0" any photo that has <i>not</i> been geotagged. <br /><br /> Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. <br /><br /> A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).geo_context- Geo context is a numeric value representing the photo's geotagginess beyond latitude and longitude. For example, you may wish to search for photos that were taken "indoors" or "outdoors". <br /><br /> The current list of context IDs is :<br /><br/> <ul> <li><strong>0</strong>, not defined.</li> <li><strong>1</strong>, indoors.</li> <li><strong>2</strong>, outdoors.</li> </ul> <br /><br /> Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. <br /><br /> A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).lat- A valid latitude, in decimal format, for doing radial geo queries. <br /><br /> Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. <br /><br /> A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).lon- A valid longitude, in decimal format, for doing radial geo queries. <br /><br /> Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. <br /><br /> A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).radius- A valid radius used for geo queries, greater than zero and less than 20 miles (or 32 kilometers), for use with point-based geo queries. The default value is 5 (km).radius_units- The unit of measure when doing radial geo queries. Valid options are "mi" (miles) and "km" (kilometers). The default is "km".is_commons- Limit the scope of the search to only photos that are part of the <a href="http://flickr.com/commons">Flickr Commons project</a>. Default is false.in_gallery- Limit the scope of the search to only photos that are in a <a href="http://www.flickr.com/help/galleries/">gallery</a>? Default is false, search all photos.is_getty- Limit the scope of the search to only photos that are for sale on Getty. Default is false.extras- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: <code>description</code>, <code>license</code>, <code>date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <code>icon_server</code>, <code>original_format</code>, <code>last_update</code>, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>, <code>o_dims</code>, <code>views</code>, <code>media</code>, <code>path_alias</code>, <code>url_sq</code>, <code>url_t</code>, <code>url_s</code>, <code>url_q</code>, <code>url_m</code>, <code>url_n</code>, <code>url_z</code>, <code>url_c</code>, <code>url_l</code>, <code>url_o</code>per_page- Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is omitted, it defaults to 1.
Specs
Set the content type of a photo.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to set the content type of.content_type- The content type of the photo. Must be one of: 1 for Photo, 2 for Screenshot, and 3 for Other.
Example response
%{"photo" => %{"content_type" => "3", "id" => "14814"}, "stat" => "ok"} Specs
Set one or both of the dates for a photo.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to edit dates for.
Options
date_posted- The date the photo was uploaded to flickr (see the <a href="https://www.flickr.com/services/api/misc.dates.html">dates documentation</a>)date_taken- The date the photo was taken (see the <a href="https://www.flickr.com/services/api/misc.dates.html">dates documentation</a>)date_taken_granularity- The granularity of the date the photo was taken (see the <a href="https://www.flickr.com/services/api/misc.dates.html">dates documentation</a>)
Specs
Set the meta information for a photo.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to set information for.
Options
title- The title for the photo. At least one of title or description must be set.description- The description for the photo. At least one of title or description must be set.
Specs
Set permissions for a photo.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to set permissions for.is_public- 1 to set the photo to public, 0 to set it to private.is_friend- 1 to make the photo visible to friends when private, 0 to not.is_family- 1 to make the photo visible to family when private, 0 to not.
Options
perm_comment- who can add comments to the photo and it's notes. one of:<br /> <code>0</code>: nobody<br /> <code>1</code>: friends & family<br /> <code>2</code>: contacts<br /> <code>3</code>: everybodyperm_addmeta- who can add notes and tags to the photo. one of:<br /> <code>0</code>: nobody / just the owner<br /> <code>1</code>: friends & family<br /> <code>2</code>: contacts<br /> <code>3</code>: everybody
Example response
%{
"photoid" => %{
"_content" => "1234",
"originalsecret" => "abcdef",
"secret" => "abcdef"
},
"stat" => "ok"
} Specs
Set the safety level of a photo.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to set the adultness of.
Options
safety_level- The safety level of the photo. Must be one of: 1 for Safe, 2 for Moderate, and 3 for Restricted.hidden- Whether or not to additionally hide the photo from public searches. Must be either 1 for Yes or 0 for No.
Example response
%{
"photo" => %{"hidden" => "0", "id" => "14814", "safety_level" => "2"},
"stat" => "ok"
} Specs
Set the tags for a photo.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to set tags for.tags- All tags for the photo (as a single space-delimited string).