Skip to content

Commit

Permalink
Resolve Spec Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandin committed Mar 22, 2021
1 parent 1848b6e commit a0e0956
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/NewTwitchApi/Resources/UsersApiSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}
}
4 changes: 2 additions & 2 deletions src/NewTwitchApi/Resources/ChannelsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand All @@ -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 = [];

Expand Down
2 changes: 1 addition & 1 deletion src/NewTwitchApi/Resources/UsersApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a0e0956

Please sign in to comment.