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

Liste de tous les membres

Fonctions membres publiques

 getDirectMessages ($since_id=0, $max_id=0, $count=20, $entities=null, $skip_status=null)
 getSentDirectMessages ($since_id=0, $max_id=0, $count=20, $page=0, $entities=null)
 sendDirectMessages ($user, $text)
 getDirectMessagesById ($id)
 deleteDirectMessages ($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 directmessages.php.


Documentation des fonctions membres

JTwitterDirectmessages::deleteDirectMessages (   $id,
  $entities = null 
)

Method to delete the direct message specified in the required ID parameter.

Paramètres:
integer$idThe ID of the direct message.
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 204 du fichier directmessages.php.

{
// Set the API path
$path = '/direct_messages/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);
}
JTwitterDirectmessages::getDirectMessages (   $since_id = 0,
  $max_id = 0,
  $count = 20,
  $entities = null,
  $skip_status = null 
)

Method to get the most recent direct messages sent to the authenticating user.

Paramètres:
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) or equal to the specified ID.
integer$countSpecifies the number of direct messages to try and retrieve, up to a maximum of 200.
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.
boolean$skip_statusWhen set to either true, t or 1 statuses will not be included in the returned user objects.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 35 du fichier directmessages.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('direct_messages');
// Set the API path
$path = '/direct_messages.json';
// Check if since_id is specified.
if ($since_id)
{
$data['since_id'] = $since_id;
}
// Check if max_id is specified.
if ($max_id)
{
$data['max_id'] = $max_id;
}
// Check if count is specified.
if ($count)
{
$data['count'] = $count;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Check if skip_status is specified.
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterDirectmessages::getDirectMessagesById (   $id)

Method to get a single direct message, specified by an id parameter.

Paramètres:
integer$idThe ID of the direct message.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 179 du fichier directmessages.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('direct_messages', 'show');
// Set the API path
$path = '/direct_messages/show.json';
$data['id'] = $id;
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterDirectmessages::getSentDirectMessages (   $since_id = 0,
  $max_id = 0,
  $count = 20,
  $page = 0,
  $entities = null 
)

Method to get the most recent direct messages sent by the authenticating user.

Paramètres:
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) or equal to the specified ID.
integer$countSpecifies the number of direct messages to try and retrieve, up to a maximum of 200.
integer$pageSpecifies the page of results to retrieve.
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 91 du fichier directmessages.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('direct_messages', 'sent');
// Set the API path
$path = '/direct_messages/sent.json';
// Check if since_id is specified.
if ($since_id)
{
$data['since_id'] = $since_id;
}
// Check if max_id is specified.
if ($max_id)
{
$data['max_id'] = $max_id;
}
// Check if count is specified.
if ($count)
{
$data['count'] = $count;
}
// Check if page is specified.
if ($page)
{
$data['page'] = $page;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterDirectmessages::sendDirectMessages (   $user,
  $text 
)

Method to send a new direct message to the specified user from the authenticating user.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
string$textThe text of your direct message. Be sure to keep the message under 140 characters.
Renvoie:
array The decoded JSON response
Depuis:
12.3
Exceptions:
RuntimeException

Définition à la ligne 144 du fichier directmessages.php.

{
// Set the API path
$path = '/direct_messages/new.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;
}
else
{
// We don't have a valid entry
throw new RuntimeException('The specified username is not in the correct format; must use integer or string');
}
$data['text'] = $text;
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}

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