@@ 803-820 (lines=18) @@ | ||
800 | * @return \stdClass |
|
801 | * @throws TwitchException |
|
802 | */ |
|
803 | public function authChannelSubscriptions($token, $channel, $limit = 25, $offset = 0, $direction = 'DESC') |
|
804 | { |
|
805 | if (count($this->config) === 0) { |
|
806 | $this->configException(); |
|
807 | } |
|
808 | ||
809 | $queryString = $this->helper->buildQueryString(array( |
|
810 | 'oauth_token' => $token, |
|
811 | 'client_id' => $this->getConfigParam('client_id'), |
|
812 | 'direction' => $direction, |
|
813 | 'limit' => $limit, |
|
814 | 'offset' => $offset |
|
815 | )); |
|
816 | ||
817 | $subscription = new Methods\Subscription($this->request); |
|
818 | ||
819 | $subscription->getSubscriptions($channel, $queryString); |
|
820 | } |
|
821 | ||
822 | /** |
|
823 | * Returns user object if that user is subscribed |
|
@@ 882-898 (lines=17) @@ | ||
879 | * @return \stdClass |
|
880 | * @throws TwitchException |
|
881 | */ |
|
882 | public function authStreamsFollowed($token, $limit = 25, $offset = 0, $hls = null) |
|
883 | { |
|
884 | if (count($this->config) === 0) { |
|
885 | $this->configException(); |
|
886 | } |
|
887 | ||
888 | $queryString = $this->helper->buildQueryString(array( |
|
889 | 'oauth_token' => $token, |
|
890 | 'client_id' => $this->getConfigParam('client_id'), |
|
891 | 'limit' => $limit, |
|
892 | 'offset' => $offset, |
|
893 | 'hls' => $hls, |
|
894 | )); |
|
895 | ||
896 | $user = new Methods\User($this->request); |
|
897 | return $user->getFollowedStreams($queryString); |
|
898 | } |
|
899 | ||
900 | /** |
|
901 | * Get streams helper |