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

Liste de tous les membres

Fonctions membres publiques

 getBlocking ($stringify_ids=null, $cursor=null)
 block ($user, $entities=null, $skip_status=null)
 unblock ($user, $entities=null, $skip_status=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 block.php.


Documentation des fonctions membres

JTwitterBlock::block (   $user,
  $entities = null,
  $skip_status = null 
)

Method to block the specified user from following the authenticating user.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
boolean$entitiesWhen set to either true, t or 1, 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
Exceptions:
RuntimeException

Définition à la ligne 72 du fichier block.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('blocks', 'create');
// 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');
}
// Check if entities is specified
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Check if skip_statuses is specified
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
// Set the API path
$path = '/blocks/create.json';
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}
JTwitterBlock::getBlocking (   $stringify_ids = null,
  $cursor = null 
)

Method to get the user ids the authenticating user is blocking.

Paramètres:
boolean$stringify_idsProvide this option to have ids returned as strings instead.
integer$cursorCauses 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."
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 33 du fichier block.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('blocks', 'ids');
$data = array();
// Check if stringify_ids is specified
if (!is_null($stringify_ids))
{
$data['stringify_ids'] = $stringify_ids;
}
// Check if cursor is specified
if (!is_null($stringify_ids))
{
$data['cursor'] = $cursor;
}
// Set the API path
$path = '/blocks/ids.json';
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterBlock::unblock (   $user,
  $entities = null,
  $skip_status = null 
)

Method to unblock the specified user from following the authenticating user.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
boolean$entitiesWhen set to either true, t or 1, 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
Exceptions:
RuntimeException

Définition à la ligne 124 du fichier block.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('blocks', 'destroy');
// 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');
}
// Check if entities is specified
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Check if skip_statuses is specified
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
// Set the API path
$path = '/blocks/destroy.json';
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}

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