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

Liste de tous les membres

Fonctions membres publiques

 search ($query, $callback=null, $geocode=null, $lang=null, $locale=null, $result_type=null, $count=15, $until=null, $since_id=0, $max_id=0, $entities=null)
 getSavedSearches ()
 getSavedSearchesById ($id)
 createSavedSearch ($query)
 deleteSavedSearch ($id)
- 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 search.php.


Documentation des fonctions membres

JTwittersearch::createSavedSearch (   $query)

Method to create a new saved search for the authenticated user.

Paramètres:
string$queryThe query of the search the user would like to save.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 168 du fichier search.php.

{
// Set the API path
$path = '/saved_searches/create.json';
// Set POST request data
$data['query'] = rawurlencode($query);
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}
JTwittersearch::deleteSavedSearch (   $id)

Method to delete a saved search for the authenticating user.

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

Définition à la ligne 189 du fichier search.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('saved_searches', 'destroy/:id');
// Set the API path
$path = '/saved_searches/destroy/' . $id . '.json';
// Send the request.
return $this->sendRequest($path, 'POST');
}
JTwittersearch::getSavedSearches ( )

Method to get the authenticated user's saved search queries.

Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 126 du fichier search.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('saved_searches', 'list');
// Set the API path
$path = '/saved_searches/list.json';
// Send the request.
return $this->sendRequest($path);
}
JTwittersearch::getSavedSearchesById (   $id)

Method to get the information for the saved search represented by the given id.

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

Définition à la ligne 147 du fichier search.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('saved_searches', 'show/:id');
// Set the API path
$path = '/saved_searches/show/' . $id . '.json';
// Send the request.
return $this->sendRequest($path);
}
JTwittersearch::search (   $query,
  $callback = null,
  $geocode = null,
  $lang = null,
  $locale = null,
  $result_type = null,
  $count = 15,
  $until = null,
  $since_id = 0,
  $max_id = 0,
  $entities = null 
)

Method to get tweets that match a specified query.

Paramètres:
string$querySearch query. Should be URL encoded. Queries will be limited by complexity.
string$callbackIf supplied, the response will use the JSONP format with a callback of the given name
string$geocodeReturns tweets by users located within a given radius of the given latitude/longitude. The parameter value is specified by "latitude,longitude,radius", where radius units must be specified as either "mi" (miles) or "km" (kilometers).
string$langRestricts tweets to the given language, given by an ISO 639-1 code.
string$localeSpecify the language of the query you are sending (only ja is currently effective). This is intended for language-specific clients and the default should work in the majority of cases.
string$result_typeSpecifies what type of search results you would prefer to receive. The current default is "mixed."
integer$countThe number of tweets to return per page, up to a maximum of 100. Defaults to 15.
string$untilReturns tweets generated before the given date. Date should be formatted as YYYY-MM-DD.
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.
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 discrete structure, including: urls, media and hashtags.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 43 du fichier search.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('search', 'tweets');
// Set the API path
$path = '/search/tweets.json';
// Set query parameter.
$data['q'] = rawurlencode($query);
// Check if callback is specified.
if ($callback)
{
$data['callback'] = $callback;
}
// Check if geocode is specified.
if ($geocode)
{
$data['geocode'] = $geocode;
}
// Check if lang is specified.
if ($lang)
{
$data['lang'] = $lang;
}
// Check if locale is specified.
if ($locale)
{
$data['locale'] = $locale;
}
// Check if result_type is specified.
if ($result_type)
{
$data['result_type'] = $result_type;
}
// Check if count is specified.
if ($count != 15)
{
$data['count'] = $count;
}
// Check if until is specified.
if ($until)
{
$data['until'] = $until;
}
// Check if since_id is specified.
if ($since_id > 0)
{
$data['since_id'] = $since_id;
}
// Check if max_id is specified.
if ($max_id > 0)
{
$data['max_id'] = $max_id;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Send the request.
return $this->sendRequest($path, 'GET', $data);
}

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