This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
web_apis [2021/03/21 18:18] – Added how to parse objectives value Grabz | web_apis [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page> | ||
+ | <WRAP centeralign> | ||
====== Web APIs ====== | ====== Web APIs ====== | ||
+ | </ | ||
+ | {{page> | ||
+ | |||
===== Map Browser ===== | ===== Map Browser ===== | ||
Creeper World 1 and 2 do not have an easily readable map browser API and can only be accessed here: | Creeper World 1 and 2 do not have an easily readable map browser API and can only be accessed here: | ||
Line 20: | Line 25: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
+ | * '' | ||
==== CW4 values ==== | ==== CW4 values ==== | ||
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
+ | * '' | ||
==== CW3 and PF values ==== | ==== CW3 and PF values ==== | ||
* '' | * '' | ||
Line 41: | Line 50: | ||
Below is a list of available parameters to the score query APIs: | Below is a list of available parameters to the score query APIs: | ||
- | * '' | + | * '' |
* '' | * '' | ||
+ | * '' | ||
+ | * CW3: 0, 1 or 2. 0 - All Time. 1 - 3 days. 2 - 1 week. | ||
+ | * PF: 0 or 1. 0 - All. 1 - Month. | ||
+ | * '' | ||
The following arguments are exclusive, i.e. only use one of these at a time, as applicable: | The following arguments are exclusive, i.e. only use one of these at a time, as applicable: | ||
* '' | * '' | ||
Line 57: | Line 70: | ||
let months = [" | let months = [" | ||
let date = new Date(); | let date = new Date(); | ||
- | let str = `CHRONOM ${chronom_months[date.getMonth()]} ${date.getDate()}, | + | let str = `CHRONOM ${months[date.getMonth()]} ${date.getDate()}, |
let gameUID = Buffer.from(str).toString(' | let gameUID = Buffer.from(str).toString(' | ||
</ | </ | ||
Line 227: | Line 240: | ||
Cubic b8 | Cubic b8 | ||
Abyss b9 | Abyss b9 | ||
+ | </ | ||
+ | === CW2: Academy === | ||
+ | < | ||
+ | Legacy | ||
+ | Basic Training | ||
+ | Mind and Muscle | ||
+ | Spelunking | ||
+ | Engineering | ||
+ | The Zoo z5 | ||
+ | Pressure | ||
+ | Dimensions | ||
+ | Accident | ||
+ | Darkness Looms z9 | ||
+ | </ | ||
+ | === CW2: Credits === | ||
+ | < | ||
+ | Credits | ||
</ | </ | ||
===== Misc Info ===== | ===== Misc Info ===== | ||
==== Parsing the CW4 objectives value ==== | ==== Parsing the CW4 objectives value ==== | ||
- | The objectives value from CW4 map data is a binary number saved in base 10 format, therefore to find which objectives exist on a map, we must look at each individual bit. There are 6 bits in total, as there are only 6 objectives. | + | The objectives value from CW4 map data is a binary number saved in base 10 format, therefore to find which objectives exist on a map, we must look at each individual bit. There are 6 bits in total, as there are only 6 objectives. |
Example JavaScript code for parsing the objectives value: | Example JavaScript code for parsing the objectives value: | ||
<code JavaScript> | <code JavaScript> | ||
- | let objectives | + | let o = 7; |
- | let Custom = (b >> 5 & 1) != 0; //0 | + | let Custom = (o >> 5 & 1) != 0; //false |
- | let Collect = (b >> 4 & 1) != 0; //0 | + | let Collect = (o >> 4 & 1) != 0; //false |
- | let Hold = (b >> 3 & 1) != 0; //0 | + | let Hold = (o >> 3 & 1) != 0; //false |
- | let Reclaim = (b >> 2 & 1) != 0; //1 | + | let Reclaim = (o >> 2 & 1) != 0; //true |
- | let Totems = (b >> 1 & 1) != 0; //1 | + | let Totems = (o >> 1 & 1) != 0; //true |
- | let Nullify = (b >> 0 & 1) != 0; //1 | + | let Nullify = (o >> 0 & 1) != 0; //true |
// | // | ||
</ | </ |