Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe JLinkedinJobs
+ Graphe d'héritage de JLinkedinJobs:
+ Graphe de collaboration de JLinkedinJobs:

Liste de tous les membres

Fonctions membres publiques

 getJob ($id, $fields=null)
 getBookmarked ($fields=null)
 bookmark ($id)
 deleteBookmark ($id)
 getSuggested ($fields=null, $start=0, $count=0)
 search ($fields=null, $keywords=null, $company_name=null, $job_title=null, $country_code=null, $postal_code=null, $distance=null, $facets=null, $facet=null, $start=0, $count=0, $sort=null)
- Fonctions membres publiques inherited from JLinkedinObject
 __construct (JRegistry $options=null, JHttp $client=null, JLinkedinOAuth $oauth=null)
 booleanToString ($bool)
 getOption ($key)
 setOption ($key, $value)

Additional Inherited Members

- Attributs protégés inherited from JLinkedinObject
 $options
 $client
 $oauth

Description détaillée

Définition à la ligne 19 du fichier jobs.php.


Documentation des fonctions membres

JLinkedinJobs::bookmark (   $id)

Method to bookmark a job to the current user's account.

Paramètres:
integer$idThe unique identifier for a job.
Renvoie:
array The decoded JSON response
Depuis:
13.1

Définition à la ligne 109 du fichier jobs.php.

{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 201);
// Set the API base
$base = '/v1/people/~/job-bookmarks';
// Build xml.
$xml = '<job-bookmark><job><id>' . $id . '</id></job></job-bookmark>';
// Build the request path.
$path = $this->getOption('api.url') . $base;
$header['Content-Type'] = 'text/xml';
// Send the request.
$response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header);
return $response;
}
JLinkedinJobs::deleteBookmark (   $id)

Method to delete a bookmark.

Paramètres:
integer$idThe unique identifier for a job.
Renvoie:
array The decoded JSON response
Depuis:
13.1

Définition à la ligne 147 du fichier jobs.php.

{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 204);
// Set the API base
$base = '/v1/people/~/job-bookmarks/' . $id;
// Build the request path.
$path = $this->getOption('api.url') . $base;
// Send the request.
$response = $this->oauth->oauthRequest($path, 'DELETE', $parameters);
return $response;
}
JLinkedinJobs::getBookmarked (   $fields = null)

Method to get a list of bookmarked jobs for the current member.

Paramètres:
string$fieldsRequest fields beyond the default ones.
Renvoie:
array The decoded JSON response
Depuis:
13.1

Définition à la ligne 70 du fichier jobs.php.

{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the API base
$base = '/v1/people/~/job-bookmarks';
// Set request parameters.
$data['format'] = 'json';
// Check if fields is specified.
if ($fields)
{
$base .= ':' . $fields;
}
// Build the request path.
$path = $this->getOption('api.url') . $base;
// Send the request.
$response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data);
return json_decode($response->body);
}
JLinkedinJobs::getJob (   $id,
  $fields = null 
)

Method to retrieve detailed information about a job.

Paramètres:
integer$idThe unique identifier for a job.
string$fieldsRequest fields beyond the default ones.
Renvoie:
array The decoded JSON response
Depuis:
13.1

Définition à la ligne 31 du fichier jobs.php.

{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the API base
$base = '/v1/jobs/' . $id;
// Set request parameters.
$data['format'] = 'json';
// Check if fields is specified.
if ($fields)
{
$base .= ':' . $fields;
}
// Build the request path.
$path = $this->getOption('api.url') . $base;
// Send the request.
$response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data);
return json_decode($response->body);
}
JLinkedinJobs::getSuggested (   $fields = null,
  $start = 0,
  $count = 0 
)

Method to retrieve job suggestions for the current user.

Paramètres:
string$fieldsRequest fields beyond the default ones.
integer$startStarting location within the result set for paginated returns.
integer$countThe number of results returned.
Renvoie:
array The decoded JSON response
Depuis:
13.1

Définition à la ligne 182 du fichier jobs.php.

