10 defined(
'JPATH_PLATFORM') or die();
36 public function getFavorites($user = null, $count = 20, $since_id = 0, $max_id = 0, $entities = null)
39 $this->checkRateLimit(
'favorites',
'list');
42 $path =
'/favorites/list.json';
45 if (is_numeric($user))
47 $data[
'user_id'] = $user;
49 elseif (is_string($user))
51 $data[
'screen_name'] = $user;
55 $data[
'count'] = $count;
60 $data[
'since_id'] = $since_id;
66 $data[
'max_id'] = $max_id;
70 if (!is_null($entities))
72 $data[
'include_entities'] = $entities;
76 return $this->sendRequest($path,
'GET', $data);
90 public function createFavorites($id, $entities = null)
93 $path =
'/favorites/create.json';
98 if (!is_null($entities))
100 $data[
'include_entities'] = $entities;
104 return $this->sendRequest($path,
'POST', $data);
118 public function deleteFavorites($id, $entities = null)
121 $path =
'/favorites/destroy.json';
126 if (!is_null($entities))
128 $data[
'include_entities'] = $entities;
132 return $this->sendRequest($path,
'POST', $data);