NOTE: We are currently updating our Javascript API, so these instructions can change from time to time. Please check this page again when you implement a new game for us.
Javascript API for Kiz10 must be added to the html build once generated. To do it, add this line to your index.html file or where it applies:
<script type="text/javascript" src="https://cdn.kiz10.com/applications/controllers/js/_apiKiz10.js?000000000001"></script>
Then you'll need to instantiate the api object, initialize it with the ID / api-key of your game and provide it the stats you'll be using in your game's api implementation (see general instructions), this way:
Kiz10API._INIT('123456','sdaiouwqew45d4a6sd7645'); Kiz10API._SETARRAY_STATS("score,levels,stars");
After that, you can use this Kiz10API variable to submit scores and unlock achievements as described on general instructions.
<script type="text/javascript" src="https://cdn.kiz10.com/applications/controllers/js/_apiKiz10.js?000000000001"></script> <script type="text/javascript"> // Initilize the api Kiz10API._INIT('123456','sdaiouwqew45d4a6sd7645'); Kiz10API._SETARRAY_STATS("score,levels,stars"); // Submit scores and stats function submitStat(COD_STAT,VALUE) { Kiz10API.submitStat(COD_STAT,VALUE); } // Unlock achievements not based on stats function submitAchievProgress(ACHIEVEMENT,PROGRESS) { Kiz10API.submitAchievProgress(ACHIEVEMENT,PROGRESS); } </script>