| @@ 615-632 (lines=18) @@ | ||
| 612 | * @return \stdClass |
|
| 613 | * @throws TwitchException |
|
| 614 | */ |
|
| 615 | public function authChannelSubscriptions($token, $channel, $limit = 25, $offset = 0, $direction = 'DESC') |
|
| 616 | { |
|
| 617 | if ($this->authConfig === false) { |
|
| 618 | $this->authConfigException(); |
|
| 619 | } |
|
| 620 | ||
| 621 | $queryString = $this->helper->buildQueryString(array( |
|
| 622 | 'oauth_token' => $token, |
|
| 623 | 'client_id' => $this->authConfig['client_id'], |
|
| 624 | 'direction' => $direction, |
|
| 625 | 'limit' => $limit, |
|
| 626 | 'offset' => $offset |
|
| 627 | )); |
|
| 628 | ||
| 629 | $channels = new Methods\Subscription; |
|
| 630 | ||
| 631 | $channels->getSubscriptions($channel, $queryString); |
|
| 632 | } |
|
| 633 | ||
| 634 | /** |
|
| 635 | * List the live streams that the authenticated user is following |
|
| @@ 644-660 (lines=17) @@ | ||
| 641 | * @return \stdClass |
|
| 642 | * @throws TwitchException |
|
| 643 | */ |
|
| 644 | public function authStreamsFollowed($token, $limit = 25, $offset = 0, $hls = null) |
|
| 645 | { |
|
| 646 | if ($this->authConfig === false) { |
|
| 647 | $this->authConfigException(); |
|
| 648 | } |
|
| 649 | ||
| 650 | $queryString = $this->helper->buildQueryString(array( |
|
| 651 | 'oauth_token' => $token, |
|
| 652 | 'client_id' => $this->authConfig['client_id'], |
|
| 653 | 'limit' => $limit, |
|
| 654 | 'offset' => $offset, |
|
| 655 | 'hls' => $hls, |
|
| 656 | )); |
|
| 657 | ||
| 658 | $user = new Methods\User($this->request); |
|
| 659 | return $user->getFollowedStreams($queryString); |
|
| 660 | } |
|
| 661 | ||
| 662 | /** |
|
| 663 | * Get streams helper |
|