API talk:2/continents

From Guild Wars 2 Wiki
Jump to navigationJump to search

Floors has been moved into continents[edit]

It has been a while since this PR got merged and is active, but the API docs here on the wiki haven't changed to reflect this yet. I could've asked access to change it myself, but seeing that I'm not an active contributor here I thought it would be better to bring someone else's attention to this. --Archomeda (talk) 13:23, 8 April 2015 (UTC)

+1 I couldn't find the floors documentation anymore. Seems the page was deleted without preserving the information. https://web.archive.org/web/20151030193408/https://wiki.guildwars2.com/wiki/API:2/floors --~Steven (talk) 10:18, 8 May 2021 (UTC)
If you need the content of the deleted page "API:2/floors", please find it below:
{{Warning|This endpoint is merged with the [[API:2/continents|/v2/continents]] endpoint according to a [https://github.com/arenanet/api-cdi/pull/2 developer statement].}}
{{API endpoint infobox
| endpoint = /v2/floors
| version = 2
| release = 
}}
This resource returns details about a map floor, used to populate a world map. All coordinates are map coordinates.

The returned data only contains static content. Dynamic content, such as vendors, is not currently available.

== Parameters ==
; Optional parameters
* <code>lang</code> – Show localized texts in the specified language.

== Response ==
If the root endpoint (<code>/v2/floors</code>) is accessed without specifying a continent id, a list of all continent ids is returned. 

If a continent id is specified (<code>/v2/floors/<continent_id></code>), a list of all floor ids on that continent is returned.

If a continent id and a floor id are specified (<code>/v2/floors/<continent_id>/<floor_id></code>), the map details for that continent and floor are returned as an object with the following properties:

* <code>texture_dims</code> (''dimension'') – The dimensions of the texture.
* <code>clamped_view</code> (''rectangle'') - If present, it represents a rectangle of downloadable textures. Every tile coordinate outside this rectangle is not available on the tile server.
* <code>regions</code> (object) – A mapping from region id to an object.

Each ''region'' object contains the following properties:

* <code>name</code> (string) – The region name.
* <code>label_coord</code> (''coordinate'') – The coordinates of the region label.
* <code>maps</code> (object) – A mapping from the map id to an object.

Each ''map'' object contains the following properties:

* <code>name</code> (string) – The map name.
* <code>min_level</code> (number) – The minimum level of the map.
* <code>max_level</code> (number) – The maximum level of the map.
* <code>default_floor</code> (number) – The default floor of the map.
* <code>map_rect</code> (''rectangle'') – The dimensions of the map, given as the coordinates of the lower-left (SW) and upper-right (NE) corners.
* <code>continent_rect</code> (''rectangle'') – The dimensions of the map within the continent coordinate system, given as the coordinates of the upper-left (NW) and lower-right (SE) corners.
* <code>points_of_interest</code> (list) – A list of points of interest ([[Point of Interest|landmark]]s, [[waypoint]]s and [[vista]]s)
* <code>tasks</code> (list) – A list of [[Renown Heart|renown hearts]].
* <code>skill_challenges</code> (list) – A list of [[skill challenge]]s.
* <code>sectors</code> (list) – A list of [[area]]s within the map.

Each element of the ''points_of_interest'' list is an object with the following properties:

* <code>poi_id</code> (number) – The point of interest id.
* <code>name</code> (string) – The name of the point of interest.
* <code>type</code> (string) – The type. This can be either <code>"landmark"</code> for actual [[Point of Interest|points of interest]], <code>"waypoint"</code> for [[waypoint]]s, or <code>"vista"</code> for [[vista]]s.
* <code>floor</code> (number) – The floor of this object.
* <code>coord</code> (''coordinate'') – The coordinates of this object.

Each element of the ''tasks'' list is an object with the following properties:

* <code>task_id</code> (number) – The renown heart id.
* <code>objective</code> (string) – The objective or name of the heart.
* <code>level</code> (number) – The level of the heart.
* <code>coord</code> (''coordinate'') – The coordinates where it takes place.

Each element of the ''skill_challenges'' list is an object with the following properties:

* <code>coord</code> (''coordinate'') – The coordinates of this skill challenge.

Each element of the ''sector'' list is an object with the following properties:

* <code>sector_id</code> (number) – The area id.
* <code>name</code> (string) – The name of the area.
* <code>level</code> (number) – The level of the area.
* <code>coord</code> (''coordinate'') – The coordinates of this area (this is usually the center position).

; Special types:
* Dimension properties are two-element lists of width and height.
* Coordinate properties are two-element lists of the x and y position.
* Rectangle properties are two-element lists of coordinates.

== Example ==
https://api.guildwars2.com/v2/floors/1/0

 {
   "texture_dims": [ 32768, 32768 ],
   "regions": {
     "1": {
       "name": "Shiverpeak Mountains",
       "label_coord": [ 19840, 13568 ],
       "maps": {
         "31": {
           "name": "Snowden Drifts",
           "min_level": 15,
           "max_level": 25,
           "default_floor": 1,
           "map_rect": [
             [ -49152, -24576 ],
             [ 49152, 24576 ]
           ],
           "continent_rect": [
             [ 17664, 11264 ],
             [ 21760, 13312 ]
           ],
           "points_of_interest": [
             {
               "poi_id": 164,
               "name": "Blasted Haven",
               "type": "landmark",
               "floor": 1,
               "coord": [ 20768.5, 11893.5 ]
             },
             ...
           ],
           "tasks": [
             {
               "task_id": 28,
               "objective": "Help hunters and travelers near the road.",
               "level": 15,
               "coord": [ 21326.4, 11982.8 ]
             },
             ...
           ],
           "skill_challenges": [
             {
               "coord": [ 18922.3, 11445.5 ]
             },
             ...
           ],
           "sectors": [
             {
               "sector_id": 1015,
               "name": "King Jalis's Refuge",
               "level": 19,
               "coord": [ 21673.8, 12111.8 ]
             },
             ...
           ]
         },
         ...
       }
     },
     "4": {
       "name": "Kryta",
       "label_coord": [ 13440, 13696 ],
       "maps": {
         "15": {
           "name": "Queensdale",
           ...
         },
         ...
       }
     },
     ...
   }
 }
-Chieftain AlexUser Chieftain Alex sig.png 14:04, 8 May 2021 (UTC)