API : Enhancements

  • Hello, hello.


    I know there was a subject about that quite a long time ago.


    But, we - external tools developpers - need more flexibility for getting any datas from the Kingdoms API.
    As such, the actual api allows us to get:
    - the api keys one one side,
    - update our external tools informations,
    - request the data update.


    All those requests are for only one Gameworld, and it's pretty good like that.


    Doing those requests, I realised some points :
    - the api key request allows us to create multiple tuples (public/private), even 1 every 2 seconds if we wanted. I did a try on that for the test server (only 3 times in 5 minutes) ... and I got 3 different pairs of keys, by sending exactly the same informations to the API, which is, imho not good.
    - given that our hosting servers might not be in the same timezone, it'd be great to get more informations in the key request. As such : the Gameworld Id, iterator, starting time and any fixed technical informations we usually get while asking for the data update. Most of those informations are "one time use", and should be requested only once, so why not in the key request?
    - some constants used ingame are not detailled in the data update. We have the landscape constants, but not oasis or resType ones. A specific request for those would be great.


    So, as I have previously proposed, here is a list of potential requests you could give us acces to:
    - getGameConstants : [global, no keys], to get the constants, depending on the api version tag given in getMapData;
    - getActiveGameworlds : [global, no keys], to get the current active gameworlds (gameworld id, name, iterator, url, startTime would be enough imho);
    - getMapData : [gameworld, with keys], as it's done at the moment.
    - getPlayerAvatar: [gameworld, with keys], to get the player avatar on a specific gameworld.
    - getRankings : [gameworld, with keys] to get the rankings for players and kingdoms on datas we don't have access to (or give the offensive points and defensive points for each players and kingdoms in the getMapData).
    - getUserAchievements : [global, with keys] to get the achievements realised by a User (not by an Avatar).
    - getReport: [gameworld, with keys] to get a report from the attacker, or the defender (the one receiving the attack, not the main support).
    It would be possible for you to rise the level of the API keys.


    Why might it be required?
    - For the rankings : to create statistics about that, without having to create scripts for.
    - For the reports : I found a way to get those by creating a simple JS console command (just need to copy/paste it to get the report datas).
    - For the avatar : Since we can use your design in our external tools ... why can't we just have the players avatar from you, instead of reinventing the wheel to have it?
    - For the achievements : Some players might like to openly display some of their achievements as a forum signature. So it might be interesting to get that. It would also allow us to create User statistics (who's the most "prestigious" one, for example, or who has the biggest amount of golden achievements done, and so on ...)


    Instead of saying "it's not a priority at the moment" (please, don't answer that, it's insulting us), since we already know that point, discuss with us to enhance the API (request and expected results only), as well as giving us an api documentation page.


    Warm regards,


    Knud


    PS : My best source of infos for the API request is still an email Sarge sent me after the 10th birthday event.

    Alpha : Knud, in "M&Ms" - Closed Beta : Knud, in "xTools" - Fast Iteration Server : Knud, in "TOP" - COM2 (Open Beta) : Knud, in "xTools" *
    FR5 : Ragnar, in "CMDB" *

  • There is no more "map.sql" file.


    Now, it's a json api, with accesskeys and such.

    Alpha : Knud, in "M&Ms" - Closed Beta : Knud, in "xTools" - Fast Iteration Server : Knud, in "TOP" - COM2 (Open Beta) : Knud, in "xTools" *
    FR5 : Ragnar, in "CMDB" *