arenanet / api-cdi

Collaborative Development Initiative for Public APIs
257 stars 41 forks source link

Map and history instance #570

Open dragonofmercy opened 7 years ago

dragonofmercy commented 7 years ago

Is it possible to add a parameter like "main": 1 in the map data to distinguish if the map is an history instance or a main map.

Ex: { "name": "Verdant Brink", "main": 1, "min_level": 80, "max_level": 80, "default_floor": 1, }, { "name": "Bitter Harvest", "main": 0, "min_level": 80, "max_level": 80, "default_floor": 1, }

darthmaim commented 7 years ago

Maps already have "type": "Public" if they are a "main map". These are the possible types:

dragonofmercy commented 7 years ago

With this method, "type" is not present https://api.guildwars2.com/v2/continents/1/floors/1/regions/10/maps/1054 or https://api.guildwars2.com/v2/continents/1/floors/1/regions/10/maps/1052

darthmaim commented 7 years ago

I guess thats a bug then, https://api.guildwars2.com/v2/maps/1054 and https://api.guildwars2.com/v2/maps/1052 both have type set.

dragonofmercy commented 7 years ago

Yes it's seem that the map object returned is not the same between https://api.guildwars2.com/v2/continents and https://api.guildwars2.com/v2/maps endpoints

https://api.guildwars2.com/v2/continents/1/floors?ids=0,1,2,3 I use the method below to list all map and get all point of interest to build a global map, so it be nice to have the "type" value set to this map object too.

ChieftainAlex commented 7 years ago

kinda related to #545, in that you're getting different responses between map endpoints. Otherwise "type" seems like a new issue - good spot.

bever1337 commented 1 year ago

This is an old thread, but I can confirm this challenge still exists for the API integrator! For other developers, do y'all prefer the data from /v2/maps or /v2/continents? When using data from /v2/continents, is there an alternative to a type property to determine if a map is an instance vs overworld (aka public) map? I'm hoping folks have found solutions in the last 5 years 😂

Given that the /v2/continents api doesn't indicate instances vs public maps, it's difficult to construct a valid, overworld map. My assumption is that if the map's floor id is different from its default floor id, then it may be an instance. Has anyone found a different technique? Is this a reasonable approach?

Given #545 , it is not possible to relate data between v2/continents and v2/maps, so it seems like developers must select a single API.