class JLinkedinStream extends JLinkedinObject

Linkedin API Social Stream 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
share( string $visibility, string $comment = null, string $title = null, string $url = null, string $image = null, string $description = null, boolean $twitter = false)

Method to add a new share. Note: post must contain comment and/or (title and url).

array
reshare( string $visibility, string $id, string $comment = null, boolean $twitter = false)

Method to reshare an existing share.

array
getCurrentShare( string $id = null, string $url = null)

Method to get a particular member's current share.

array
getShareStream( string $id = null, string $url = null, boolean $self = true)

Method to get a particular member's current share.

array
getNetworkUpdates( string $id = null, boolean $self = true, mixed $type = null, integer $count, integer $start, string $after = null, string $before = null, boolean $hidden = false)

Method to get the users network updates.

array
getNetworkStats()

Method to get information about the current member's network.

array
postNetworkUpdate( string $body)

Method to get the users network updates.

array
getComments( string $key)

Method to retrieve all comments for a given network update.

array
postComment( string $key, string $comment)

Method to post a new comment to an existing update.

array
getLikes( string $key)

Method to retrieve the complete list of people who liked an update.

array
like( string $key)

Method used to like an update.

array
unlike( string $key)

Method used to unlike an update.

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 share( string $visibility, string $comment = null, string $title = null, string $url = null, string $image = null, string $description = null, boolean $twitter = false)

Method to add a new share. Note: post must contain comment and/or (title and url).

Parameters

string $visibility One of anyone: all members or connections-only: connections only.
string $comment Text of member's comment.
string $title Title of shared document.
string $url URL for shared content.
string $image URL for image of shared content.
string $description Description of shared content.
boolean $twitter True to have LinkedIn pass the status message along to a member's tethered Twitter account.

Return Value

array The decoded JSON response

Exceptions

RuntimeException

array reshare( string $visibility, string $id, string $comment = null, boolean $twitter = false)

Method to reshare an existing share.

Parameters

string $visibility One of anyone: all members or connections-only: connections only.
string $id The unique identifier for a share.
string $comment Text of member's comment.
boolean $twitter True to have LinkedIn pass the status message along to a member's tethered Twitter account.

Return Value

array The decoded JSON response

Exceptions

RuntimeException

array getCurrentShare( string $id = null, string $url = null)

Method to get a particular member's current share.

Parameters

string $id Member id of the profile you want.
string $url The public profile URL.

Return Value

array The decoded JSON response

array getShareStream( string $id = null, string $url = null, boolean $self = true)

Method to get a particular member's current share.

Parameters

string $id Member id of the profile you want.
string $url The public profile URL.
boolean $self Used to return member's feed. Omitted to return aggregated network feed.

Return Value

array The decoded JSON response

array getNetworkUpdates( string $id = null, boolean $self = true, mixed $type = null, integer $count, integer $start, string $after = null, string $before = null, boolean $hidden = false)

Method to get the users network updates.

Parameters

string $id Member id.
boolean $self Used to return member's feed. Omitted to return aggregated network feed.
mixed $type String containing any valid Network Update Type from the table or an array of strings to specify more than one Network Update type.
integer $count Number of updates to return, with a maximum of 250.
integer $start The offset by which to start Network Update pagination.
string $after Timestamp after which to retrieve updates.
string $before Timestamp before which to retrieve updates.
boolean $hidden Whether to display updates from people the member has chosen to "hide" from their update stream.

Return Value

array The decoded JSON response

array getNetworkStats()

Method to get information about the current member's network.

Return Value

array The decoded JSON response

array postNetworkUpdate( string $body)

Method to get the users network updates.

Parameters

string $body The actual content of the update. You can use HTML to include links to the user name and the content the user created. Other HTML tags are not supported. All body text should be HTML entity escaped and UTF-8 compliant.

Return Value

array The decoded JSON response

array getComments( string $key)

Method to retrieve all comments for a given network update.

Parameters

string $key update/update-key representing an update.

Return Value

array The decoded JSON response

array postComment( string $key, string $comment)

Method to post a new comment to an existing update.

Parameters

string $key update/update-key representing an update.
string $comment Maximum length of 700 characters

Return Value

array The decoded JSON response

array getLikes( string $key)

Method to retrieve the complete list of people who liked an update.

Parameters

string $key update/update-key representing an update.

Return Value

array The decoded JSON response

array like( string $key)

Method used to like an update.

Parameters

string $key Update/update-key representing an update.

Return Value

array The decoded JSON response

array unlike( string $key)

Method used to unlike an update.

Parameters

string $key Update/update-key representing an update.

Return Value

array The decoded JSON response