Class: LinkedIn::Groups
- Inherits:
-
APIResource
- Object
- APIResource
- LinkedIn::Groups
- Defined in:
- lib/linked_in/groups.rb
Overview
Groups API
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
Instance Method Summary collapse
-
#add_group_share(group_id, share) ⇒ void
Create a share for a company that the authenticated user administers.
-
#group_memberships(options = {}) ⇒ LinkedIn::Mash
Retrieve the groups a current user belongs to.
-
#group_posts(options) ⇒ LinkedIn::Mash
Retrieve the posts in a group.
-
#group_profile(options) ⇒ LinkedIn::Mash
Retrieve the profile of a group.
-
#group_suggestions(options = {}) ⇒ LinkedIn::Mash
Retrieve group suggestions for the current user.
-
#join_group(group_id) ⇒ void
(Update) User joins, or requests to join, a group.
Methods inherited from APIResource
Constructor Details
This class inherits a constructor from LinkedIn::APIResource
Instance Method Details
#add_group_share(group_id, share) ⇒ void
This method returns an undefined value.
Create a share for a company that the authenticated user administers
Permissions: rw_groups
88 89 90 91 |
# File 'lib/linked_in/groups.rb', line 88 def add_group_share(group_id, share) path = "/groups/#{group_id}/posts" post(path, share) end |
#group_memberships(options = {}) ⇒ LinkedIn::Mash
Retrieve the groups a current user belongs to
Permissions: rw_groups
43 44 45 46 |
# File 'lib/linked_in/groups.rb', line 43 def group_memberships( = {}) path = "#{profile_path()}/group-memberships" get(path, ) end |
#group_posts(options) ⇒ LinkedIn::Mash
Retrieve the posts in a group
Permissions: rw_groups
73 74 75 76 |
# File 'lib/linked_in/groups.rb', line 73 def group_posts() path = "#{group_path()}/posts" get(path, ) end |
#group_profile(options) ⇒ LinkedIn::Mash
Retrieve the profile of a group
Permissions: rw_groups
57 58 59 60 |
# File 'lib/linked_in/groups.rb', line 57 def group_profile() path = group_path() get(path, ) end |
#group_suggestions(options = {}) ⇒ LinkedIn::Mash
Retrieve group suggestions for the current user
Permissions: r_fullprofile
30 31 32 33 |
# File 'lib/linked_in/groups.rb', line 30 def group_suggestions( = {}) path = "#{profile_path()}/suggestions/groups" get(path, ) end |
#join_group(group_id) ⇒ void
This method returns an undefined value.
(Update) User joins, or requests to join, a group
99 100 101 102 103 |
# File 'lib/linked_in/groups.rb', line 99 def join_group(group_id) path = "/people/~/group-memberships/#{group_id}" body = {'membership-state' => {'code' => 'member' }} put(path, body) end |