Difference between revisions of "External Services and Tools/API Documentation/listregions"

From BattleMaster Wiki
Jump to navigation Jump to search
(Created page with "Lists, uncorrelated, all regions on an island. ==Parameters== {| style="background:#eee;" |- ! Parameter ! Type ! Meaning |-valign="top" | World | integer | Game world ID you...")
 
m
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Lists, uncorrelated, all regions on an island.
+
Lists all regions on an island.
  
 
==Parameters==
 
==Parameters==
Line 9: Line 9:
 
|-valign="top"
 
|-valign="top"
 
| World
 
| World
| integer
+
| integer/string
| Game world ID you access, see [[#World IDs]]
+
| Game world ID OR world name with first letters capitalized.
 
|}
 
|}
  
 
==Output==
 
==Output==
===XML/JSON===
+
Note: These lists are now sorted relative to one another as part of they are built.
<listing>
+
{{API_RegionList}}
  <region-ids> ''comma-seperated list of integers'' </region-ids>
 
  <region-names> ''comma-seperated list of strings'' </region-names>
 
</listing>
 
Note that these two lists ''are not sorted relative to each other'', so you can ''not'' take entry #x from one list and think it corresponds to entry #x from the other. IDs are listed numerically, names are listed alphabetically. For a list with correctly correlated IDs and names, please use the 'world-regions' access point.
 
  
 
== Example ==
 
== Example ==
 
; Regions on the East Island : http://battlemaster.org/data/listregions/1
 
; Regions on the East Island : http://battlemaster.org/data/listregions/1

Latest revision as of 09:34, 28 January 2022

Lists all regions on an island.

Parameters

Parameter Type Meaning
World integer/string Game world ID OR world name with first letters capitalized.

Output

Note: These lists are now sorted relative to one another as part of they are built.

XML

<xml>
 <listing>
  <region-ids>
   comma separated value list
  </region-ids>
  <region-names>
   comma separated value list
  </region-names>
 </listing>
</xml>

JSON

{
   "listing": {
       "region-ids": comma separated value list,
       "region-names": comma separated value list
   }
}

Example

Regions on the East Island 
http://battlemaster.org/data/listregions/1