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

Liste de tous les membres

Fonctions membres publiques

 getFavorites ($user=null, $count=20, $since_id=0, $max_id=0, $entities=null)
 createFavorites ($id, $entities=null)
 deleteFavorites ($id, $entities=null)
- Fonctions membres publiques inherited from JTwitterObject
 __construct (JRegistry &$options=null, JHttp $client=null, JTwitterOAuth $oauth=null)
 checkRateLimit ($resource=null, $action=null)
 fetchUrl ($path, $parameters=null)
 getRateLimit ($resource)
 sendRequest ($path, $method= 'GET', $data=array(), $headers=array())
 getOption ($key)
 setOption ($key, $value)

Additional Inherited Members

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

Description détaillée

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


Documentation des fonctions membres

JTwitterFavorites::createFavorites (   $id,
  $entities = null 
)

Method to favorite the status specified in the ID parameter as the authenticating user

Paramètres:
integer$idThe numerical ID of the desired status.
boolean$entitiesWhen set to true, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 90 du fichier favorites.php.

{
// Set the API path.
$path = '/favorites/create.json';
$data['id'] = $id;
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}
JTwitterFavorites::deleteFavorites (   $id,
  $entities = null 
)

Method to un-favorites the status specified in the ID parameter as the authenticating user.

Paramètres:
integer$idThe numerical ID of the desired status.
boolean$entitiesWhen set to true, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 118 du fichier favorites.php.

{
// Set the API path.
$path = '/favorites/destroy.json';
$data['id'] = $id;
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}
JTwitterFavorites::getFavorites (   $user = null,
  $count = 20,
  $since_id = 0,
  $max_id = 0,
  $entities = null 
)

Method to get the most recent favorite statuses for the authenticating or specified user.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
integer$countSpecifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included in the count, so it is always suggested to set $include_rts to true
integer$since_idReturns results with an ID greater than (that is, more recent than) the specified ID.
integer$max_idReturns results with an ID less than (that is, older than) the specified ID.
boolean$entitiesWhen set to true, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 36 du fichier favorites.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('favorites', 'list');
// Set the API path.
$path = '/favorites/list.json';
// Determine which type of data was passed for $user
if (is_numeric($user))
{
$data['user_id'] = $user;
}
elseif (is_string($user))
{
$data['screen_name'] = $user;
}
// Set the count string
$data['count'] = $count;
// Check if since_id is specified.
if ($since_id > 0)
{
$data['since_id'] = $since_id;
}
// Check if max_id is specified.
if ($max_id > 0)
{
$data['max_id'] = $max_id;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}

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