External Services and Tools/API Documentation/realm

From BattleMaster Wiki
< External Services and Tools‎ | API Documentation
Revision as of 09:52, 29 December 2021 by Kagurati (talk | contribs) (Created page with "{{RightTOC}} Lists details about a particular realm. ==Parameters== {| style="background:#eee;" |- ! Parameter ! Type ! Meaning |-valign="top" | World | integer | Game world...")
(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 Game world ID you access, see #World IDs
ID integer ID number of the realm in question. You can find this for example by examining the URL of the "Details" link on the Realm List page, or (if the page is already set up correctly) on the realm's page here in the wiki. Can be replaced by Name.
Name text/string Can replace ID. Name of the Realm being queried.
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

<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 list of strings</region-ids>
   <region-names> comma-separated list of strings</region-names>
   <summary>string</summary>
   <theme>comma-separated list of stings</theme>
</realmdata>

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 list of strings,
       "region-names": comma-separated list of strings,
       "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