10 defined(
'JPATH_PLATFORM') or die();
33 public function getBlocking($stringify_ids = null, $cursor = null)
36 $this->checkRateLimit(
'blocks',
'ids');
41 if (!is_null($stringify_ids))
43 $data[
'stringify_ids'] = $stringify_ids;
47 if (!is_null($stringify_ids))
49 $data[
'cursor'] = $cursor;
53 $path =
'/blocks/ids.json';
56 return $this->sendRequest($path,
'GET', $data);
72 public function block($user, $entities = null, $skip_status = null)
75 $this->checkRateLimit(
'blocks',
'create');
78 if (is_numeric($user))
80 $data[
'user_id'] = $user;
82 elseif (is_string($user))
84 $data[
'screen_name'] = $user;
89 throw new RuntimeException(
'The specified username is not in the correct format; must use integer or string');
93 if (!is_null($entities))
95 $data[
'include_entities'] = $entities;
99 if (!is_null($skip_status))
101 $data[
'skip_status'] = $skip_status;
105 $path =
'/blocks/create.json';
108 return $this->sendRequest($path,
'POST', $data);
124 public function unblock($user, $entities = null, $skip_status = null)
127 $this->checkRateLimit(
'blocks',
'destroy');
130 if (is_numeric($user))
132 $data[
'user_id'] = $user;
134 elseif (is_string($user))
136 $data[
'screen_name'] = $user;
141 throw new RuntimeException(
'The specified username is not in the correct format; must use integer or string');
145 if (!is_null($entities))
147 $data[
'include_entities'] = $entities;
151 if (!is_null($skip_status))
153 $data[
'skip_status'] = $skip_status;
157 $path =
'/blocks/destroy.json';
160 return $this->sendRequest($path,
'POST', $data);