Flickrex.Flickr.Groups.Pools (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Add a photo to a group's pool.
Returns next and previous photos for a photo in a group pool.
Returns a list of groups to which you can add photos.
Returns a list of pool photos for a given group, based on the permissions of the group and the user logged in (if any).
Remove a photo from a group pool.
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 a photo to a group's pool.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to add to the group pool. The photo must belong to the calling user.group_id- The NSID of the group who's pool the photo is to be added to.
Specs
Returns next and previous photos for a photo in a group pool.
This method does not require authentication.
Arguments
photo_id- The id of the photo to fetch the context for.group_id- The nsid of the group who's pool to fetch the photo's 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
Returns a list of groups to which you can add photos.
This method requires authentication with "read" permission.
Options
page- The page of results to return. If this argument is omitted, it defaults to 1.per_page- Number of groups to return per page. If this argument is omitted, it defaults to 400. The maximum allowed value is 400.
Example response
%{
"groups" => %{
"group" => [
%{
"admin" => "0",
"iconserver" => "1",
"name" => "Art and Literature Hoedown",
"nsid" => "33853651696@N01",
"photos" => "2",
"privacy" => "3"
},
%{
"admin" => "1",
"iconserver" => "1",
"name" => "FlickrIdeas",
"nsid" => "34427465446@N01",
"photos" => "20",
"privacy" => "3"
},
%{
"admin" => "0",
"iconserver" => "1",
"name" => "GNEverybody",
"nsid" => "34427465497@N01",
"photos" => "4",
"privacy" => "3"
}
],
"page" => "1",
"pages" => "1",
"per_page" => "400",
"total" => "3"
},
"stat" => "ok"
} Specs
Returns a list of pool photos for a given group, based on the permissions of the group and the user logged in (if any).
This method does not require authentication.
Arguments
group_id- The id of the group who's pool you which to get the photo list for.
Options
tags- A tag to filter the pool with. At the moment only one tag at a time is supported.user_id- The nsid of a user. Specifiying this parameter will retrieve for you only those photos that the user has contributed to the group pool.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" => "1",
"photo" => %{
"dateadded" => "1089918707",
"id" => "2645",
"isfamily" => "0",
"isfriend" => "0",
"ispublic" => "1",
"owner" => "12037949754@N01",
"ownername" => "Bees / ?",
"secret" => "a9f4a06091",
"server" => "2",
"title" => "36679_o"
},
"total" => "1"
},
"stat" => "ok"
} Specs
Remove a photo from a group pool.
This method requires authentication with "write" permission.
Arguments
photo_id- The id of the photo to remove from the group pool. The photo must either be owned by the calling user of the calling user must be an administrator of the group.group_id- The NSID of the group who's pool the photo is to removed from.