module LinkedIn::Api::Groups
Groups
API
@see developer.linkedin.com/documents/groups-api Groups
API @see developer.linkedin.com/documents/groups-fields Groups
Fields
The following API actions do not have corresponding methods in this module
* PUT Change my Group Settings * POST Change my Group Settings * DELETE Leave a group * PUT Follow/unfollow a Group post * PUT Flag a Post as a Promotion or Job * DELETE Delete a Post * DELETE Flag a post as inappropriate * DELETE A comment or flag comment as inappropriate * DELETE Remove a Group Suggestion
[(contribute here)](github.com/hexgnu/linkedin)
Public Instance Methods
Retrieve the groups a current user belongs to
Permissions: rw_groups
@see developer.linkedin.com/documents/groups-api
@macro person_path_options @return [LinkedIn::Mash]
# File lib/linked_in/api/groups.rb, line 46 def group_memberships(options = {}) path = "#{person_path(options)}/group-memberships" simple_query(path, options) end
Retrieve the posts in a group
Permissions: rw_groups
@see developer.linkedin.com/documents/groups-api
@param [Hash] options identifies the group or groups @optio options [String] :id identifier for the group @optio options [String] :count @optio options [String] :start @return [LinkedIn::Mash]
# File lib/linked_in/api/groups.rb, line 76 def group_posts(options) path = "#{group_path(options)}/posts" simple_query(path, options) end
Retrieve the profile of a group
Permissions: rw_groups
@see developer.linkedin.com/documents/groups-api
@param [Hash] options identifies the group or groups @optio options [String] :id identifier for the group @return [LinkedIn::Mash]
# File lib/linked_in/api/groups.rb, line 60 def group_profile(options) path = group_path(options) simple_query(path, options) end
Retrieve group suggestions for the current user
Permissions: r_fullprofile
@see developer.linkedin.com/documents/job-bookmarks-and-suggestions
@macro person_path_options @return [LinkedIn::Mash]
# File lib/linked_in/api/groups.rb, line 33 def group_suggestions(options = {}) path = "#{person_path(options)}/suggestions/groups" simple_query(path, options) end
(Update) User joins, or requests to join, a group
@see developer.linkedin.com/documents/groups-api#membergroups
@param [String] group_id Group ID @return [void]
# File lib/linked_in/api/groups.rb, line 108 def join_group(group_id) path = "/people/~/group-memberships/#{group_id}" body = {'membership-state' => {'code' => 'member' }} put(path, MultiJson.dump(body), "Content-Type" => "application/json") end
@deprecated Use {#add_group_share} instead
# File lib/linked_in/api/groups.rb, line 82 def post_group_discussion(group_id, discussion) warn 'Use add_group_share over post_group_discussion. This will be taken out in future versions' add_group_share(group_id, discussion) end