Cities in Map Names API

Cities in Map Names API

in API Development

Posted by: AdelphiA.9287

AdelphiA.9287

Q:

Is there any reason why cities are not returned from map names API? (https://api.guildwars2.com/v1/map_names.json). Surely this means we have to decipher maps API (https://api.guildwars2.com/v1/maps.json) rather than map names in which case, why do we have the map names API… or am I missing something here?

AdelphiA.9287 – The Enigma Guild

Cities in Map Names API

in API Development

Posted by: smiley.1438

smiley.1438

Since this is still unanswered: i just discovered that https://api.guildwars2.com/v1/map_names.json returns all maps which have events available (i think that isn’t documented at all) so the primary usage of this one is https://api.guildwars2.com/v1/events.json or https://api.guildwars2.com/v1/event_details.json

Try to throw anything in event_details into a database and run some SQL like this:

SELECT `map_id` FROM `gw2_events` GROUP BY `map_id` ORDER BY `map_id`

and compare the result with map_names.json – i belive it’s generated in the same way
Oh and using the maps.json isn’t too hard – it’s actually quite handy.

see https://gist.github.com/codemasher/dc3b232b3ccd2609a43b

(edited by smiley.1438)