Flickrex.Flickr.Groups (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Browse the group category tree, finding groups and sub-categories.
Get information about a group.
Join a public group as a member.
Request to join a group that is invitation-only.
Leave a group.
Search for groups. 18+ groups will only be returned for authenticated calls where the authenticated user is over 18.
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
Browse the group category tree, finding groups and sub-categories.
This method requires authentication with "read" permission.
Options
cat_id- The category id to fetch a list of groups and sub-categories for. If not specified, it defaults to zero, the root of the category tree.
Example response
%{
"category" => %{
"group" => [
%{
"chatnsid" => "34955637533@N01",
"inchat" => "0",
"members" => "13",
"name" => "Cal's Public Test Group",
"nsid" => "34955637532@N01",
"online" => "1"
},
%{
"chatnsid" => "34158032588@N01",
"inchat" => "0",
"members" => "3",
"name" => "Eric's Alt Group Test",
"nsid" => "34158032587@N01",
"online" => "0"
}
],
"name" => "Alt",
"path" => "/Alt",
"pathids" => "/63",
"subcat" => [
%{"count" => "0", "id" => "80", "name" => "18+"},
%{"count" => "4", "id" => "82", "name" => "Absurd"}
]
},
"stat" => "ok"
} Specs
Get information about a group.
This method does not require authentication.
Arguments
group_id- The NSID of the group to fetch information for.
Options
group_path_alias- The path alias of the group. One of this or the group_id param is requiredlang- The language of the group name and description to fetch. If the language is not found, the primary language of the group will be returned. Valid values are the same as <a href="/services/feeds/">in feeds</a>.
Example response
%{
"group" => %{
"description" => %{"_content" => "The group for GNE players"},
"iconfarm" => "1",
"iconserver" => "1",
"id" => "34427465497@N01",
"ispoolmoderated" => "0",
"lang" => "en-us",
"members" => %{"_content" => "69"},
"name" => %{"_content" => "GNEverybody"},
"privacy" => %{"_content" => "3"},
"restrictions" => %{
"art_ok" => "1",
"has_geo" => "0",
"images_ok" => "1",
"moderate_ok" => "0",
"photos_ok" => "1",
"restricted_ok" => "0",
"safe_ok" => "1",
"screens_ok" => "1",
"videos_ok" => "1"
},
"throttle" => %{"count" => "10", "mode" => "month", "remaining" => "3"}
},
"stat" => "ok"
} Specs
Join a public group as a member.
This method requires authentication with "write" permission.
Arguments
group_id- The NSID of the Group in question
Options
accept_rules- If the group has rules, they must be displayed to the user prior to joining. Passing a true value for this argument specifies that the application has displayed the group rules to the user, and that the user has agreed to them. (See flickr.groups.getInfo).
Specs
Request to join a group that is invitation-only.
This method requires authentication with "write" permission.
Arguments
group_id- The NSID of the group to request joining.message- Message to the administrators.accept_rules- If the group has rules, they must be displayed to the user prior to joining. Passing a true value for this argument specifies that the application has displayed the group rules to the user, and that the user has agreed to them. (See flickr.groups.getInfo).
Specs
Leave a group.
If the user is the only administrator left, and there are other members, the oldest member will be promoted to administrator.
If the user is the last person in the group, the group will be deleted.
This method requires authentication with "delete" permission.
Arguments
group_id- The NSID of the Group to leave
Options
delete_photos- Delete all photos by this user from the group
Specs
Search for groups. 18+ groups will only be returned for authenticated calls where the authenticated user is over 18.
This method does not require authentication.
Arguments
text- The text to search for.
Options
per_page- Number of groups to return per page. If this argument is ommited, it defaults to 100. The maximum allowed value is 500.page- The page of results to return. If this argument is ommited, it defaults to 1.
Example response
%{
"groups" => %{
"group" => [
%{
"eighteenplus" => "0",
"name" => "Frito's Test Group",
"nsid" => "3000@N02"
},
%{
"eighteenplus" => "0",
"name" => "Free for All",
"nsid" => "32825757@N00"
},
%{
"eighteenplus" => "0",
"name" => "joly's mothers",
"nsid" => "33335981560@N01"
},
%{
"eighteenplus" => "0",
"name" => "Wintermute tower",
"nsid" => "33853651681@N01"
},
%{
"eighteenplus" => "0",
"name" => "Art and Literature Hoedown",
"nsid" => "33853651696@N01"
}
],
"page" => "1",
"pages" => "14",
"perpage" => "5",
"total" => "67"
},
"stat" => "ok"
}