| @@ 139-151 (lines=13) @@ | ||
| 136 | * @return \stdClass |
|
| 137 | * @throws TwitchException |
|
| 138 | */ |
|
| 139 | public function userFollowChannels($user, $limit = null, $offset = null, $direction = null, $sortby = null) |
|
| 140 | { |
|
| 141 | $queryString = $this->helper->buildQueryString(array( |
|
| 142 | 'limit' => $limit, |
|
| 143 | 'offset' => $offset, |
|
| 144 | 'direction' => $direction, |
|
| 145 | 'sortby' => $sortby, |
|
| 146 | )); |
|
| 147 | ||
| 148 | $follow = new Methods\Follow($this->request); |
|
| 149 | ||
| 150 | return $follow->userFollowChannels($user, $queryString); |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * Get the status of a follow relationship |
|
| @@ 288-300 (lines=13) @@ | ||
| 285 | * @return \stdClass |
|
| 286 | * @throws TwitchException |
|
| 287 | */ |
|
| 288 | public function channelFollows($channelName, $limit = null, $offset = null, $cursor = null, $direction = null) |
|
| 289 | { |
|
| 290 | $queryString = $this->helper->buildQueryString(array( |
|
| 291 | 'limit' => $limit, |
|
| 292 | 'offset' => $offset, |
|
| 293 | 'cursor' => $cursor, |
|
| 294 | 'direction' => $direction, |
|
| 295 | )); |
|
| 296 | ||
| 297 | $follow = new Methods\Follow($this->request); |
|
| 298 | ||
| 299 | return $follow->getChannelFollows($channelName, $queryString); |
|
| 300 | } |
|
| 301 | ||
| 302 | /** |
|
| 303 | * Get the specified channel's stream |
|
| @@ 343-358 (lines=16) @@ | ||
| 340 | * @return \stdClass |
|
| 341 | * @throws TwitchException |
|
| 342 | */ |
|
| 343 | public function streamsSummarize($game = null, array $channels = null, $hls = null) |
|
| 344 | { |
|
| 345 | if (!empty($channels)) { |
|
| 346 | $channels = implode(',', $channels); |
|
| 347 | } |
|
| 348 | ||
| 349 | $queryString = $this->helper->buildQueryString(array( |
|
| 350 | 'game' => $game, |
|
| 351 | 'channel' => $channels, |
|
| 352 | 'hls' => $hls, |
|
| 353 | )); |
|
| 354 | ||
| 355 | $stream = new Methods\Stream($this->request); |
|
| 356 | ||
| 357 | return $stream->getSummary($queryString); |
|
| 358 | } |
|
| 359 | ||
| 360 | /** |
|
| 361 | * Get featured streams |
|
| @@ 368-379 (lines=12) @@ | ||
| 365 | * @return \stdClass |
|
| 366 | * @throws TwitchException |
|
| 367 | */ |
|
| 368 | public function streamsFeatured($limit = null, $offset = null, $hls = null) |
|
| 369 | { |
|
| 370 | $queryString = $this->helper->buildQueryString(array( |
|
| 371 | 'limit' => $limit, |
|
| 372 | 'offset' => $offset, |
|
| 373 | 'hls' => $hls, |
|
| 374 | )); |
|
| 375 | ||
| 376 | $stream = new Methods\Stream($this->request); |
|
| 377 | ||
| 378 | return $stream->getFeatured($queryString); |
|
| 379 | } |
|
| 380 | ||
| 381 | /** |
|
| 382 | * Get streams by channel |
|
| @@ 437-449 (lines=13) @@ | ||
| 434 | * @return \stdClass |
|
| 435 | * @throws TwitchException |
|
| 436 | */ |
|
| 437 | public function videosTop($limit = null, $offset = null, $game = null, $period = null) |
|
| 438 | { |
|
| 439 | $queryString = $this->helper->buildQueryString(array( |
|
| 440 | 'limit' => $limit, |
|
| 441 | 'offset' => $offset, |
|
| 442 | 'game' => $game, |
|
| 443 | 'period' => $period, |
|
| 444 | )); |
|
| 445 | ||
| 446 | $video = new Methods\Video($this->request); |
|
| 447 | ||
| 448 | return $video->getTop($queryString); |
|
| 449 | } |
|
| 450 | ||
| 451 | /** |
|
| 452 | * Get videos for a channel |
|
| @@ 461-473 (lines=13) @@ | ||
| 458 | * @return \stdClass |
|
| 459 | * @throws TwitchException |
|
| 460 | */ |
|
| 461 | public function videosByChannel($channel, $limit = null, $offset = null, $broadcasts = null, $hls = null) |
|
| 462 | { |
|
| 463 | $queryString = $this->helper->buildQueryString(array( |
|
| 464 | 'limit' => $limit, |
|
| 465 | 'offset' => $offset, |
|
| 466 | 'broadcasts' => $broadcasts, |
|
| 467 | 'hls' => $hls, |
|
| 468 | )); |
|
| 469 | ||
| 470 | $video = new Methods\Video($this->request); |
|
| 471 | ||
| 472 | return $video->getChannelVideos($channel, $queryString); |
|
| 473 | } |
|
| 474 | ||
| 475 | /** |
|
| 476 | * Returns a links object to all other chat endpoints |
|