As per https://gitter.im/arenanet/api-cdi?at=59ed9a0f8808bed73d17ec6e i'd like to split this endpoint into separate endpoints. This issue precedes #283 and profits from #61 and #62.
/v2/continents/:continent_id [breaking*]
Originally i thought about individual endpoints for continents and floors, but they don't make any sense without each other. Either way, having the data that way is at best useful for crawling. (this is not as easy as i thought it would be... 😬).
For :continent_id merge all regions responses for the given continent like SELECT regions FROM gw2_map_floors WHERE continent_id = 2 GROUP BY regions and add these as regions: []
{
"id": 2,
"name": "Die Nebel",
"min_zoom": 0,
"max_zoom": 6,
"continent_dims": [16384, 16384],
"floors": [1, 3, 5, ...],
"regions": [6, 7, 25, 26]
}
/v2/continents/:continent_id/regions/:region_id [breaking*]
:region_id should return a list of available floors and maps within that region like SELECT floor_id, maps FROM gw2_regions WHERE continent_id = 1 AND region_id = 1
{
"id": 1,
"name": "Zittergipfelgebirge",
"label_coord": [19840, 13568],
"continent_rect": [
[17664, 8064],
[23808, 21376]
],
"maps": [26, 27, 28, 29, 30, 31, 70, 71, ...],
"floors": [-14, -13, -7, 0, 1, 2, ...],
}
/v2/continents/:continent_id/floors/:floor_id
The /v2/continents/:continent_id/floors response is already included in /v2/continents/:continent_id and i'm not sure about .../floors/:floor_id - this bloat of data doesn't make much sense at all.
/v2/maps/:map_id
/v2/maps?ids&floors&continent®ions&lang
This endpoint should return data for select floors if ?floors=... is set, otherwise for all available floors: SELECT map_id, floor_id, data_en FROM gw2_maps WHERE map_id = 76 AND floor_id IN(-4,4,5).
The current /v2/continents/:continent_id/floors/:floor_id/regions/:region_id would be mostly redundant with the proposed regions response and could be dropped in favor of /v2/maps/:map_id?floors.
[
{
"id": 28,
"name": "Wayfarer Foothills",
"floor": 0,
"default_floor": 1,
...
},
...
]
/v2/maps/:id/events
/v2/maps/events?map_ids&event_id&floors&continent®ions&lang
This endpoint would merge the bits of /v1/event_details.json for given map_ids with event_id&floors&continent®ions as filters (if possible). See 0d5769b
/v2/maps/:id/poi
/v2/maps/:id/tasks
/v2/maps/:id/vistas
...
Make the sub-arrays available as convenience endpoints.
remains a myth.
* /v3/continents
As per https://gitter.im/arenanet/api-cdi?at=59ed9a0f8808bed73d17ec6e i'd like to split this endpoint into separate endpoints. This issue precedes #283 and profits from #61 and #62.
/v2/continents/:continent_id[breaking*]Originally i thought about individual endpoints for continents and floors, but they don't make any sense without each other. Either way, having the data that way is at best useful for crawling. (this is not as easy as i thought it would be... 😬).
For
:continent_idmerge all regions responses for the given continent likeSELECT regions FROM gw2_map_floors WHERE continent_id = 2 GROUP BY regionsand add these asregions: []{ "id": 2, "name": "Die Nebel", "min_zoom": 0, "max_zoom": 6, "continent_dims": [16384, 16384], "floors": [1, 3, 5, ...], "regions": [6, 7, 25, 26] }/v2/continents/:continent_id/regions/:region_id[breaking*]:region_idshould return a list of available floors and maps within that region likeSELECT floor_id, maps FROM gw2_regions WHERE continent_id = 1 AND region_id = 1{ "id": 1, "name": "Zittergipfelgebirge", "label_coord": [19840, 13568], "continent_rect": [ [17664, 8064], [23808, 21376] ], "maps": [26, 27, 28, 29, 30, 31, 70, 71, ...], "floors": [-14, -13, -7, 0, 1, 2, ...], }/v2/continents/:continent_id/floors/:floor_idThe
/v2/continents/:continent_id/floorsresponse is already included in/v2/continents/:continent_idand i'm not sure about.../floors/:floor_id- this bloat of data doesn't make much sense at all./v2/maps/:map_id/v2/maps?ids&floors&continent®ions&langThis endpoint should return data for select floors if
?floors=...is set, otherwise for all available floors:SELECT map_id, floor_id, data_en FROM gw2_maps WHERE map_id = 76 AND floor_id IN(-4,4,5).The current
/v2/continents/:continent_id/floors/:floor_id/regions/:region_idwould be mostly redundant with the proposed regions response and could be dropped in favor of/v2/maps/:map_id?floors.[ { "id": 28, "name": "Wayfarer Foothills", "floor": 0, "default_floor": 1, ... }, ... ]/v2/maps/:id/events/v2/maps/events?map_ids&event_id&floors&continent®ions&langThis endpoint would merge the bits of
/v1/event_details.jsonfor givenmap_idswithevent_id&floors&continent®ionsas filters (if possible). See 0d5769b/v2/maps/:id/poi/v2/maps/:id/tasks/v2/maps/:id/vistas...
Make the sub-arrays available as convenience endpoints.
/v2/floorsremains a myth.
* /v3/continents