jsork - API Usage

jsork supports javascript API calls to the Amtgard ORK. The mobile application mORK was written using these APIs for example.

To utilize jsork the API file and the jquery library must be included in the web page as follows:

<script src="jsork.js"></script>
<script src="jquery.js"></script>

Then within any other javascript you utilize the promised based APIs. So to retrieve all the Kingdoms run the following:

jsork.kingdom.getKingdoms().then(function(allKingdoms) {
    console.log("There are " + allKingdoms.length + " Kingdoms in Amtgard");

Or to see Ken Walker's persona run the following:

jsork.player.getInfo(43232).then(function(player) {
    console.log("Ken's persona is " + player.Persona);