JLinkedinGroups

Extends \JLinkedinObject

Linkedin API Groups class for the Joomla Platform.

since

3.2.0

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JHttp $client = null, \JLinkedinOAuth $oauth = null) 
inherited
since

3.2.0

Arguments

$options

\Joomla\Registry\RegistryLinkedin options object.

$client

\JHttpThe HTTP client object.

$oauth

\JLinkedinOAuthThe OAuth client.

_followUnfollow

Method to follow or unfollow a post.

_followUnfollow(string $post_id, boolean $follow) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

$follow

booleanTrue to like post, false otherwise.

Response

arrayThe decoded JSON response

_likeUnlike

Method to like or unlike a post.

_likeUnlike(string $post_id, boolean $like) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

$like

booleanTrue to like post, false otherwise.

Response

arrayThe decoded JSON response

addComment

Method to add a comment to a post

addComment(string $post_id, string $comment) : string
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

$comment

stringThe post comment's text.

Response

stringThe created comment's id.

booleanToString

Method to convert boolean to string.

booleanToString(boolean $bool) : string
inherited
since

3.2.0

Arguments

$bool

booleanThe boolean value to convert.

Response

stringString with the converted boolean.

changeSettings

Method to change a groups settings.

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

3.2.0

Arguments

$group_id

stringThe unique identifier for a group.

$show_logo

booleanShow group logo in profile.

$digest_frequency

stringEmail digest frequency.

$announcements

booleanEmail announcements from managers.

$allow_messages

booleanAllow messages from members.

$new_post

booleanEmail for every new post.

Response

arrayThe decoded JSON response

createPost

Method to retrieve all comments of a post.

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

3.2.0

Arguments

$group_id

stringThe unique identifier for a group.

$title

stringPost title.

$summary

stringPost summary.

Response

stringThe created post's id.

deleteComment

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

deleteComment(string $comment_id) : array
since

3.2.0

Arguments

$comment_id

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

deletePost

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

deletePost(string $post_id) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

deleteSuggestion

Method to delete a group suggestion for a user.

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

3.2.0

Arguments

$suggestion_id

stringThe unique identifier for a suggestion.

$person_id

stringThe unique identifier for a user.

Response

arrayThe decoded JSON response

flagPost

Method to flag a post as a Promotion or Job.

flagPost(string $post_id, string $flag) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

$flag

stringFlag as a 'promotion' or 'job'.

Response

arrayThe decoded JSON response

followPost

Method used to follow a post.

followPost(string $post_id) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

getComment

Method to access the comments resource.

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

3.2.0

Arguments

$comment_id

stringThe unique identifier for a comment.

$fields

stringRequest fields beyond the default ones.

Response

arrayThe decoded JSON response

getDiscussions

Method to get dicussions for a group.

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

3.2.0

Arguments

$id

stringThe unique identifier for a group.

$fields

stringRequest fields beyond the default ones.

$start

integerStarting location within the result set for paginated returns.

$count

integerThe number of results returned.

$order

stringSort order for posts. Valid for: recency, popularity.

$category

stringCategory of posts. Valid for: discussion

$modified_since

stringTimestamp filter for posts created after the specified value.

Response

arrayThe decoded JSON response

getGroup

Method to get a group.

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

3.2.0

Arguments

$id

stringThe unique identifier for a group.

$fields

stringRequest fields beyond the default ones.

$start

integerStarting location within the result set for paginated returns.

$count

integerThe number of results returned.

Response

arrayThe decoded JSON response

getMemberships

Method to find the groups a member belongs to.

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

3.2.0

Arguments

$id

stringThe unique identifier for a user.

$fields

stringRequest fields beyond the default ones.

$start

integerStarting location within the result set for paginated returns.

$count

integerThe number of results returned.

$membership_state

stringThe state of the caller’s membership to the specified group. Values are: non-member, awaiting-confirmation, awaiting-parent-group-confirmation, member, moderator, manager, owner.

Response

arrayThe decoded JSON response

getOption

Get an option from the JLinkedinObject instance.

getOption(string $key) : mixed
inherited
since

3.2.0

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

getPost

Method to retrieve details about a post.

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

3.2.0

Arguments

$post_id

stringThe unique identifier for a post.

$fields

stringRequest fields beyond the default ones.

Response

arrayThe decoded JSON response

getPostComments

Method to retrieve all comments of a post.

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

3.2.0

Arguments

$post_id

stringThe unique identifier for a post.

$fields

stringRequest fields beyond the default ones.

$start

integerStarting location within the result set for paginated returns.

$count

integerThe number of results returned.

Response

arrayThe decoded JSON response

getSettings

Method to find the groups a member belongs to.

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

3.2.0

Arguments

$person_id

stringThe unique identifier for a user.

$group_id

stringThe unique identifier for a group.

$fields

stringRequest fields beyond the default ones.

$start

integerStarting location within the result set for paginated returns.

$count

integerThe number of results returned.

Response

arrayThe decoded JSON response

getSuggested

Method to get suggested groups for a user.

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

3.2.0

Arguments

$person_id

stringThe unique identifier for a user.

$fields

stringRequest fields beyond the default ones.

Response

arrayThe decoded JSON response

getUserPosts

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

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) : array
since

3.2.0

Arguments

$group_id

stringThe unique identifier for a group.

$role

stringFilter for posts related to the caller. Valid for: creator, commenter, follower.

$person_id

stringThe unique identifier for a user.

$fields

stringRequest fields beyond the default ones.

$start

integerStarting location within the result set for paginated returns.

$count

integerThe number of results returned.

$order

stringSort order for posts. Valid for: recency, popularity.

$category

stringCategory of posts. Valid for: discussion

$modified_since

stringTimestamp filter for posts created after the specified value.

Response

arrayThe decoded JSON response

joinGroup

Method to join a group.

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

3.2.0

Arguments

$group_id

stringThe unique identifier for a group.

$show_logo

booleanShow group logo in profile.

$digest_frequency

stringEmail digest frequency.

$announcements

booleanEmail announcements from managers.

$allow_messages

booleanAllow messages from members.

$new_post

booleanEmail for every new post.

Response

arrayThe decoded JSON response

leaveGroup

Method to leave a group.

leaveGroup(string $group_id) : array
since

3.2.0

Arguments

$group_id

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

likePost

Method used to like a post.

likePost(string $post_id) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

setOption

Set an option for the JLinkedinObject instance.

setOption(string $key, mixed $value) : \JLinkedinObject
inherited
since

3.2.0

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\JLinkedinObjectThis object for method chaining.

unfollowPost

Method used to unfollow a post.

unfollowPost(string $post_id) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

unlikePost

Method used to unlike a post.

unlikePost(string $post_id) : array
since

3.2.0

Arguments

$post_id

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

Properties

options

Options for the Linkedin object.

inherited
since

3.2.0

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

3.2.0

Type(s)

\JHttp

oauth

The OAuth client.

inherited
since

3.2.0

Type(s)

\JLinkedinOAuth