-
-
Save Archomeda/db40130ce4f10d51a566571900f46cd0 to your computer and use it in GitHub Desktop.
GW2 API - Map floors validity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const https = require('https'); | |
function req(url, callback) { | |
https.get(url, response => { | |
let body = ''; | |
response.on('data', chunk => { | |
body += chunk; | |
}); | |
response.on('end', () => { | |
callback(JSON.parse(body)); | |
}); | |
}); | |
} | |
req('https://api.guildwars2.com/v2/continents/1/floors?ids=all', floors => { | |
req('https://api.guildwars2.com/v2/maps?ids=all', maps => { | |
let out = {}; | |
for (let floor of floors) { | |
for (let regionId of Object.keys(floor.regions)) { | |
let region = floor.regions[regionId]; | |
for (let mapId of Object.keys(region.maps)) { | |
let mapInMaps = maps.find(m => m.id === parseInt(mapId, 10)); | |
if (mapInMaps.floors.indexOf(floor.id) === -1) { | |
if (mapId in out) { | |
out[mapId].push(floor.id); | |
} else { | |
out[mapId] = [floor.id]; | |
} | |
console.log(`// Missing floor ${floor.id} for map ${mapId} (${mapInMaps.name})`); | |
} | |
} | |
} | |
} | |
console.log(); | |
console.log('// Map ID -> Missing floors') | |
console.log(JSON.stringify(out, undefined, 4)); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Missing floor 3 for map 26 (Dredgehaunt Cliffs) | |
// Missing floor 3 for map 27 (Lornar's Pass) | |
// Missing floor 3 for map 28 (Wayfarer Foothills) | |
// Missing floor 3 for map 29 (Timberline Falls) | |
// Missing floor 3 for map 30 (Frostgorge Sound) | |
// Missing floor 3 for map 31 (Snowden Drifts) | |
// Missing floor 3 for map 326 (Hoelbrak) | |
// Missing floor 3 for map 807 (Eye of the North) | |
// Missing floor 3 for map 1178 (Bitterfrost Frontier) | |
// Missing floor 3 for map 19 (Plains of Ashford) | |
// Missing floor 3 for map 20 (Blazeridge Steppes) | |
// Missing floor 3 for map 21 (Fields of Ruin) | |
// Missing floor 3 for map 22 (Fireheart Rise) | |
// Missing floor 3 for map 25 (Iron Marches) | |
// Missing floor 3 for map 32 (Diessa Plateau) | |
// Missing floor 3 for map 218 (Black Citadel) | |
// Missing floor 3 for map 51 (Straits of Devastation) | |
// Missing floor 3 for map 62 (Cursed Shore) | |
// Missing floor 3 for map 65 (Malchor's Leap) | |
// Missing floor 3 for map 15 (Queensdale) | |
// Missing floor 3 for map 17 (Harathi Hinterlands) | |
// Missing floor 3 for map 18 (Divinity's Reach) | |
// Missing floor 3 for map 23 (Kessex Hills) | |
// Missing floor 3 for map 24 (Gendarran Fields) | |
// Missing floor 3 for map 50 (Lion's Arch) | |
// Missing floor 3 for map 73 (Bloodtide Coast) | |
// Missing floor 3 for map 873 (Southsun Cove) | |
// Missing floor 3 for map 1185 (Lake Doric) | |
// Missing floor 3 for map 34 (Caledon Forest) | |
// Missing floor 3 for map 35 (Metrica Province) | |
// Missing floor 3 for map 54 (Brisban Wildlands) | |
// Missing floor 3 for map 39 (Mount Maelstrom) | |
// Missing floor 3 for map 53 (Sparkfly Fen) | |
// Missing floor 3 for map 1005 (Party Politics) | |
// Missing floor 3 for map 1041 (Dragon's Stand) | |
// Missing floor 3 for map 1043 (Auric Basin) | |
// Missing floor 3 for map 1052 (Verdant Brink) | |
// Missing floor 3 for map 1062 (Spirit Vale) | |
// Missing floor 3 for map 1147 (Spirit Vale) | |
// Missing floor 3 for map 1149 (Salvation Pass) | |
// Missing floor 3 for map 1156 (Stronghold of the Faithful) | |
// Missing floor 3 for map 1159 (Research in Rata Novus) | |
// Missing floor 3 for map 1165 (Bloodstone Fen) | |
// Missing floor 3 for map 1169 (Rata Novus) | |
// Missing floor 3 for map 1170 (Taimi's Game) | |
// Missing floor 3 for map 1176 (Taimi's Game) | |
// Missing floor 3 for map 1188 (Bastion of the Penitent) | |
// Missing floor 3 for map 988 (Dry Top) | |
// Missing floor 3 for map 1015 (The Silverwastes) | |
// Missing floor 3 for map 1175 (Ember Bay) | |
// Missing floor 47 for map 1033 (Buried Insight) | |
// Missing floor 47 for map 1041 (Dragon's Stand) | |
// Missing floor 47 for map 1043 (Auric Basin) | |
// Missing floor 47 for map 1045 (Tangled Depths) | |
// Missing floor 47 for map 1052 (Verdant Brink) | |
// Missing floor 47 for map 1062 (Spirit Vale) | |
// Missing floor 47 for map 1068 (Gilded Hollow) | |
// Missing floor 47 for map 1101 (Gilded Hollow) | |
// Missing floor 47 for map 1107 (Gilded Hollow) | |
// Missing floor 47 for map 1108 (Gilded Hollow) | |
// Missing floor 47 for map 1110 (Scrap Rifle Field Test) | |
// Missing floor 47 for map 1115 (Haywire Punch-o-Matic Battle) | |
// Missing floor 47 for map 1121 (Gilded Hollow) | |
// Missing floor 47 for map 1125 (Gilded Hollow) | |
// Missing floor 47 for map 1147 (Spirit Vale) | |
// Missing floor 47 for map 1149 (Salvation Pass) | |
// Missing floor 47 for map 1156 (Stronghold of the Faithful) | |
// Missing floor 47 for map 1159 (Research in Rata Novus) | |
// Missing floor 47 for map 1165 (Bloodstone Fen) | |
// Missing floor 47 for map 1167 (A Shadow's Deeds) | |
// Missing floor 47 for map 1169 (Rata Novus) | |
// Missing floor 47 for map 1170 (Taimi's Game) | |
// Missing floor 47 for map 1176 (Taimi's Game) | |
// Missing floor 47 for map 1188 (Bastion of the Penitent) | |
// Missing floor 48 for map 1032 (Prized Possessions) | |
// Missing floor 48 for map 1037 (The Jungle Provides) | |
// Missing floor 48 for map 1041 (Dragon's Stand) | |
// Missing floor 48 for map 1043 (Auric Basin) | |
// Missing floor 48 for map 1045 (Tangled Depths) | |
// Missing floor 48 for map 1048 (City of Hope) | |
// Missing floor 48 for map 1050 (Torn from the Sky) | |
// Missing floor 48 for map 1051 (Prisoners of the Dragon) | |
// Missing floor 48 for map 1052 (Verdant Brink) | |
// Missing floor 48 for map 1054 (Bitter Harvest) | |
// Missing floor 48 for map 1062 (Spirit Vale) | |
// Missing floor 48 for map 1069 (Lost Precipice) | |
// Missing floor 48 for map 1071 (Lost Precipice) | |
// Missing floor 48 for map 1076 (Lost Precipice) | |
// Missing floor 48 for map 1095 (Dragon's Stand (Heart of Thorns)) | |
// Missing floor 48 for map 1104 (Lost Precipice) | |
// Missing floor 48 for map 1124 (Lost Precipice) | |
// Missing floor 48 for map 1144 (Lost Precipice) | |
// Missing floor 48 for map 1147 (Spirit Vale) | |
// Missing floor 48 for map 1149 (Salvation Pass) | |
// Missing floor 48 for map 1156 (Stronghold of the Faithful) | |
// Missing floor 48 for map 1158 (Noble's Folly) | |
// Missing floor 48 for map 1159 (Research in Rata Novus) | |
// Missing floor 48 for map 1165 (Bloodstone Fen) | |
// Missing floor 48 for map 1169 (Rata Novus) | |
// Missing floor 48 for map 1170 (Taimi's Game) | |
// Missing floor 48 for map 1176 (Taimi's Game) | |
// Missing floor 48 for map 1188 (Bastion of the Penitent) | |
// Missing floor -7 for map 1169 (Rata Novus) | |
// Missing floor -13 for map 1029 (Arcana Obscura) | |
// Map ID -> Missing floors | |
{ | |
"15": [ | |
3 | |
], | |
"17": [ | |
3 | |
], | |
"18": [ | |
3 | |
], | |
"19": [ | |
3 | |
], | |
"20": [ | |
3 | |
], | |
"21": [ | |
3 | |
], | |
"22": [ | |
3 | |
], | |
"23": [ | |
3 | |
], | |
"24": [ | |
3 | |
], | |
"25": [ | |
3 | |
], | |
"26": [ | |
3 | |
], | |
"27": [ | |
3 | |
], | |
"28": [ | |
3 | |
], | |
"29": [ | |
3 | |
], | |
"30": [ | |
3 | |
], | |
"31": [ | |
3 | |
], | |
"32": [ | |
3 | |
], | |
"34": [ | |
3 | |
], | |
"35": [ | |
3 | |
], | |
"39": [ | |
3 | |
], | |
"50": [ | |
3 | |
], | |
"51": [ | |
3 | |
], | |
"53": [ | |
3 | |
], | |
"54": [ | |
3 | |
], | |
"62": [ | |
3 | |
], | |
"65": [ | |
3 | |
], | |
"73": [ | |
3 | |
], | |
"218": [ | |
3 | |
], | |
"326": [ | |
3 | |
], | |
"807": [ | |
3 | |
], | |
"873": [ | |
3 | |
], | |
"988": [ | |
3 | |
], | |
"1005": [ | |
3 | |
], | |
"1015": [ | |
3 | |
], | |
"1029": [ | |
-13 | |
], | |
"1032": [ | |
48 | |
], | |
"1033": [ | |
47 | |
], | |
"1037": [ | |
48 | |
], | |
"1041": [ | |
3, | |
47, | |
48 | |
], | |
"1043": [ | |
3, | |
47, | |
48 | |
], | |
"1045": [ | |
47, | |
48 | |
], | |
"1048": [ | |
48 | |
], | |
"1050": [ | |
48 | |
], | |
"1051": [ | |
48 | |
], | |
"1052": [ | |
3, | |
47, | |
48 | |
], | |
"1054": [ | |
48 | |
], | |
"1062": [ | |
3, | |
47, | |
48 | |
], | |
"1068": [ | |
47 | |
], | |
"1069": [ | |
48 | |
], | |
"1071": [ | |
48 | |
], | |
"1076": [ | |
48 | |
], | |
"1095": [ | |
48 | |
], | |
"1101": [ | |
47 | |
], | |
"1104": [ | |
48 | |
], | |
"1107": [ | |
47 | |
], | |
"1108": [ | |
47 | |
], | |
"1110": [ | |
47 | |
], | |
"1115": [ | |
47 | |
], | |
"1121": [ | |
47 | |
], | |
"1124": [ | |
48 | |
], | |
"1125": [ | |
47 | |
], | |
"1144": [ | |
48 | |
], | |
"1147": [ | |
3, | |
47, | |
48 | |
], | |
"1149": [ | |
3, | |
47, | |
48 | |
], | |
"1156": [ | |
3, | |
47, | |
48 | |
], | |
"1158": [ | |
48 | |
], | |
"1159": [ | |
3, | |
47, | |
48 | |
], | |
"1165": [ | |
3, | |
47, | |
48 | |
], | |
"1167": [ | |
47 | |
], | |
"1169": [ | |
3, | |
47, | |
48, | |
-7 | |
], | |
"1170": [ | |
3, | |
47, | |
48 | |
], | |
"1175": [ | |
3 | |
], | |
"1176": [ | |
3, | |
47, | |
48 | |
], | |
"1178": [ | |
3 | |
], | |
"1185": [ | |
3 | |
], | |
"1188": [ | |
3, | |
47, | |
48 | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment