|
@@ 169-181 (lines=13) @@
|
| 166 |
|
* @return \stdClass |
| 167 |
|
* @throws TwitchException |
| 168 |
|
*/ |
| 169 |
|
public function authUserFollowChannel($user, $channel, $userToken, $notifications = false) |
| 170 |
|
{ |
| 171 |
|
$this->checkConfig(); |
| 172 |
|
|
| 173 |
|
$queryString = $this->helper->buildQueryString(array( |
| 174 |
|
'oauth_token' => $userToken, |
| 175 |
|
'notifications' => $notifications, |
| 176 |
|
)); |
| 177 |
|
|
| 178 |
|
$follow = new Methods\Follow($this->request); |
| 179 |
|
|
| 180 |
|
return $follow->followChannel($user, $channel, $queryString); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
/** |
| 184 |
|
* Set user to unfollow given channel |
|
@@ 192-203 (lines=12) @@
|
| 189 |
|
* @return \stdClass |
| 190 |
|
* @throws TwitchException |
| 191 |
|
*/ |
| 192 |
|
public function authUserUnfollowChannel($user, $channel, $userToken) |
| 193 |
|
{ |
| 194 |
|
$this->checkConfig(); |
| 195 |
|
|
| 196 |
|
$queryString = $this->helper->buildQueryString(array( |
| 197 |
|
'oauth_token' => $userToken, |
| 198 |
|
)); |
| 199 |
|
|
| 200 |
|
$follow = new Methods\Follow($this->request); |
| 201 |
|
|
| 202 |
|
return $follow->unfollowChannel($user, $channel, $queryString); |
| 203 |
|
} |
| 204 |
|
|
| 205 |
|
/** |
| 206 |
|
* Get the specified channel |