| @@ 743-760 (lines=18) @@ | ||
| 740 | * @return \stdClass |
|
| 741 | * @throws TwitchException |
|
| 742 | */ |
|
| 743 | public function authChannelSubscriptions($token, $channel, $limit = 25, $offset = 0, $direction = 'DESC') |
|
| 744 | { |
|
| 745 | if ($this->authConfig === false) { |
|
| 746 | $this->authConfigException(); |
|
| 747 | } |
|
| 748 | ||
| 749 | $queryString = $this->helper->buildQueryString(array( |
|
| 750 | 'oauth_token' => $token, |
|
| 751 | 'client_id' => $this->authConfig['client_id'], |
|
| 752 | 'direction' => $direction, |
|
| 753 | 'limit' => $limit, |
|
| 754 | 'offset' => $offset |
|
| 755 | )); |
|
| 756 | ||
| 757 | $channels = new Methods\Subscription; |
|
| 758 | ||
| 759 | $channels->getSubscriptions($channel, $queryString); |
|
| 760 | } |
|
| 761 | ||
| 762 | /** |
|
| 763 | * List the live streams that the authenticated user is following |
|
| @@ 772-788 (lines=17) @@ | ||
| 769 | * @return \stdClass |
|
| 770 | * @throws TwitchException |
|
| 771 | */ |
|
| 772 | public function authStreamsFollowed($token, $limit = 25, $offset = 0, $hls = null) |
|
| 773 | { |
|
| 774 | if ($this->authConfig === false) { |
|
| 775 | $this->authConfigException(); |
|
| 776 | } |
|
| 777 | ||
| 778 | $queryString = $this->helper->buildQueryString(array( |
|
| 779 | 'oauth_token' => $token, |
|
| 780 | 'client_id' => $this->authConfig['client_id'], |
|
| 781 | 'limit' => $limit, |
|
| 782 | 'offset' => $offset, |
|
| 783 | 'hls' => $hls, |
|
| 784 | )); |
|
| 785 | ||
| 786 | $user = new Methods\User($this->request); |
|
| 787 | return $user->getFollowedStreams($queryString); |
|
| 788 | } |
|
| 789 | ||
| 790 | /** |
|
| 791 | * Get streams helper |
|