• Official Post

    Hello Developers!


    today we launched a new function for JSON (JavaScript Object Noation) output.
    This is at this moment only available for SI Classic.


    The following features can be used:
    - a battle report
    - a spy report
    - on a galaxy view (map)
    - the intergalactic planet overview


    All Json Objects contain a "info" Object like:


    here you can see the:
    - the spaceinvasion version
    - the version of the JSON API
    - the user information (user ID and nickname) of the exported json
    - the universe where this is coming from
    - the type of this json object structure


    Universe IDs:
    RETRO: 31
    GeNeSIS²: 40
    Ecowars: 41
    Nexus: 44



    in the following posts i will show you the different types of JSON output.


    regards
    Dschibait

    • Official Post

    Battle Report JSON Data


    below, you see the JSON output for a fight that happend some time ago. Its just a example to show you the strcuture of this JSON object.


    Some key features:
    - you get attacker as also defener information (nickname, userid and researches
    - you get planet informations, starting planet id, coords, type and destinationplanet id coords and type
    - you get the amount of ships / defense in each round and the sum of damage, structure and shields
    - you get the astro chance and if an astro is created or not


    • Official Post

    Spy Report JSON Data

    below, you see the JSON output for a spy report that happend some time ago. Its just a example to show you the strcuture of this JSON object.


    Some key features:
    - you see all data that also the spy reports contains like: buildings, researches, ships, defense, resources and also if the teleporter is active (and if yes, the energy)
    - you see the chance of the spy mission
    - you see how many spy probes are destroyed


    • Official Post

    Galaxy Map JSON Data


    below, you see the JSON output for a the map 01:01 (Nexus). Its just a example to show you the strcuture of this JSON object.


    Some key features:
    - you see the position of this map view
    - you get a list of all planets with there position, id, coords, planet image, user information (if a user has colonized this planet otherwise "false"), rubblefield informations, if this planet has a astroid and finally if this planet is a event planet (flower, snow or pumpkin)
    - please not that you can't only access data which you can see in the game (in ecowars the fog of war system will block also this for you)
    - there are different status informations - they based on the user who export this.


    possible "status" values for planets:


    noUser: this planet is not colonized
    locked: this user is locked or marked as deleted
    locked.vacationMode: this player is locked and in vacation
    locked.inactive: this player is locked and inactive
    admin: this player is a team member
    own: this is one of your planets
    friendly: this is a planet of an alliance member
    vacationMode: this player is in vacation mode
    inactive: this player is inactive
    enemy: this player is attackable by you
    bnd: this player's alliance has a coalition (in german bündnis) with your alliance
    nap: this player's alliance has a non-aggression pact with your alliance
    wing: this player's alliance has a wing contract with your alliance
    noob: this player's attackzone is to low to fight with you
    strong: this player's attackzone is to high to fight with you



    • Official Post

    All Planet Exported JSON Data


    below, you see the JSON output for my 2 Planets on Nexus. Its just a example to show you the strcuture of this JSON object.


    Some key features:
    - you see all planet data like: id, temperature, fields, image, resources, energy (used and free), storage capacity, ships and defense
    - you get also building levels
    - you also get the research levels for this user
    - you get astroid informations (or false) to any planet


    • Official Post

    Hello Developer,


    starting today we offer you a new tool for validating and parsing battle reports.


    Any battle report in spaceinvasion will contain a new value "shared". This is "false" if this report isn't shared. If it is shared, you will get a 10 character phrase for accessing this report.


    You can access any report by the following URL:


    https://spaceinvasion.bitmeup.com/battle.php?u=[UNIVERSE-ID]&r=[REPORT-ID]&k=[KEY]


    (For getting a JSON-Reponse only, add &json=1 to this URI)


    Finally, you can now validate any shared report with this functionallity to run your own statistics or print outs.


    Any player can also get an export of type "battle-report-external" from any shared report (see above).
    These exports dosn't contain PlanetID's and/or Coordinates.


    regards
    Dschibait