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) |
Additional Inherited Members |
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 | $id | The ID of the direct message. |
boolean | $entities | When 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.
{
$path = '/direct_messages/destroy.json';
$data['id'] = $id;
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
}
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_id | Returns results with an ID greater than (that is, more recent than) the specified ID. |
integer | $max_id | Returns results with an ID less than (that is, older than) or equal to the specified ID. |
integer | $count | Specifies the number of direct messages to try and retrieve, up to a maximum of 200. |
boolean | $entities | When 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_status | When 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.
{
$path = '/direct_messages.json';
if ($since_id)
{
$data['since_id'] = $since_id;
}
if ($max_id)
{
$data['max_id'] = $max_id;
}
if ($count)
{
$data['count'] = $count;
}
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
}
JTwitterDirectmessages::getDirectMessagesById |
( |
|
$id | ) |
|
Method to get a single direct message, specified by an id parameter.
- Paramètres:
-
integer | $id | The ID of the direct message. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
Définition à la ligne 179 du fichier directmessages.php.
{
$path = '/direct_messages/show.json';
$data['id'] = $id;
}
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_id | Returns results with an ID greater than (that is, more recent than) the specified ID. |
integer | $max_id | Returns results with an ID less than (that is, older than) or equal to the specified ID. |
integer | $count | Specifies the number of direct messages to try and retrieve, up to a maximum of 200. |
integer | $page | Specifies the page of results to retrieve. |
boolean | $entities | When 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.
{
$path = '/direct_messages/sent.json';
if ($since_id)
{
$data['since_id'] = $since_id;
}
if ($max_id)
{
$data['max_id'] = $max_id;
}
if ($count)
{
$data['count'] = $count;
}
if ($page)
{
$data['page'] = $page;
}
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
}
JTwitterDirectmessages::sendDirectMessages |
( |
|
$user, |
|
|
|
$text |
|
) |
| |
Method to send a new direct message to the specified user from the authenticating user.
- Paramètres:
-
mixed | $user | Either an integer containing the user ID or a string containing the screen name. |
string | $text | The text of your direct message. Be sure to keep the message under 140 characters. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 144 du fichier directmessages.php.
{
$path = '/direct_messages/new.json';
if (is_numeric($user))
{
$data['user_id'] = $user;
}
elseif (is_string($user))
{
$data['screen_name'] = $user;
}
else
{
throw new RuntimeException('The specified username is not in the correct format; must use integer or string');
}
$data['text'] = $text;
}
La documentation de cette classe a été générée à partir du fichier suivant :