|
1 | 1 | import { fetch, Headers, RequestInit } from 'undici' |
2 | 2 | export * from './responses/index' |
3 | 3 | import { |
| 4 | + // errors |
4 | 5 | InvalidApiKeyResponse, |
5 | 6 | MalformedUuidResponse, |
6 | 7 | MissingFieldResponse, |
7 | 8 | ThrottleResponse, |
8 | 9 |
|
9 | | - ApiKeyInformationResponse, |
10 | | - FriendsResponse, |
11 | | - OnlineStatusResponse, |
12 | | - PlayerDataResponse, |
13 | | - RecentGamesResponse, |
14 | | - GuildResponse, |
15 | | - |
| 10 | + // resources |
16 | 11 | SkyBlockCollectionsResponse, |
17 | 12 | SkyBlockElectionResponse, |
| 13 | + SkyBlockSkillsResponse, |
18 | 14 | SkyBlockItemsResponse, |
19 | | - SkyBlockProfileResponse, |
| 15 | + AchievementsResponse, |
| 16 | + ChallengesResponse, |
| 17 | + |
| 18 | + // everything else |
| 19 | + ApiKeyInformationResponse, |
| 20 | + GamesInformationResponse, |
20 | 21 | SkyBlockProfilesResponse, |
21 | | - SkyBlockSkillsResponse, |
| 22 | + SkyBlockProfileResponse, |
22 | 23 | RankedSkywarsResponse, |
23 | | - GamesInformationResponse, |
| 24 | + OnlineStatusResponse, |
| 25 | + RecentGamesResponse, |
| 26 | + PlayerDataResponse, |
| 27 | + FriendsResponse, |
| 28 | + GuildResponse, |
24 | 29 | } from './responses/index' |
25 | 30 |
|
26 | 31 |
|
@@ -71,6 +76,14 @@ export interface Requests { |
71 | 76 | options: {} |
72 | 77 | response: Response<GamesInformationResponse> |
73 | 78 | } |
| 79 | + 'resources/achievements': { |
| 80 | + options: {} |
| 81 | + response: Response<AchievementsResponse> |
| 82 | + } |
| 83 | + 'resources/challenges': { |
| 84 | + options: {} |
| 85 | + response: Response<ChallengesResponse> |
| 86 | + } |
74 | 87 | 'skyblock/profiles': { |
75 | 88 | options: { |
76 | 89 | uuid: string |
@@ -189,3 +202,4 @@ export const request = async<P extends keyof Requests>(path: P, options: Request |
189 | 202 | headers: headers as any |
190 | 203 | } |
191 | 204 | } |
| 205 | + |
0 commit comments