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

Liste de tous les membres

Fonctions membres publiques

 __construct (JRegistry $options=null, JGoogleAuth $auth=null)
 listActivities ($userId, $collection, $fields=null, $max=10, $token=null, $alt=null)
 getActivity ($id, $fields=null, $alt=null)
 search ($query, $fields=null, $language=null, $max=10, $order=null, $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 activities.php.


Documentation des constructeurs et destructeur

JGoogleDataPlusActivities::__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 activities.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

JGoogleDataPlusActivities::getActivity (   $id,
  $fields = null,
  $alt = null 
)

Get an activity.

Paramètres:
string$idThe ID of the activity to get.
string$fieldsUsed to specify the fields you want returned.
string$altSpecifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default)
Renvoie:
mixed Data from Google
Depuis:
1234

Définition à la ligne 108 du fichier activities.php.

{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'activities/' . $id;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fields;
}
// Check if alt is specified.
if ($alt)
{
$url .= (strpos($url, '?') === false) ? '?alt=' : '&alt=';
$url .= $alt;
}
$jdata = $this->auth->query($url);
return json_decode($jdata->body, true);
}
else
{
return false;
}
}
JGoogleDataPlusActivities::listActivities (   $userId,
  $collection,
  $fields = null,
  $max = 10,
  $token = null,
  $alt = null 
)

List all of the activities in the specified collection for a particular user.

Paramètres:
string$userIdThe ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user.
string$collectionThe collection of activities to list. Acceptable values are: "public".
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.
string$altSpecifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default)
Renvoie:
mixed Data from Google
Depuis:
1234

Définition à la ligne 54 du fichier activities.php.

{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people/' . $userId . '/activities/' . $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 if token is specified.
if ($token)
{
$url .= (strpos($url, '?') === false) ? '?pageToken=' : '&pageToken=';
$url .= $token;
}
// Check if alt is specified.
if ($alt)
{
$url .= (strpos($url, '?') === false) ? '?alt=' : '&alt=';
$url .= $alt;
}
$jdata = $this->auth->query($url);
return json_decode($jdata->body, true);
}
else
{
return false;
}
}
JGoogleDataPlusActivities::search (   $query,
  $fields = null,
  $language = null,
  $max = 10,
  $order = null,
  $token = null 
)

Search all public activities.

Paramètres:
string$queryFull-text search query string.
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$orderSpecifies how to order search results. Acceptable values are "best" and "recent".
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 152 du fichier activities.php.

{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'activities?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 if order is specified.
if ($order)
{
$url .= '&orderBy=' . $order;
}
// 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 :