| @@ 159-169 (lines=11) @@ | ||
| 156 | * @return \stdClass |
|
| 157 | * @throws TwitchException |
|
| 158 | */ |
|
| 159 | public function userFollowChannel($user, $channel, $userToken, $notifications = false) |
|
| 160 | { |
|
| 161 | $queryString = $this->helper->buildQueryString(array( |
|
| 162 | 'oauth_token' => $userToken, |
|
| 163 | 'notifications' => $notifications, |
|
| 164 | )); |
|
| 165 | ||
| 166 | $follow = new Methods\Follow($this->request); |
|
| 167 | ||
| 168 | return $follow->followChannel($user, $channel, $queryString); |
|
| 169 | } |
|
| 170 | ||
| 171 | /** |
|
| 172 | * Set user to unfollow given channel |
|
| @@ 180-189 (lines=10) @@ | ||
| 177 | * @return \stdClass |
|
| 178 | * @throws TwitchException |
|
| 179 | */ |
|
| 180 | public function userUnfollowChannel($user, $channel, $userToken) |
|
| 181 | { |
|
| 182 | $queryString = $this->helper->buildQueryString(array( |
|
| 183 | 'oauth_token' => $userToken, |
|
| 184 | )); |
|
| 185 | ||
| 186 | $follow = new Methods\Follow($this->request); |
|
| 187 | ||
| 188 | return $follow->unfollowChannel($user, $channel, $queryString); |
|
| 189 | } |
|
| 190 | ||
| 191 | /** |
|
| 192 | * Get the specified channel |
|
| @@ 237-247 (lines=11) @@ | ||
| 234 | * @return \stdClass |
|
| 235 | * @throws TwitchException |
|
| 236 | */ |
|
| 237 | public function teamList($limit = null, $offset = null) |
|
| 238 | { |
|
| 239 | $queryString = $this->helper->buildQueryString(array( |
|
| 240 | 'limit' => $limit, |
|
| 241 | 'offset' => $offset, |
|
| 242 | )); |
|
| 243 | ||
| 244 | $team = new Methods\Team($this->request); |
|
| 245 | ||
| 246 | return $team->getTeams($queryString); |
|
| 247 | } |
|
| 248 | ||
| 249 | /** |
|
| 250 | * Get all team members |
|
| @@ 306-315 (lines=10) @@ | ||
| 303 | * @throws TwitchException |
|
| 304 | * @deprecated will be replaced by getStreams() function |
|
| 305 | */ |
|
| 306 | public function streamSearch($query, $limit = null, $offset = null) |
|
| 307 | { |
|
| 308 | $queryString = $this->helper->buildQueryString(array( |
|
| 309 | 'query' => $query, |
|
| 310 | 'limit' => $limit, |
|
| 311 | 'offset' => $offset, |
|
| 312 | )); |
|
| 313 | ||
| 314 | return $this->request->request(self::URI_STREAMS_SEARCH . $queryString); |
|
| 315 | } |
|
| 316 | ||
| 317 | /** |
|
| 318 | * Summarize streams |
|
| @@ 486-495 (lines=10) @@ | ||
| 483 | * @return \stdClass |
|
| 484 | * @throws TwitchException |
|
| 485 | */ |
|
| 486 | public function chatEmoticonsImages($emoteset = null) |
|
| 487 | { |
|
| 488 | $queryString = $this->helper->buildQueryString(array( |
|
| 489 | 'emotesets' => $emoteset, |
|
| 490 | )); |
|
| 491 | ||
| 492 | $chat = new Methods\Chat($this->request); |
|
| 493 | ||
| 494 | return $chat->getEmoticonImages($queryString); |
|
| 495 | } |
|
| 496 | ||
| 497 | /** |
|
| 498 | * Returns a list of chat badges |
|
| @@ 517-527 (lines=11) @@ | ||
| 514 | * @return \stdClass |
|
| 515 | * @throws TwitchException |
|
| 516 | */ |
|
| 517 | public function gamesTop($limit = null, $offset = null) |
|
| 518 | { |
|
| 519 | $queryString = $this->helper->buildQueryString(array( |
|
| 520 | 'limit' => $limit, |
|
| 521 | 'offset' => $offset, |
|
| 522 | )); |
|
| 523 | ||
| 524 | $game = new Methods\Game($this->request); |
|
| 525 | ||
| 526 | return $game->getTop($queryString); |
|
| 527 | } |
|
| 528 | ||
| 529 | /** |
|
| 530 | * Get HTML code for stream embedding |
|