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

Liste de tous les membres

Fonctions membres publiques

 getUsersLookup ($screen_name=null, $id=null, $entities=null)
 getUserProfileBanner ($user)
 searchUsers ($query, $page=0, $count=0, $entities=null)
 getUser ($user, $entities=null)
 getContributees ($user, $entities=null, $skip_status=null)
 getContributors ($user, $entities=null, $skip_status=null)
 getSuggestions ($lang=null)
 getSuggestionsSlug ($slug, $lang=null)
 getSuggestionsSlugMembers ($slug)
- 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 users.php.


Documentation des fonctions membres

JTwitterUsers::getContributees (   $user,
  $entities = null,
  $skip_status = null 
)

Method to get an array of users that the specified user can contribute to.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
boolean$entitiesSet to true to return IDs as strings, false to return as integers.
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 205 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'contributees');
// 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');
}
// Set the API path
$path = '/users/contributees.json';
// 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);
}
JTwitterUsers::getContributors (   $user,
  $entities = null,
  $skip_status = null 
)

Method to get an array of users who can contribute to the specified account.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
boolean$entitiesSet to true to return IDs as strings, false to return as integers.
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 256 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'contributors');
// 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');
}
// Set the API path
$path = '/users/contributors.json';
// 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);
}
JTwitterUsers::getSuggestions (   $lang = null)

Method access to Twitter's suggested user list.

Paramètres:
boolean$langRestricts the suggested categories to the requested language.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 304 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'suggestions');
// Set the API path
$path = '/users/suggestions.json';
$data = array();
// Check if entities is true
if ($lang)
{
$data['lang'] = $lang;
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterUsers::getSuggestionsSlug (   $slug,
  $lang = null 
)

method to access the users in a given category of the Twitter suggested user list.

Paramètres:
string$slugThe short name of list or a category.
boolean$langRestricts the suggested categories to the requested language.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 334 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'suggestions/:slug');
// Set the API path
$path = '/users/suggestions/' . $slug . '.json';
$data = array();
// Check if entities is true
if ($lang)
{
$data['lang'] = $lang;
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterUsers::getSuggestionsSlugMembers (   $slug)

Method to access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user.

Paramètres:
string$slugThe short name of list or a category.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 364 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'suggestions/:slug/members');
// Set the API path
$path = '/users/suggestions/' . $slug . '/members.json';
// Send the request.
return $this->sendRequest($path);
}
JTwitterUsers::getUser (   $user,
  $entities = null 
)

Method to get extended information of a given user, specified by ID or screen name as per the required id parameter.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
boolean$entitiesSet to true to return IDs as strings, false to return as integers.
Renvoie:
array The decoded JSON response
Depuis:
12.3
Exceptions:
RuntimeException

Définition à la ligne 160 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'show');
// 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');
}
// Set the API path
$path = '/users/show.json';
// Check if entities is specified
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterUsers::getUserProfileBanner (   $user)

Method to access the profile banner in various sizes for the user with the indicated screen_name.

Paramètres:
mixed$userEither an integer containing the user ID or a string containing the screen name.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 76 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'profile_banner');
// Set the API path
$path = '/users/profile_banner.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');
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}
JTwitterUsers::getUsersLookup (   $screen_name = null,
  $id = null,
  $entities = null 
)

Method to get up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.

Paramètres:
string$screen_nameA comma separated list of screen names, up to 100 are allowed in a single request.
string$idA comma separated list of user IDs, up to 100 are allowed in a single request.
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.
Renvoie:
array The decoded JSON response
Depuis:
12.3
Exceptions:
RuntimeException

Définition à la ligne 34 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'lookup');
// Set user IDs and screen names.
if ($id)
{
$data['user_id'] = $id;
}
if ($screen_name)
{
$data['screen_name'] = $screen_name;
}
if ($id == null && $screen_name == null)
{
// We don't have a valid entry
throw new RuntimeException('You must specify either a comma separated list of screen names, user IDs, or a combination of the two');
}
// Set the API path
$path = '/users/lookup.json';
// Check if string_ids is specified
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}
JTwitterUsers::searchUsers (   $query,
  $page = 0,
  $count = 0,
  $entities = null 
)

Method used to search for users

Paramètres:
string$queryThe search query to run against people search.
integer$pageSpecifies the page of results to retrieve.
integer$countThe number of people to retrieve. Maximum of 20 allowed per page.
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.
Renvoie:
array The decoded JSON response
Depuis:
12.3
Exceptions:
RuntimeException

Définition à la ligne 117 du fichier users.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('users', 'search');
$data['q'] = rawurlencode($query);
// Check if page is specified.
if ($page > 0 )
{
$data['page'] = $page;
}
// Check if per_page is specified
if ($count > 0)
{
$data['count'] = $count;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Set the API path
$path = '/users/search.json';
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}

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