10 defined(
'JPATH_PLATFORM') or die();
43 public function search($query, $callback = null, $geocode = null, $lang = null, $locale = null, $result_type = null, $count = 15,
44 $until = null, $since_id = 0, $max_id = 0, $entities = null)
47 $this->checkRateLimit(
'search',
'tweets');
50 $path =
'/search/tweets.json';
53 $data[
'q'] = rawurlencode($query);
58 $data[
'callback'] = $callback;
64 $data[
'geocode'] = $geocode;
70 $data[
'lang'] = $lang;
76 $data[
'locale'] = $locale;
82 $data[
'result_type'] = $result_type;
88 $data[
'count'] = $count;
94 $data[
'until'] = $until;
100 $data[
'since_id'] = $since_id;
106 $data[
'max_id'] = $max_id;
110 if (!is_null($entities))
112 $data[
'include_entities'] = $entities;
116 return $this->sendRequest($path,
'GET', $data);
126 public function getSavedSearches()
129 $this->checkRateLimit(
'saved_searches',
'list');
132 $path =
'/saved_searches/list.json';
135 return $this->sendRequest($path);
147 public function getSavedSearchesById($id)
150 $this->checkRateLimit(
'saved_searches',
'show/:id');
153 $path =
'/saved_searches/show/' . $id .
'.json';
156 return $this->sendRequest($path);
168 public function createSavedSearch($query)
171 $path =
'/saved_searches/create.json';
174 $data[
'query'] = rawurlencode($query);
177 return $this->sendRequest($path,
'POST', $data);
189 public function deleteSavedSearch($id)
192 $this->checkRateLimit(
'saved_searches',
'destroy/:id');
195 $path =
'/saved_searches/destroy/' . $id .
'.json';
198 return $this->sendRequest($path,
'POST');