flickrex v0.3.0 Flickr.Photos
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
Types
Functions
Add tags to a photo.
This method requires authentication with “write” permission.
Arguments
photo_id
- (required) The id of the photo to add tags to.tags
- (required) The tags to add to the photo.
Delete a photo from flickr.
This method requires authentication with “delete” permission.
Arguments
photo_id
- (required) The id of the photo to delete.
Returns all visible sets and pools the photo belongs to.
This method does not require authentication.
Arguments
photo_id
- (required) The photo to return information for.
Fetch a list of recent photos from the calling users’ contacts.
This method requires authentication with “read” permission.
Arguments
count
- Number of photos to return. Defaults to 10, maximum 50. This is only used ifsingle_photo
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 flickr.photos.search.
Fetch a list of recent public photos from a users’ contacts.
This method does not require authentication.
Arguments
user_id
- (required) The NSID of the user to fetch photos for.count
- Number of photos to return. Defaults to 10, maximum 50. This is only used ifsingle_photo
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.
Returns next and previous photos for a photo in a photostream.
This method does not require authentication.
Arguments
photo_id
- (required) The id of the photo to fetch the context for.
Gets a list of photo counts for the given date ranges for the calling user.
This method requires authentication with “read” permission.
Arguments
dates
- A comma delimited list of unix timestamps, denoting the periods to return counts for. They should be specified smallest first.taken_dates
- A comma delimited list of mysql datetimes, denoting the periods to return counts for. They should be specified smallest first.
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
- (required) The id of the photo to fetch information for.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.
Returns the list of people who have favorited a given photo.
This method does not require authentication.
Arguments
photo_id
- (required) The ID of the photo to fetch the favoriters list for.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.
Get information about a photo. The calling user must have permission to view the photo.
This method does not require authentication.
Arguments
photo_id
- (required) The id of the photo to get information for.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.
Returns a list of your photos that are not part of any sets.
This method requires authentication with “read” permission.
Arguments
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:- 1 public photos
- 2 private photos visible to friends
- 3 private photos visible to family
- 4 private photos visible to friends & family
- 5 completely private photos
media
- Filter results by media type. Possible values areall
(default),photos
orvideos
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:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
Get permissions for a photo.
This method requires authentication with “read” permission.
Arguments
photo_id
- (required) The id of the photo to get permissions for.
Returns a list of popular photos
This method does not require authentication.
Arguments
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 offaves
,views
,comments
orinteresting
. Deafults tointeresting
.extras
- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
Returns a list of the latest public photos uploaded to flickr.
This method does not require authentication.
Arguments
extras
- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
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
- (required) The id of the photo to fetch size information for.
Returns a list of your photos with no tags.
This method requires authentication with “read” permission.
Arguments
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:- 1 public photos
- 2 private photos visible to friends
- 3 private photos visible to family
- 4 private photos visible to friends & family
- 5 completely private photos
media
- Filter results by media type. Possible values areall
(default),photos
orvideos
extras
- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
Returns a list of your geo-tagged photos.
This method requires authentication with “read” permission.
Arguments
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:- 1 public photos
- 2 private photos visible to friends
- 3 private photos visible to family
- 4 private photos visible to friends & family
- 5 completely private photos
sort
- The order in which to sort returned photos. Deafults 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 areall
(default),photos
orvideos
extras
- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
Returns a list of your photos which haven’t been geo-tagged.
This method requires authentication with “read” permission.
Arguments
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:- 1 public photos
- 2 private photos visible to friends
- 3 private photos visible to family
- 4 private photos visible to friends & family
- 5 completely private photos
sort
- The order in which to sort returned photos. Deafults 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 areall
(default),photos
orvideos
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:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
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
- (required) A Unix timestamp or any English textual datetime description indicating the date from which modifications should be compared.extras
- A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
Remove a tag from a photo.
This method requires authentication with “write” permission.
Arguments
tag_id
- (required) The tag to remove from the photo. This parameter should contain a tag id, as returned by flickr.photos.getInfo.
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.
Arguments
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. Deafults 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:- 1 public photos
- 2 private photos visible to friends
- 3 private photos visible to family
- 4 private photos visible to friends & family
- 5 completely private photos
bbox
- A comma-delimited list of 4 values defining the Bounding Box of the area that will be searched.
The 4 values represent the bottom-left corner of the box and the top-right corner, minimum_longitude, minimum_latitude, maximum_longitude, maximum_latitude.
Longitude has a range of -180 to 180 , latitude of -90 to 90. Defaults to -180, -90, 180, 90 if not specified.
Unlike standard photo queries, geo (or bounding box) queries will only return 250 results per page.
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.
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 :- World level is 1
- Country is ~3
- Region is ~6
- City is ~11
- Street is ~16
safe_search
- Safe search setting:- 1 for safe.
- 2 for moderate.
- 3 for restricted.
content_type
- Content Type setting:- 1 for photos only.
- 2 for screenshots only.
- 3 for ‘other’ only.
- 4 for photos and screenshots.
- 5 for screenshots and ‘other’.
- 6 for photos and ‘other’.
- 7 for photos, screenshots, and ‘other’ (all).
machine_tags
- Aside from passing in a fully formed machine tag, there is a special syntax for searching on specific properties :- Find photos using the ‘dc’ namespace :
“machine_tags” => “dc:”
- Find photos with a title in the ‘dc’ namespace :
“machine_tags” => “dc:title=”
- Find photos titled “mr. camera” in the ‘dc’ namespace :
“machine_tags” => “dc:title=\”mr. camera\”
- Find photos whose value is “mr. camera” :
“machine_tags” => “:=\”mr. camera\””
- Find photos that have a title, in any namespace :
“machine_tags” => “:title=”
- Find photos that have a title, in any namespace, whose value is “mr. camera” :
“machine_tags” => “:title=\”mr. camera\””
- Find photos, in the ‘dc’ namespace whose value is “mr. camera” :
“machine_tags” => “dc:*=\”mr. camera\””
- Find photos using the ‘dc’ namespace :
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).
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.
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).
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.
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 areall
(default),photos
orvideos
has_geo
- Any photo that has been geotagged, or if the value is “0” any photo that has not been geotagged.
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.
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”.
The current list of context IDs is :
- 0, not defined.
- 1, indoors.
- 2, outdoors.
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.
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.
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.
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.
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.
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 Flickr Commons project. Default is false.in_gallery
- Limit the scope of the search to only photos that are in a gallery? 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:description
,license
,date_upload
,date_taken
,owner_name
,icon_server
,original_format
,last_update
,geo
,tags
,machine_tags
,o_dims
,views
,media
,path_alias
,url_sq
,url_t
,url_s
,url_q
,url_m
,url_n
,url_z
,url_c
,url_l
,url_o
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.
Set the content type of a photo.
This method requires authentication with “write” permission.
Arguments
photo_id
- (required) The id of the photo to set the adultness of.content_type
- (required) The content type of the photo. Must be one of: 1 for Photo, 2 for Screenshot, and 3 for Other.
Set one or both of the dates for a photo.
This method requires authentication with “write” permission.
Arguments
photo_id
- (required) The id of the photo to edit dates for.date_posted
- The date the photo was uploaded to flickr (see the dates documentation)date_taken
- The date the photo was taken (see the dates documentation)date_taken_granularity
- The granularity of the date the photo was taken (see the dates documentation)
Set the meta information for a photo.
This method requires authentication with “write” permission.
Arguments
photo_id
- (required) The id of the photo to set information for.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.
Set permissions for a photo.
This method requires authentication with “write” permission.
Arguments
photo_id
- (required) The id of the photo to set permissions for.is_public
- (required) 1 to set the photo to public, 0 to set it to private.is_friend
- (required) 1 to make the photo visible to friends when private, 0 to not.is_family
- (required) 1 to make the photo visible to family when private, 0 to not.perm_comment
- who can add comments to the photo and it’s notes. one of:
0
: nobody
1
: friends & family
2
: contacts
3
: everybodyperm_addmeta
- who can add notes and tags to the photo. one of:
0
: nobody / just the owner
1
: friends & family
2
: contacts
3
: everybody
Set the safety level of a photo.
This method requires authentication with “write” permission.
Arguments
photo_id
- (required) The id of the photo to set the adultness of.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.