diff --git a/spec/NewTwitchApi/Resources/UsersApiSpec.php b/spec/NewTwitchApi/Resources/UsersApiSpec.php index ca3d3cf..3aa0fb6 100644 --- a/spec/NewTwitchApi/Resources/UsersApiSpec.php +++ b/spec/NewTwitchApi/Resources/UsersApiSpec.php @@ -143,7 +143,7 @@ function it_should_update_user_description(Client $guzzleClient, Response $respo function it_should_get_user_block_list(Client $guzzleClient, Response $response) { - $guzzleClient->send(new Request('GET', 'users?broadcaster_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response); + $guzzleClient->send(new Request('GET', 'users/blocks?broadcaster_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response); $this->getUserBlockList('TEST_TOKEN', '123')->shouldBeAnInstanceOf(ResponseInterface::class); } @@ -167,7 +167,7 @@ function it_should_block_user_with_opts(Client $guzzleClient, Response $response function it_should_unblock_user(Client $guzzleClient, Response $response) { - $guzzleClient->send(new Request('PUT', 'users/blocks?target_user_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response); + $guzzleClient->send(new Request('DELETE', 'users/blocks?target_user_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response); $this->unblockUser('TEST_TOKEN', '123')->shouldBeAnInstanceOf(ResponseInterface::class); } } diff --git a/src/NewTwitchApi/Resources/ChannelsApi.php b/src/NewTwitchApi/Resources/ChannelsApi.php index 832a8c1..404b765 100644 --- a/src/NewTwitchApi/Resources/ChannelsApi.php +++ b/src/NewTwitchApi/Resources/ChannelsApi.php @@ -13,7 +13,7 @@ class ChannelsApi extends AbstractResource * @throws GuzzleException * @link https://dev.twitch.tv/docs/api/reference#get-channel-information */ - public function getChannelInfo(string $bearer, array $broadcasterId): ResponseInterface + public function getChannelInfo(string $bearer, string $broadcasterId): ResponseInterface { $queryParamsMap = []; @@ -26,7 +26,7 @@ public function getChannelInfo(string $bearer, array $broadcasterId): ResponseIn * @throws GuzzleException * @link https://dev.twitch.tv/docs/api/reference#get-channel-editors */ - public function getChannelEditors(string $bearer, array $broadcasterId): ResponseInterface + public function getChannelEditors(string $bearer, string $broadcasterId): ResponseInterface { $queryParamsMap = []; diff --git a/src/NewTwitchApi/Resources/UsersApi.php b/src/NewTwitchApi/Resources/UsersApi.php index ccb00f0..7e777ea 100644 --- a/src/NewTwitchApi/Resources/UsersApi.php +++ b/src/NewTwitchApi/Resources/UsersApi.php @@ -186,7 +186,7 @@ public function blockUser(string $bearer, string $targetUserId, string $sourceCo } if ($reason) { - $queryParamsMap[] = ['key' => 'reasib', 'value' => $reason]; + $queryParamsMap[] = ['key' => 'reason', 'value' => $reason]; } return $this->putApi('users/blocks', $bearer, $queryParamsMap);