From ec6f39cf4e64dc23c87a3d16c6eddc69da26a706 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Thu, 22 Dec 2022 15:55:51 -0500 Subject: [PATCH] add ps2.nice.kiwi as source -- fix + docs --- README.md | 3 ++- src/handlers.ts | 2 +- src/landing.ts | 12 +++++++++--- wrangler.toml | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9531565..8da2a74 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ A Planetside 2 population aggreggation API between - https://wt.honu.pw - https://saerro.ps2.live - https://voidwell.com +- https://ps2.nice.kiwi Has some jank filters and will average between all 4 sources with as much data as can be used. @@ -27,5 +28,5 @@ Need help? Talk to us on the [Planetside Community Developers Discord](https://d ``` npm install -npm run dev +npm start ``` diff --git a/src/handlers.ts b/src/handlers.ts index b4f905f..487fbe4 100644 --- a/src/handlers.ts +++ b/src/handlers.ts @@ -38,7 +38,7 @@ export const handleAll = async ( flags: Flags ): Promise => { const cached = await cache.get(`all${debug ? ".debug" : ""}`); - if (false && cached) { + if (cached) { return new Response(JSON.stringify(cached), { headers: { "content-type": "application/json", diff --git a/src/landing.ts b/src/landing.ts index 8e1f964..7876a84 100644 --- a/src/landing.ts +++ b/src/landing.ts @@ -13,6 +13,7 @@ This service aggregates the population data from the following sources: - https://ps2.fisu.pw/ - https://wt.honu.pw/ - https://voidwell.com/ (caveat: no factions, non-standard counting method) +- https://ps2.nice.kiwi/ ## Routes @@ -30,7 +31,8 @@ GET /:id - Get one world by ID "saerro": 282, "fisu": 271, "honu": 292, - "voidwell": 298 + "voidwell": 298, + "kiwi": 281 } } @@ -44,12 +46,14 @@ GET /:id - Get one world by ID "fisu": { ... }, "honu": { ... }, "voidwell": { ... } + "kiwi": { ... } }, "lastFetchTimes": { "saerro": "2020-10-10T00:00:00.000Z", "fisu": "2020-10-10T00:00:00.000Z", "honu": "2020-10-10T00:00:00.000Z", "voidwell": "2020-10-10T00:00:00.000Z" + "kiwi": "2020-10-10T00:00:00.000Z" } } @@ -68,7 +72,8 @@ GET /all - Get all worlds "saerro": 282, "fisu": 271, "honu": 292, - "voidwell": 298 + "voidwell": 298, + "kiwi": 281 } }, { @@ -83,7 +88,8 @@ GET /all - Get all worlds "saerro": 95, "fisu": 48, "honu": 91, - "voidwell": 99 + "voidwell": 99, + "kiwi": 97 } } ] diff --git a/wrangler.toml b/wrangler.toml index 54c769e..2dba593 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -14,7 +14,7 @@ DISABLE_VOIDWELL = "0" DISABLE_KIWI = "0" DISABLE_CACHE = "0" VOIDWELL_USE_PS4 = "0" -FISU_USE_PS4EU = "0" +FISU_USE_PS4EU = "1" [[kv_namespaces]] binding = "CACHE"