diff options
author | mat <github@matdoes.dev> | 2022-03-27 19:38:44 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-27 19:38:44 -0500 |
commit | 0a31ac6943aef19fbc63b25163ecb3b4a3c9f81b (patch) | |
tree | e04388c055ad445b070f35745355f2d109b35d2c /test-data-generator | |
parent | ac72f729ba04c3ed8523e16c86bf8f61e3271fa7 (diff) | |
download | skyblock-api-0a31ac6943aef19fbc63b25163ecb3b4a3c9f81b.tar.gz skyblock-api-0a31ac6943aef19fbc63b25163ecb3b4a3c9f81b.tar.bz2 skyblock-api-0a31ac6943aef19fbc63b25163ecb3b4a3c9f81b.zip |
Add coop invitation
Diffstat (limited to 'test-data-generator')
-rw-r--r-- | test-data-generator/index.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test-data-generator/index.ts b/test-data-generator/index.ts index f296c16..bf8f34b 100644 --- a/test-data-generator/index.ts +++ b/test-data-generator/index.ts @@ -20,12 +20,13 @@ const playerUuids = [ ] async function writeTestData(requestPath: string, name: string, contents: any) { - const dir = path.join(__dirname, '..', 'test', 'data', requestPath) + const dir = path.join(process.cwd(), '..', 'test', 'data', requestPath) await fs.mkdir(path.dirname(path.join(dir, `${name}.json`)), { recursive: true }) await fs.writeFile(path.join(dir, `${name}.json`), JSON.stringify(contents, null, 2)) } -async function addResponse(requestPath: keyof typedHypixelApi.Requests, args: { [ key: string ]: string }, name: string) { +async function addResponse(requestPath: keyof typedHypixelApi.Requests, args: { [key: string]: string }, name: string) { + console.log('Fetching', requestPath, args) const response = await hypixelApi.sendApiRequest(requestPath, { key: hypixelApi.chooseApiKey(), ...args, @@ -38,9 +39,11 @@ async function addConstants() { const constantNames = [ 'collections', 'minions', + 'pets', 'skills', 'slayers', 'stats', + 'values', 'zones', ] for (const constantName of constantNames) { |