Groups

Extends \Joomla\Linkedin\Object

Linkedin API Groups class for the Joomla Framework.

deprecated
since

1.0

deprecated

The joomla/linkedin package is deprecated

Methods

__construct

Constructor.

__construct(array $options = array(), \Joomla\Http\Http $client = null, \Joomla\Linkedin\OAuth $oauth = null) 
inherited
since

1.2.0

Arguments

$options

arrayLinkedin options array.

$client

\Joomla\Http\HttpThe HTTP client object.

$oauth

\Joomla\Linkedin\OAuthThe OAuth client.

addComment

Method to add a comment to a post

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

1.0

Arguments

$postId

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

1.2.0

Arguments

$bool

booleanThe boolean value to convert.

Response

stringString with the converted boolean.

changeSettings

Method to change a groups settings.

changeSettings(string $groupId, boolean $showLogo = null, string $digestFrequency = null, boolean $announcements = null, boolean $allowMessages = null, boolean $newPost = null) : array
since

1.0

Arguments

$groupId

stringThe unique identifier for a group.

$showLogo

booleanShow group logo in profile.

$digestFrequency

stringE-mail digest frequency.

$announcements

booleanE-mail announcements from managers.

$allowMessages

booleanAllow messages from members.

$newPost

booleanE-mail for every new post.

Response

arrayThe decoded JSON response

createPost

Method to retrieve all comments of a post.

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

1.0

Arguments

$groupId

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

1.0

Arguments

$commentId

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

1.0

Arguments

$postId

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

deleteSuggestion

Method to delete a group suggestion for a user.

deleteSuggestion(string $suggestionId, string $personId = null) : array
since

1.0

Arguments

$suggestionId

stringThe unique identifier for a suggestion.

$personId

stringThe unique identifier for a user.

Response

arrayThe decoded JSON response

flagPost

Method to flag a post as a Promotion or Job.

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

1.0

Arguments

$postId

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

1.0

Arguments

$postId

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

getComment

Method to access the comments resource.

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

1.0

Arguments

$commentId

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 $modifiedSince = null) : array
since

1.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

$modifiedSince

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

1.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 $membershipState = null) : array
since

1.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.

$membershipState

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 Object instance.

getOption(string $key) : mixed
inherited
since

1.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 $postId, string $fields = null) : array
since

1.0

Arguments

$postId

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 $postId, string $fields = null, integer $start, integer $count) : array
since

1.0

Arguments

$postId

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 $personId = null, string $groupId = null, string $fields = null, integer $start, integer $count = 5) : array
since

1.0

Arguments

$personId

stringThe unique identifier for a user.

$groupId

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 $personId = null, string $fields = null) : array
since

1.0

Arguments

$personId

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 $groupId, string $role, string $personId = null, string $fields = null, integer $start, integer $count, string $order = null, string $category = 'discussion', string $modifiedSince = null) : array
since

1.0

Arguments

$groupId

stringThe unique identifier for a group.

$role

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

$personId

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

$modifiedSince

stringTimestamp filter for posts created after the specified value.

Response

arrayThe decoded JSON response

joinGroup

Method to join a group.

joinGroup(string $groupId, boolean $showLogo = null, string $digestFrequency = null, boolean $announcements = null, boolean $allowMessages = null, boolean $newPost = null) : array
since

1.0

Arguments

$groupId

stringThe unique identifier for a group.

$showLogo

booleanShow group logo in profile.

$digestFrequency

stringE-mail digest frequency.

$announcements

booleanE-mail announcements from managers.

$allowMessages

booleanAllow messages from members.

$newPost

booleanE-mail for every new post.

Response

arrayThe decoded JSON response

leaveGroup

Method to leave a group.

leaveGroup(string $groupId) : array
since

1.0

Arguments

$groupId

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

likePost

Method used to like a post.

likePost(string $postId) : array
since

1.0

Arguments

$postId

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

processFollowUnfollow

Method to follow or unfollow a post.

processFollowUnfollow(string $postId, boolean $follow) : array
since

1.0

Arguments

$postId

stringThe unique identifier for a group.

$follow

booleanTrue to like post, false otherwise.

Response

arrayThe decoded JSON response

processLikeUnlike

Method to like or unlike a post.

processLikeUnlike(string $postId, boolean $like) : array
since

1.0

Arguments

$postId

stringThe unique identifier for a group.

$like

booleanTrue to like post, false otherwise.

Response

arrayThe decoded JSON response

setOption

Set an option for the Object instance.

setOption(string $key, mixed $value) : \Joomla\Linkedin\AbstractLinkedinObject
inherited
since

1.2.0

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\Joomla\Linkedin\AbstractLinkedinObjectThis object for method chaining.

unfollowPost

Method used to unfollow a post.

unfollowPost(string $postId) : array
since

1.0

Arguments

$postId

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

unlikePost

Method used to unlike a post.

unlikePost(string $postId) : array
since

1.0

Arguments

$postId

stringThe unique identifier for a group.

Response

arrayThe decoded JSON response

Properties

options

Options for the Linkedin object.

inherited
since

1.2.0

Type(s)

array

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.2.0

Type(s)

\Joomla\Http\Http

oauth

The OAuth client.

inherited
since

1.2.0

Type(s)

\Joomla\Linkedin\OAuth