class JLinkedinGroups extends JLinkedinObject

Linkedin API Groups class for the Joomla Platform.

Methods

__construct( Registry $options = null, JHttp $client = null, JLinkedinOAuth $oauth = null)

Constructor.

string
booleanToString( boolean $bool)

Method to convert boolean to string.

mixed
getOption( string $key)

Get an option from the JLinkedinObject instance.

setOption( string $key, mixed $value)

Set an option for the JLinkedinObject instance.

array
getGroup( string $id, string $fields = null, integer $start, integer $count = 5)

Method to get a group.

array
getMemberships( string $id = null, string $fields = null, integer $start, integer $count = 5, string $membership_state = null)

Method to find the groups a member belongs to.

array
getSettings( string $person_id = null, string $group_id = null, string $fields = null, integer $start, integer $count = 5)

Method to find the groups a member belongs to.

array
changeSettings( string $group_id, boolean $show_logo = null, string $digest_frequency = null, boolean $announcements = null, boolean $allow_messages = null, boolean $new_post = null)

Method to change a groups settings.

array
joinGroup( string $group_id, boolean $show_logo = null, string $digest_frequency = null, boolean $announcements = null, boolean $allow_messages = null, boolean $new_post = null)

Method to join a group.

array
leaveGroup( string $group_id)

Method to leave a group.

array
getDiscussions( string $id, string $fields = null, integer $start, integer $count, string $order = null, string $category = 'discussion', string $modified_since = null)

Method to get dicussions for a group.

array
getUserPosts( string $group_id, string $role, string $person_id = null, string $fields = null, integer $start, integer $count, string $order = null, string $category = 'discussion', string $modified_since = null)

Method to get posts a user started / participated in / follows for a group.

array
getPost( string $post_id, string $fields = null)

Method to retrieve details about a post.

array
getPostComments( string $post_id, string $fields = null, integer $start, integer $count)

Method to retrieve all comments of a post.

string
createPost( string $group_id, string $title, string $summary)

Method to retrieve all comments of a post.

array
likePost( string $post_id)

Method used to like a post.

array
unlikePost( string $post_id)

Method used to unlike a post.

array
followPost( string $post_id)

Method used to follow a post.

array
unfollowPost( string $post_id)

Method used to unfollow a post.

array
flagPost( string $post_id, string $flag)

Method to flag a post as a Promotion or Job.

array
deletePost( string $post_id)

Method to delete a post if the current user is the creator or flag it as inappropriate otherwise.

array
getComment( string $comment_id, string $fields = null)

Method to access the comments resource.

string
addComment( string $post_id, string $comment)

Method to add a comment to a post

array
deleteComment( string $comment_id)

Method to delete a comment if the current user is the creator or flag it as inappropriate otherwise.

array
getSuggested( string $person_id = null, string $fields = null)

Method to get suggested groups for a user.

array
deleteSuggestion( string $suggestion_id, string $person_id = null)

Method to delete a group suggestion for a user.

Details

__construct( Registry $options = null, JHttp $client = null, JLinkedinOAuth $oauth = null)

Constructor.

Parameters

Registry $options Linkedin options object.
JHttp $client The HTTP client object.
JLinkedinOAuth $oauth The OAuth client.

string booleanToString( boolean $bool)

Method to convert boolean to string.

Parameters

boolean $bool The boolean value to convert.

Return Value

string String with the converted boolean.

mixed getOption( string $key)

Get an option from the JLinkedinObject instance.

Parameters

string $key The name of the option to get.

Return Value

mixed The option value.

JLinkedinObject setOption( string $key, mixed $value)

Set an option for the JLinkedinObject instance.

Parameters

string $key The name of the option to set.
mixed $value The option value to set.

Return Value

JLinkedinObject This object for method chaining.

array getGroup( string $id, string $fields = null, integer $start, integer $count = 5)

Method to get a group.

Parameters

string $id The unique identifier for a group.
string $fields Request fields beyond the default ones.
integer $start Starting location within the result set for paginated returns.
integer $count The number of results returned.

Return Value

array The decoded JSON response

array getMemberships( string $id = null, string $fields = null, integer $start, integer $count = 5, string $membership_state = null)

Method to find the groups a member belongs to.

Parameters

string $id The unique identifier for a user.
string $fields Request fields beyond the default ones.
integer $start Starting location within the result set for paginated returns.
integer $count The number of results returned.
string $membership_state The state of the caller’s membership to the specified group. Values are: non-member, awaiting-confirmation, awaiting-parent-group-confirmation, member, moderator, manager, owner.

Return Value

array The decoded JSON response

array getSettings( string $person_id = null, string $group_id = null, string $fields = null, integer $start, integer $count = 5)

Method to find the groups a member belongs to.

Parameters

string $person_id The unique identifier for a user.
string $group_id The unique identifier for a group.
string $fields Request fields beyond the default ones.
integer $start Starting location within the result set for paginated returns.
integer $count The number of results returned.

Return Value

array The decoded JSON response

array changeSettings( string $group_id, boolean $show_logo = null, string $digest_frequency = null, boolean $announcements = null, boolean $allow_messages = null, boolean $new_post = null)

