Liste de tous les membres
Fonctions membres publiques |
| getFriendIds ($user, $cursor=null, $string_ids=null, $count=0) |
| getFriendshipDetails ($user_a, $user_b) |
| getFollowerIds ($user, $cursor=null, $string_ids=null, $count=0) |
| getFriendshipsIncoming ($cursor=null, $string_ids=null) |
| getFriendshipsOutgoing ($cursor=null, $string_ids=null) |
| follow ($user, $follow=false) |
| unfollow ($user) |
| getFriendshipsLookup ($screen_name=null, $id=null) |
| updateFriendship ($user, $device=null, $retweets=null) |
| getFriendshipNoRetweetIds ($string_ids=null) |
Additional Inherited Members |
Description détaillée
Définition à la ligne 19 du fichier friends.php.
Documentation des fonctions membres
JTwitterFriends::follow |
( |
|
$user, |
|
|
|
$follow = false |
|
) |
| |
Allows the authenticating users to follow the user specified in the ID parameter.
- Paramètres:
-
mixed | $user | Either an integer containing the user ID or a string containing the screen name. |
boolean | $follow | Enable notifications for the target user. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 281 du fichier friends.php.
{
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');
}
if ($follow)
{
$data['follow'] = $follow;
}
$path = '/friendships/create.json';
}
JTwitterFriends::getFollowerIds |
( |
|
$user, |
|
|
|
$cursor = null , |
|
|
|
$string_ids = null , |
|
|
|
$count = 0 |
|
) |
| |
Method to get an array of user IDs the specified user is followed by.
- Paramètres:
-
mixed | $user | Either an integer containing the user ID or a string containing the screen name. |
integer | $cursor | Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page." |
boolean | $string_ids | Set to true to return IDs as strings, false to return as integers. |
integer | $count | Specifies the number of IDs attempt retrieval of, up to a maximum of 5,000 per distinct request. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 149 du fichier friends.php.
{
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');
}
$path = '/followers/ids.json';
if (!is_null($cursor))
{
$data['cursor'] = $cursor;
}
if (!is_null($string_ids))
{
$data['stringify_ids'] = $string_ids;
}
if (!is_null($count))
{
$data['count'] = $count;
}
}
JTwitterFriends::getFriendIds |
( |
|
$user, |
|
|
|
$cursor = null , |
|
|
|
$string_ids = null , |
|
|
|
$count = 0 |
|
) |
| |
Method to get an array of user IDs the specified user follows.
- Paramètres:
-
mixed | $user | Either an integer containing the user ID or a string containing the screen name. |
integer | $cursor | Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page." |
boolean | $string_ids | Set to true to return IDs as strings, false to return as integers. |
integer | $count | Specifies the number of IDs attempt retrieval of, up to a maximum of 5,000 per distinct request. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 36 du fichier friends.php.
{
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');
}
if (!is_null($cursor))
{
$data['cursor'] = $cursor;
}
if ($string_ids)
{
$data['stringify_ids'] = $string_ids;
}
if ($count > 0)
{
$data['count'] = $count;
}
$path = '/friends/ids.json';
}
JTwitterFriends::getFriendshipDetails |
( |
|
$user_a, |
|
|
|
$user_b |
|
) |
| |
Method to display detailed friend information between two users.
- Paramètres:
-
mixed | $user_a | Either an integer containing the user ID or a string containing the screen name of the first user. |
mixed | $user_b | Either an integer containing the user ID or a string containing the screen name of the second user. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 92 du fichier friends.php.
{
if (is_numeric($user_a))
{
$data['source_id'] = $user_a;
}
elseif (is_string($user_a))
{
$data['source_screen_name'] = $user_a;
}
else
{
throw new RuntimeException('The first specified username is not in the correct format; must use integer or string');
}
if (is_numeric($user_b))
{
$data['target_id'] = $user_b;
}
elseif (is_string($user_b))
{
$data['target_screen_name'] = $user_b;
}
else
{
throw new RuntimeException('The second specified username is not in the correct format; must use integer or string');
}
$path = '/friendships/show.json';
}
JTwitterFriends::getFriendshipNoRetweetIds |
( |
|
$string_ids = null | ) |
|
Method to get the user ids that currently authenticated user does not want to see retweets from.
- Paramètres:
-
boolean | $string_ids | Set to true to return IDs as strings, false to return as integers. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
Définition à la ligne 440 du fichier friends.php.
{
$data = array();
if (!is_null($string_ids))
{
$data['stringify_ids'] = $string_ids;
}
$path = '/friendships/no_retweets/ids.json';
}
JTwitterFriends::getFriendshipsIncoming |
( |
|
$cursor = null , |
|
|
|
$string_ids = null |
|
) |
| |
Method to determine pending requests to follow the authenticating user.
- Paramètres:
-
integer | $cursor | Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page." |
boolean | $string_ids | Set to true to return IDs as strings, false to return as integers. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
Définition à la ligne 206 du fichier friends.php.
{
$data = array();
if (!is_null($cursor))
{
$data['cursor'] = $cursor;
}
if (!is_null($string_ids))
{
$data['stringify_ids'] = $string_ids;
}
$path = '/friendships/incoming.json';
}
JTwitterFriends::getFriendshipsLookup |
( |
|
$screen_name = null , |
|
|
|
$id = null |
|
) |
| |
Method to get the relationship of the authenticating user to the comma separated list of up to 100 screen_names or user_ids provided.
- Paramètres:
-
string | $screen_name | A comma separated list of screen names, up to 100 are allowed in a single request. |
string | $id | A comma separated list of user IDs, up to 100 are allowed in a single request. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 356 du fichier friends.php.
{
if ($id)
{
$data['user_id'] = $id;
}
if ($screen_name)
{
$data['screen_name'] = $screen_name;
}
if ($id == null && $screen_name == null)
{
throw new RuntimeException('You must specify either a comma separated list of screen names, user IDs, or a combination of the two');
}
$path = '/friendships/lookup.json';
}
JTwitterFriends::getFriendshipsOutgoing |
( |
|
$cursor = null , |
|
|
|
$string_ids = null |
|
) |
| |
Method to determine every protected user for whom the authenticating user has a pending follow request.
- Paramètres:
-
integer | $cursor | Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page." |
boolean | $string_ids | Set to true to return IDs as strings, false to return as integers. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
Définition à la ligne 244 du fichier friends.php.
{
$data = array();
if (!is_null($cursor))
{
$data['cursor'] = $cursor;
}
if (!is_null($string_ids))
{
$data['stringify_ids'] = $string_ids;
}
$path = '/friendships/outgoing.json';
}
JTwitterFriends::unfollow |
( |
|
$user | ) |
|
Allows the authenticating users to unfollow the user specified in the ID parameter.
- Paramètres:
-
mixed | $user | Either an integer containing the user ID or a string containing the screen name. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 321 du fichier friends.php.
{
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');
}
$path = '/friendships/destroy.json';
}
JTwitterFriends::updateFriendship |
( |
|
$user, |
|
|
|
$device = null , |
|
|
|
$retweets = null |
|
) |
| |
Allows one to enable or disable retweets and device notifications from the specified user.
- Paramètres:
-
mixed | $user | Either an integer containing the user ID or a string containing the screen name. |
boolean | $device | Enable/disable device notifications from the target user. |
boolean | $retweets | Enable/disable retweets from the target user. |
- Renvoie:
- array The decoded JSON response
- Depuis:
- 12.3
- Exceptions:
-
Définition à la ligne 395 du fichier friends.php.
{
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');
}
if (!is_null($device))
{
$data['device'] = $device;
}
if (!is_null($retweets))
{
$data['retweets'] = $retweets;
}
$path = '/friendships/update.json';
}
La documentation de cette classe a été générée à partir du fichier suivant :