{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the API base
$base = '/v1/people/~/suggestions/job-suggestions';
$data['format'] = 'json';
// Check if fields is specified.
if ($fields)
{
$base .= ':' . $fields;
}
// Check if start is specified.
if ($start > 0)
{
$data['start'] = $start;
}
// Check if count is specified.
if ($count > 0)
{
$data['count'] = $count;
}
// Build the request path.
$path = $this->getOption('api.url') . $base;
// Send the request.
$response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data);
return json_decode($response->body);
}
JLinkedinJobs::search (   $fields = null,
  $keywords = null,
  $company_name = null,
  $job_title = null,
  $country_code = null,
  $postal_code = null,
  $distance = null,
  $facets = null,
  $facet = null,
  $start = 0,
  $count = 0,
  $sort = null 
)

Method to search across LinkedIn's job postings.

Paramètres:
string$fieldsRequest fields beyond the default ones.
string$keywordsMembers who have all the keywords anywhere in their profile.
string$company_nameJobs with a matching company name.
string$job_titleMatches jobs with the same job title.
string$country_codeMatches members with a location in a specific country. Values are defined in by ISO 3166 standard. Country codes must be in all lower case.
integer$postal_codeMatches members centered around a Postal Code. Must be combined with the country-code parameter. Not supported for all countries.
integer$distanceMatches members within a distance from a central point. This is measured in miles.
string$facetsFacet buckets to return, e.g. location.
array$facetArray of facet values to search over. Contains values for company, date-posted, location, job-function, industry, and salary, in exactly this order, null must be specified for an element if no value.
integer$startStarting location within the result set for paginated returns.
integer$countThe number of results returned.
string$sortControls the search result order. There are four options: R (relationship), DA (date-posted-asc), DD (date-posted-desc).
Renvoie:
array The decoded JSON response
Depuis:
13.1

Définition à la ligne 247 du fichier jobs.php.

{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the API base
$base = '/v1/job-search';
$data['format'] = 'json';
// Check if fields is specified.
if ($fields)
{
$base .= ':' . $fields;
}
// Check if keywords is specified.
if ($keywords)
{
$data['keywords'] = $keywords;
}
// Check if company-name is specified.
if ($company_name)
{
$data['company-name'] = $company_name;
}
// Check if job-title is specified.
if ($job_title)
{
$data['job-title'] = $job_title;
}
// Check if country_code is specified.
if ($country_code)
{
$data['country-code'] = $country_code;
}
// Check if postal_code is specified.
if ($postal_code)
{
$data['postal-code'] = $postal_code;
}
// Check if distance is specified.
if ($distance)
{
$data['distance'] = $distance;
}
// Check if facets is specified.
if ($facets)
{
$data['facets'] = $facets;
}
// Check if facet is specified.
if ($facet)
{
$data['facet'] = array();
for ($i = 0; $i < count($facet); $i++)
{
if ($facet[$i])
{
if ($i == 0)
{
$data['facet'][] = 'company,' . $this->oauth->safeEncode($facet[$i]);
}
if ($i == 1)
{
$data['facet'][] = 'date-posted,' . $facet[$i];
}
if ($i == 2)
{
$data['facet'][] = 'location,' . $facet[$i];
}
if ($i == 3)
{
$data['facet'][] = 'job-function,' . $this->oauth->safeEncode($facet[$i]);
}
if ($i == 4)
{
$data['facet'][] = 'industry,' . $facet[$i];
}
if ($i == 5)
{
$data['facet'][] = 'salary,' . $facet[$i];
}
}
}
}
// Check if start is specified.
if ($start > 0)
{
$data['start'] = $start;
}
// Check if count is specified.
if ($count > 0)
{
$data['count'] = $count;
}
// Check if sort is specified.
if ($sort)
{
$data['sort'] = $sort;
}
// Build the request path.
$path = $this->getOption('api.url') . $base;
// Send the request.
$response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data);
return json_decode($response->body);
}

La documentation de cette classe a été générée à partir du fichier suivant :