Method to change a groups settings.

Parameters

string $group_id The unique identifier for a group.
boolean $show_logo Show group logo in profile.
string $digest_frequency Email digest frequency.
boolean $announcements Email announcements from managers.
boolean $allow_messages Allow messages from members.
boolean $new_post Email for every new post.

Return Value

array The decoded JSON response

array joinGroup( string $group_id, boolean $show_logo = null, string $digest_frequency = null, boolean $announcements = null, boolean $allow_messages = null, boolean $new_post = null)

Method to join a group.

Parameters

string $group_id The unique identifier for a group.
boolean $show_logo Show group logo in profile.
string $digest_frequency Email digest frequency.
boolean $announcements Email announcements from managers.
boolean $allow_messages Allow messages from members.
boolean $new_post Email for every new post.

Return Value

array The decoded JSON response

array leaveGroup( string $group_id)

Method to leave a group.

Parameters

string $group_id The unique identifier for a group.

Return Value

array The decoded JSON response

array getDiscussions( string $id, string $fields = null, integer $start, integer $count, string $order = null, string $category = 'discussion', string $modified_since = null)

Method to get dicussions for a group.

Parameters

string $id The unique identifier for a group.
string $fields Request fields beyond the default ones.
integer $start Starting location within the result set for paginated returns.
integer $count The number of results returned.
string $order Sort order for posts. Valid for: recency, popularity.
string $category Category of posts. Valid for: discussion
string $modified_since Timestamp filter for posts created after the specified value.

Return Value

array The decoded JSON response

array getUserPosts( string $group_id, string $role, string $person_id = null, string $fields = null, integer $start, integer $count, string $order = null, string $category = 'discussion', string $modified_since = null)

Method to get posts a user started / participated in / follows for a group.

Parameters

string $group_id The unique identifier for a group.
string $role Filter for posts related to the caller. Valid for: creator, commenter, follower.
string $person_id The unique identifier for a user.
string $fields Request fields beyond the default ones.
integer $start Starting location within the result set for paginated returns.
integer $count The number of results returned.
string $order Sort order for posts. Valid for: recency, popularity.
string $category Category of posts. Valid for: discussion
string $modified_since Timestamp filter for posts created after the specified value.

Return Value

array The decoded JSON response

array getPost( string $post_id, string $fields = null)

Method to retrieve details about a post.

Parameters

string $post_id The unique identifier for a post.
string $fields Request fields beyond the default ones.

Return Value

array The decoded JSON response

array getPostComments( string $post_id, string $fields = null, integer $start, integer $count)

Method to retrieve all comments of a post.

Parameters

string $post_id The unique identifier for a post.
string $fields Request fields beyond the default ones.
integer $start Starting location within the result set for paginated returns.
integer $count The number of results returned.

Return Value

array The decoded JSON response

string createPost( string $group_id, string $title, string $summary)

Method to retrieve all comments of a post.

Parameters

string $group_id The unique identifier for a group.
string $title Post title.
string $summary Post summary.

Return Value

string The created post's id.

array likePost( string $post_id)

Method used to like a post.

Parameters

string $post_id The unique identifier for a group.

Return Value

array The decoded JSON response

array unlikePost( string $post_id)

Method used to unlike a post.

Parameters

string $post_id The unique identifier for a group.

Return Value

array The decoded JSON response

array followPost( string $post_id)

Method used to follow a post.

Parameters

string $post_id The unique identifier for a group.

Return Value

array The decoded JSON response

array unfollowPost( string $post_id)

Method used to unfollow a post.

Parameters

string $post_id The unique identifier for a group.

Return Value

array The decoded JSON response

array flagPost( string $post_id, string $flag)

Method to flag a post as a Promotion or Job.

Parameters

string $post_id The unique identifier for a group.
string $flag Flag as a 'promotion' or 'job'.

Return Value

array The decoded JSON response

array deletePost( string $post_id)

Method to delete a post if the current user is the creator or flag it as inappropriate otherwise.

Parameters

string $post_id The unique identifier for a group.

Return Value

array The decoded JSON response

array getComment( string $comment_id, string $fields = null)

Method to access the comments resource.

Parameters

string $comment_id The unique identifier for a comment.
string $fields Request fields beyond the default ones.

Return Value

array The decoded JSON response

string addComment( string $post_id, string $comment)

Method to add a comment to a post

Parameters

string $post_id The unique identifier for a group.
string $comment The post comment's text.

Return Value

string The created comment's id.

array deleteComment( string $comment_id)

Method to delete a comment if the current user is the creator or flag it as inappropriate otherwise.

Parameters

string $comment_id The unique identifier for a group.

Return Value

array The decoded JSON response

array getSuggested( string $person_id = null, string $fields = null)

Method to get suggested groups for a user.

Parameters

string $person_id The unique identifier for a user.
string $fields Request fields beyond the default ones.

Return Value

array The decoded JSON response

array deleteSuggestion( string $suggestion_id, string $person_id = null)

Method to delete a group suggestion for a user.

Parameters

string $suggestion_id The unique identifier for a suggestion.
string $person_id The unique identifier for a user.

Return Value

array The decoded JSON response