External Services and Tools/API Documentation/realm

From BattleMaster Wiki
< External Services and Tools‎ | API Documentation
Revision as of 09:43, 28 January 2022 by Kagurati (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Lists details about a particular realm.

Parameters

Parameter Type Meaning
World integer/string Game world ID OR world name with first letters capitalized.
ID or Name integer/string ID number or name of the realm in question.
WithRegions boolean optional - if given, a list of region IDs (for use in the region.php script) and region names is included. only use this if you need them, it is considerably more expensive on the database than without

Outputs

XML

<xml>
 <realmdata>
  <continent> string </continent>
  <id> integer </id>
  <name> string </name>
  <fullname> string</fullname>
  <colour> string </colour>
  <banner> string </banner>
  <system> string </system>
  <capital> integer </capital>
  <rulertitle> string </rulertitle>
  <rulername> string </rulername>
  <generaltitle> string </generaltitle>
  <generalname> string </generalname>
  <judgetitle> string </judgetitle>
  <judgename> string </judgename>
  <bankertitle> string </bankertitle>
  <bankername> string </bankername>
  <population> string </population>
  <gold> string </gold>
  <food> string </food>
  <regioncount> string </regioncount>
  <nobles> integer </nobles>
  <adventurers> integer </adventurers>
  <duchycount> integer </duchycount>
  <region-ids>
   comma separated value list
  </region-ids>
  <region-names>
   comma separated value list
  </region-names>
  <summary>string</summary>
  <theme>comma-separated list of stings</theme>
 </realmdata>
</xml>

JSON

{
   "realmdata": {
       "id": integer,
       "continent": string,
       "continentid": string,
       "name": string,
       "fullname": string,
       "colour": string,
       "banner": string,
       "system": string,
       "capital": string,
       "rulertitle": string,
       "rulername": string,
       "generaltitle": string,
       "generalname": string,
       "judgetitle": string,
       "judgename": string,
       "bankertitle": string,
       "bankername": string,
       "population": string,
       "gold": string,
       "food": string,
       "regioncount": string,
       "nobles": integer,
       "adventurers": integer,
       "duchycount": integer,
       "region-ids": comma separated value list,
       "region-names": comma separated value list
       "summary": string,
       "theme": comma-separated list of strings
   }
}

Example

The Realm of Darka by ID 
http://battlemaster.org/data/realm.php?World=2&ID=14
The Realm of Arcaea by name, with regions 
http://battlemaster.org/data/realm.php?World=7&Name=Arcaea&WithRegions=True