Flickrex.Flickr.Favorites (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Adds a photo to a user's favorites list.
Returns next and previous favorites for a photo in a user's favorites.
Returns a list of the user's favorite photos. Only photos which the calling user has permission to see are returned.
Returns a list of favorite public photos for the given user.
Removes a photo from a user's favorites list.
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
Adds a photo to a user's favorites list.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to add to the user's favorites.
Specs
Returns next and previous favorites for a photo in a user's favorites.
This method does not require authentication.
Arguments
photo_id- The id of the photo to fetch the context for.user_id- The user who counts the photo as a favorite.
Example response
%{
"count" => %{"_content" => "3"},
"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
Returns a list of the user's favorite photos. Only photos which the calling user has permission to see are returned.
This method does not require authentication.
Options
user_id- The NSID of the user to fetch the favorites list for. If this argument is omitted, the favorites list for the calling user is returned.min_fave_date- Minimum date that a photo was favorited on. The date should be in the form of a unix timestamp.max_fave_date- Maximum date that a photo was favorited on. The date should be in the form of a unix timestamp.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 favorite public photos for the given user.
This method does not require authentication.
Arguments
user_id- The user to fetch the favorites list for.
Options
min_fave_date- Minimum date that a photo was favorited on. The date should be in the form of a unix timestamp.max_fave_date- Maximum date that a photo was favorited on. The date should be in the form of a unix timestamp.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
Removes a photo from a user's favorites list.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to remove from the user's favorites.