| @@ 132-144 (lines=13) @@ | ||
| 129 | * @return \stdClass |
|
| 130 | * @throws TwitchException |
|
| 131 | */ |
|
| 132 | public function userFollowChannels($user, $limit = null, $offset = null, $direction = null, $sortby = null) |
|
| 133 | { |
|
| 134 | $queryString = $this->helper->buildQueryString(array( |
|
| 135 | 'limit' => $limit, |
|
| 136 | 'offset' => $offset, |
|
| 137 | 'direction' => $direction, |
|
| 138 | 'sortby' => $sortby, |
|
| 139 | )); |
|
| 140 | ||
| 141 | $follow = new Methods\Follow($this->request); |
|
| 142 | ||
| 143 | return $follow->userFollowChannels($user, $queryString); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Get the status of a follow relationship |
|
| @@ 281-293 (lines=13) @@ | ||
| 278 | * @return \stdClass |
|
| 279 | * @throws TwitchException |
|
| 280 | */ |
|
| 281 | public function channelFollows($channelName, $limit = null, $offset = null, $cursor = null, $direction = null) |
|
| 282 | { |
|
| 283 | $queryString = $this->helper->buildQueryString(array( |
|
| 284 | 'limit' => $limit, |
|
| 285 | 'offset' => $offset, |
|
| 286 | 'cursor' => $cursor, |
|
| 287 | 'direction' => $direction, |
|
| 288 | )); |
|
| 289 | ||
| 290 | $follow = new Methods\Follow($this->request); |
|
| 291 | ||
| 292 | return $follow->getChannelFollows($channelName, $queryString); |
|
| 293 | } |
|
| 294 | ||
| 295 | /** |
|
| 296 | * Get the specified channel's stream |
|
| @@ 336-351 (lines=16) @@ | ||
| 333 | * @return \stdClass |
|
| 334 | * @throws TwitchException |
|
| 335 | */ |
|
| 336 | public function streamsSummarize($game = null, array $channels = null, $hls = null) |
|
| 337 | { |
|
| 338 | if (!empty($channels)) { |
|
| 339 | $channels = implode(',', $channels); |
|
| 340 | } |
|
| 341 | ||
| 342 | $queryString = $this->helper->buildQueryString(array( |
|
| 343 | 'game' => $game, |
|
| 344 | 'channel' => $channels, |
|
| 345 | 'hls' => $hls, |
|
| 346 | )); |
|
| 347 | ||
| 348 | $stream = new Methods\Stream($this->request); |
|
| 349 | ||
| 350 | return $stream->getSummary($queryString); |
|
| 351 | } |
|
| 352 | ||
| 353 | /** |
|
| 354 | * Get featured streams |
|
| @@ 361-372 (lines=12) @@ | ||
| 358 | * @return \stdClass |
|
| 359 | * @throws TwitchException |
|
| 360 | */ |
|
| 361 | public function streamsFeatured($limit = null, $offset = null, $hls = null) |
|
| 362 | { |
|
| 363 | $queryString = $this->helper->buildQueryString(array( |
|
| 364 | 'limit' => $limit, |
|
| 365 | 'offset' => $offset, |
|
| 366 | 'hls' => $hls, |
|
| 367 | )); |
|
| 368 | ||
| 369 | $stream = new Methods\Stream($this->request); |
|
| 370 | ||
| 371 | return $stream->getFeatured($queryString); |
|
| 372 | } |
|
| 373 | ||
| 374 | /** |
|
| 375 | * Get streams by channel |
|
| @@ 452-464 (lines=13) @@ | ||
| 449 | * @return \stdClass |
|
| 450 | * @throws TwitchException |
|
| 451 | */ |
|
| 452 | public function videosByChannel($channel, $limit = null, $offset = null, $broadcasts = null, $hls = null) |
|
| 453 | { |
|
| 454 | $queryString = $this->helper->buildQueryString(array( |
|
| 455 | 'limit' => $limit, |
|
| 456 | 'offset' => $offset, |
|
| 457 | 'broadcasts' => $broadcasts, |
|
| 458 | 'hls' => $hls, |
|
| 459 | )); |
|
| 460 | ||
| 461 | $video = new Methods\Video($this->request); |
|
| 462 | ||
| 463 | return $video->getChannelVideos($channel, $queryString); |
|
| 464 | } |
|
| 465 | ||
| 466 | /** |
|
| 467 | * Returns a links object to all other chat endpoints |
|