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 JGoogleDataPlusPeople
+ Graphe d'héritage de JGoogleDataPlusPeople:
+ Graphe de collaboration de JGoogleDataPlusPeople:

Liste de tous les membres

Fonctions membres publiques

 __construct (JRegistry $options=null, JGoogleAuth $auth=null)
 getPeople ($id, $fields=null)
 search ($query, $fields=null, $language=null, $max=10, $token=null)
 listByActivity ($activityId, $collection, $fields=null, $max=10, $token=null)
- Fonctions membres publiques inherited from JGoogleData
 authenticate ()
 isAuthenticated ()
 getOption ($key)
 setOption ($key, $value)

Additional Inherited Members

- Fonctions membres protégées inherited from JGoogleData
 listGetData ($url, $maxpages=1, $token=null)
 query ($url, $data=null, $headers=null, $method= 'get')
- Fonctions membres protégées statiques inherited from JGoogleData
static safeXML ($data)
- Attributs protégés inherited from JGoogleData
 $options
 $auth

Description détaillée

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


Documentation des constructeurs et destructeur

JGoogleDataPlusPeople::__construct ( JRegistry  $options = null,
JGoogleAuth  $auth = null 
)

Constructor.

Paramètres:
JRegistry$optionsGoogle options object
JGoogleAuth$authGoogle data http client object
Depuis:
1234

Réimplémentée à partir de JGoogleData.

Définition à la ligne 29 du fichier people.php.

{
parent::__construct($options, $auth);
if (isset($this->auth) && !$this->auth->getOption('scope'))
{
$this->auth->setOption('scope', 'https://www.googleapis.com/auth/plus.me');
}
}

Documentation des fonctions membres

JGoogleDataPlusPeople::getPeople (   $id,
  $fields = null 
)

Get a person's profile.

Paramètres:
string$idThe ID of the person to get the profile for. The special value "me" can be used to indicate the authenticated user.
string$fieldsUsed to specify the fields you want returned.
Renvoie:
mixed Data from Google
Depuis:
1234

Définition à la ligne 49 du fichier people.php.

{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people/' . $id;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fields;
}
$jdata = $this->auth->query($url);
return json_decode($jdata->body, true);
}
else
{
return false;
}
}
JGoogleDataPlusPeople::listByActivity (   $activityId,
  $collection,
  $fields = null,
  $max = 10,
  $token = null 
)

List all of the people in the specified collection for a particular activity.

Paramètres:
string$activityIdThe ID of the activity to get the list of people for.
string$collectionThe collection of people to list. Acceptable values are "plusoners" and "resharers".
string$fieldsUsed to specify the fields you want returned.
integer$maxThe maximum number of people to include in the response, used for paging.
string$tokenThe continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. This token may be of any length.
Renvoie:
mixed Data from Google
Depuis:
1234

Définition à la ligne 139 du fichier people.php.

{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'activities/' . $activityId . '/people/' . $collection;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fields;
}
// Check if max is specified.
if ($max != 10)
{
$url .= (strpos($url, '?') === false) ? '?maxResults=' : '&maxResults=';
$url .= $max;
}
// Check of token is specified.
if ($token)
{
$url .= (strpos($url, '?') === false) ? '?pageToken=' : '&pageToken=';
$url .= $token;
}
$jdata = $this->auth->query($url);
return json_decode($jdata->body, true);
}
else
{
return false;
}
}
JGoogleDataPlusPeople::search (   $query,
  $fields = null,
  $language = null,
  $max = 10,
  $token = null 
)

Search all public profiles.

Paramètres:
string$querySpecify a query string for full text search of public text in all profiles.
string$fieldsUsed to specify the fields you want returned.
string$languageSpecify the preferred language to search with. https://developers.google.com/+/api/search#available-languages
integer$maxThe maximum number of people to include in the response, used for paging.
string$tokenThe continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. This token may be of any length.
Renvoie:
mixed Data from Google
Depuis:
1234

Définition à la ligne 85 du fichier people.php.

{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people?query=' . urlencode($query);
// Check if fields is specified.
if ($fields)
{
$url .= '&fields=' . $fields;
}
// Check if language is specified.
if ($language)
{
$url .= '&language=' . $language;
}
// Check if max is specified.
if ($max != 10)
{
$url .= '&maxResults=' . $max;
}
// Check of token is specified.
if ($token)
{
$url .= '&pageToken=' . $token;
}
$jdata = $this->auth->query($url);
return json_decode($jdata->body, true);
}
else
{
return false;
}
}

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