Skip to content

Commit a0e0956

Browse files
committed
Resolve Spec Errors
1 parent 1848b6e commit a0e0956

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

spec/NewTwitchApi/Resources/UsersApiSpec.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function it_should_update_user_description(Client $guzzleClient, Response $respo
143143

144144
function it_should_get_user_block_list(Client $guzzleClient, Response $response)
145145
{
146-
$guzzleClient->send(new Request('GET', 'users?broadcaster_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response);
146+
$guzzleClient->send(new Request('GET', 'users/blocks?broadcaster_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response);
147147
$this->getUserBlockList('TEST_TOKEN', '123')->shouldBeAnInstanceOf(ResponseInterface::class);
148148
}
149149

@@ -167,7 +167,7 @@ function it_should_block_user_with_opts(Client $guzzleClient, Response $response
167167

168168
function it_should_unblock_user(Client $guzzleClient, Response $response)
169169
{
170-
$guzzleClient->send(new Request('PUT', 'users/blocks?target_user_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response);
170+
$guzzleClient->send(new Request('DELETE', 'users/blocks?target_user_id=123', ['Authorization' => 'Bearer TEST_TOKEN']))->willReturn($response);
171171
$this->unblockUser('TEST_TOKEN', '123')->shouldBeAnInstanceOf(ResponseInterface::class);
172172
}
173173
}

src/NewTwitchApi/Resources/ChannelsApi.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ChannelsApi extends AbstractResource
1313
* @throws GuzzleException
1414
* @link https://dev.twitch.tv/docs/api/reference#get-channel-information
1515
*/
16-
public function getChannelInfo(string $bearer, array $broadcasterId): ResponseInterface
16+
public function getChannelInfo(string $bearer, string $broadcasterId): ResponseInterface
1717
{
1818
$queryParamsMap = [];
1919

@@ -26,7 +26,7 @@ public function getChannelInfo(string $bearer, array $broadcasterId): ResponseIn
2626
* @throws GuzzleException
2727
* @link https://dev.twitch.tv/docs/api/reference#get-channel-editors
2828
*/
29-
public function getChannelEditors(string $bearer, array $broadcasterId): ResponseInterface
29+
public function getChannelEditors(string $bearer, string $broadcasterId): ResponseInterface
3030
{
3131
$queryParamsMap = [];
3232

src/NewTwitchApi/Resources/UsersApi.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function blockUser(string $bearer, string $targetUserId, string $sourceCo
186186
}
187187

188188
if ($reason) {
189-
$queryParamsMap[] = ['key' => 'reasib', 'value' => $reason];
189+
$queryParamsMap[] = ['key' => 'reason', 'value' => $reason];
190190
}
191191

192192
return $this->putApi('users/blocks', $bearer, $queryParamsMap);

0 commit comments

Comments
 (0)