Skip to content

Commit

Permalink
[Client] Update package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Pewtro committed Mar 28, 2024
1 parent 512f778 commit 8815648
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-chicken-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/client': patch
---

Update client using new package versions
5 changes: 2 additions & 3 deletions packages/client/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@ export class BlizzardApiClient implements IBlizzardApiClient {
Authorization: `Bearer ${config.token}`,
},
params: {
...resource.params,
locale: endpoint.locale,
},
};
}

public sendRequest<T = unknown>(
public sendRequest<T = void>(
resource: Resource<T>,
options?: Partial<ClientOptions> & T,
options?: Partial<ClientOptions>,
headers?: Record<string, string>,
): ResourceResponse<AxiosResponse<T>> {
const url = this.getRequestUrl(resource, options);
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/tests/wow/achievement.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('achievement', async () => {
client.setAccessToken(access.data.access_token);

it('should be able to fetch an achievement', async () => {
const response = await client.sendRequest<{ id: number }>(wow.achievement.achievement(16_542)).catch((error) => {
const response = await client.sendRequest(wow.achievements.achievementCategory(16_542)).catch((error) => {
console.error('error', error);
throw new Error('Failed to fetch achievement');
});
Expand Down

0 comments on commit 8815648

Please sign in to comment.