From 0a31ac6943aef19fbc63b25163ecb3b4a3c9f81b Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 27 Mar 2022 19:38:44 -0500 Subject: Add coop invitation --- test-data-generator/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test-data-generator') 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) { -- cgit