class JLinkedinCompanies extends JLinkedinObject

Linkedin API Companies 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
getCompanies( integer $id = null, string $name = null, string $domain = null, string $fields = null)

Method to retrieve companies using a company ID, a universal name, or an email domain.

array
getUpdates( string $id, string $type = null, integer $count, integer $start)

Method to read shares for a particular company .

array
search( string $fields = null, string $keywords = null, boolean $hq = false, string $facets = null, array $facet = null, integer $start, integer $count, string $sort = null)

Method to search across company pages.

array
getFollowed( string $fields = null)

Method to get a list of companies the current member is following.

array
follow( string $id)

Method to follow a company.

array
unfollow( string $id)

Method to unfollow a company.

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

Method to get a collection of suggested companies for the current user.

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

Method to get a collection of suggested companies for the current 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 getCompanies( integer $id = null, string $name = null, string $domain = null, string $fields = null)

Method to retrieve companies using a company ID, a universal name, or an email domain.

Parameters

integer $id The unique internal numeric company identifier.
string $name The unique string identifier for a company.
string $domain Company email domains.
string $fields Request fields beyond the default ones.

Return Value

array The decoded JSON response

Exceptions

RuntimeException

array getUpdates( string $id, string $type = null, integer $count, integer $start)

Method to read shares for a particular company .

Parameters

string $id The unique company identifier.
string $type Any valid Company Update Type from the table: https://developer.linkedin.com/reading-company-updates.
integer $count Maximum number of updates to return.
integer $start The offset by which to start Network Update pagination.

Return Value

array The decoded JSON response

Method to search across company pages.

Parameters

string $fields Request fields beyond the default ones.
string $keywords Members who have all the keywords anywhere in their profile.
boolean $hq Matching companies by the headquarters location. When this is set to "true" and a location facet is used, this restricts returned companies to only those whose headquarters resides in the specified location.
string $facets Facet buckets to return, e.g. location.
array $facet Array of facet values to search over. Contains values for location, industry, network, company-size, num-followers-range and fortune, in exactly this order, null must be specified for an element if no value.
integer $start Starting location within the result set for paginated returns.
integer $count The number of results returned.
string $sort Controls the search result order. There are four options: relevance, relationship, followers and company-size.

Return Value

array The decoded JSON response

array getFollowed( string $fields = null)

Method to get a list of companies the current member is following.

Parameters

string $fields Request fields beyond the default ones.

Return Value

array The decoded JSON response

array follow( string $id)

Method to follow a company.

Parameters

string $id The unique identifier for a company.

Return Value

array The decoded JSON response

array unfollow( string $id)

Method to unfollow a company.

Parameters

string $id The unique identifier for a company.

Return Value

array The decoded JSON response

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

Method to get a collection of suggested companies for the current user.

Parameters

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 getProducts( string $id, string $fields = null, integer $start, integer $count)

Method to get a collection of suggested companies for the current user.

Parameters

string $id The unique identifier for a company.
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