This repository was archived by the owner on Oct 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
1919 SkyBlockProfileResponse ,
2020 SkyBlockProfilesResponse ,
2121 SkyBlockSkillsResponse ,
22+ RankedSkywarsResponse ,
2223} from './responses/index'
2324
2425
@@ -119,6 +120,13 @@ export interface Requests {
119120 )
120121 response : Response < GuildResponse | MissingFieldResponse | InvalidApiKeyResponse | MalformedUuidResponse | ThrottleResponse >
121122 }
123+ 'player/ranked/skywars' : {
124+ options : {
125+ uuid : string
126+ key : string
127+ }
128+ response : Response < RankedSkywarsResponse | MissingFieldResponse | InvalidApiKeyResponse | MalformedUuidResponse | ThrottleResponse >
129+ }
122130}
123131
124132async function fetchJsonWithRetry ( url : string , options : RequestInit ) {
Original file line number Diff line number Diff line change @@ -8,10 +8,13 @@ export * from './skyblock/_profile'
88export * from './skyblock/profiles'
99export * from './skyblock/profile'
1010
11+ export * from './player/ranked/skywars'
12+ export * from './player'
13+
1114export * from './recentgames'
1215export * from './friends'
1316export * from './status'
14- export * from './player'
1517export * from './error'
1618export * from './guild'
1719export * from './api'
20+
Original file line number Diff line number Diff line change 1+ export interface RankedSkywarsResponse {
2+ success : true
3+ result : {
4+ /** MM_YY, I think */
5+ key : `${number } _${number } `
6+ /** The leaderboard position the player is in */
7+ position : number
8+ /** The player's ranked SkyWars score */
9+ score : number
10+ }
11+ }
Original file line number Diff line number Diff line change @@ -63,5 +63,10 @@ console.log('ok doing tsc');
6363 name : 'SkyComm'
6464 } , true ) )
6565
66+ await testData ( 'RankedSkywarsResponse' , await request ( 'player/ranked/skywars' , {
67+ key : process . env . API_KEY ,
68+ uuid : 'a91bd7ca5d4b4846990bf4393727f279'
69+ } , true ) )
70+
6671 console . log ( 'Everything passed :)' )
6772} ) ( )
Original file line number Diff line number Diff line change 99 "strict" : true ,
1010 "skipLibCheck" : true
1111 },
12- "include" : [" _test_data.ts" ],
13- "extends" : " ../tsconfig.json" ,
12+ "include" : [" _test_data.ts" ]
1413}
You can’t perform that action at this time.
0 commit comments