| @@ 638-655 (lines=18) @@ | ||
| 635 | * @return \stdClass |
|
| 636 | * @throws TwitchException |
|
| 637 | */ |
|
| 638 | public function authChannelSubscriptions($token, $channel, $limit = 25, $offset = 0, $direction = 'DESC') |
|
| 639 | { |
|
| 640 | if ($this->authConfig === false) { |
|
| 641 | $this->authConfigException(); |
|
| 642 | } |
|
| 643 | ||
| 644 | $queryString = $this->helper->buildQueryString(array( |
|
| 645 | 'oauth_token' => $token, |
|
| 646 | 'client_id' => $this->authConfig['client_id'], |
|
| 647 | 'direction' => $direction, |
|
| 648 | 'limit' => $limit, |
|
| 649 | 'offset' => $offset |
|
| 650 | )); |
|
| 651 | ||
| 652 | $channels = new Methods\Subscription; |
|
| 653 | ||
| 654 | $channels->getSubscriptions($channel, $queryString); |
|
| 655 | } |
|
| 656 | ||
| 657 | /** |
|
| 658 | * List the live streams that the authenticated user is following |
|
| @@ 667-683 (lines=17) @@ | ||
| 664 | * @return \stdClass |
|
| 665 | * @throws TwitchException |
|
| 666 | */ |
|
| 667 | public function authStreamsFollowed($token, $limit = 25, $offset = 0, $hls = null) |
|
| 668 | { |
|
| 669 | if ($this->authConfig === false) { |
|
| 670 | $this->authConfigException(); |
|
| 671 | } |
|
| 672 | ||
| 673 | $queryString = $this->helper->buildQueryString(array( |
|
| 674 | 'oauth_token' => $token, |
|
| 675 | 'client_id' => $this->authConfig['client_id'], |
|
| 676 | 'limit' => $limit, |
|
| 677 | 'offset' => $offset, |
|
| 678 | 'hls' => $hls, |
|
| 679 | )); |
|
| 680 | ||
| 681 | $user = new Methods\User($this->request); |
|
| 682 | return $user->getFollowedStreams($queryString); |
|
| 683 | } |
|
| 684 | ||
| 685 | /** |
|
| 686 | * Get streams helper |
|