1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Open API

Discussion in 'Infinity Army' started by harl3quin, Feb 15, 2019.

  1. harl3quin

    harl3quin Well-Known Member

    Joined:
    Jan 17, 2018
    Messages:
    35
    Likes Received:
    50
    Hey guys,

    just wondering if there is an API i could interact with :)

    cheers
     
    LeGweg, Romansky and rushputin like this.
  2. ijw

    ijw Ian Wood aka the Wargaming Trader. Rules & Wiki
    Infinity Rules Staff Warcor

    Joined:
    Apr 25, 2017
    Messages:
    7,331
    Likes Received:
    14,817
    You can download the JSON files that contain the data, but there's no API.
     
  3. harl3quin

    harl3quin Well-Known Member

    Joined:
    Jan 17, 2018
    Messages:
    35
    Likes Received:
    50
    thanks!
    where is it? and is it up to date?
     
  4. Ieldin Soecr

    Ieldin Soecr Well-Known Member

    Joined:
    Nov 23, 2017
    Messages:
    129
    Likes Received:
    329
    ijw likes this.
  5. harl3quin

    harl3quin Well-Known Member

    Joined:
    Jan 17, 2018
    Messages:
    35
    Likes Received:
    50
  6. Ben Kenobi

    Ben Kenobi Well-Known Member

    Joined:
    May 2, 2018
    Messages:
    1,386
    Likes Received:
    1,639
    What exactly are the valid Army_ID'S?
     
  7. Ben Kenobi

    Ben Kenobi Well-Known Member

    Joined:
    May 2, 2018
    Messages:
    1,386
    Likes Received:
    1,639
    Got it:

    PanO 101
    Acon 102
    MO 103
    Neo Terra 104
    Varuna 105

    Yu Jing 201
    IS 202
    (JSA 203)
    IA 204

    You can find the ID in the corresponding faction logo of the forum export of Infinity Army
     
    #7 Ben Kenobi, Feb 16, 2019
    Last edited: Feb 16, 2019
  8. Mahtamori

    Mahtamori Well-Known Member

    Joined:
    Nov 23, 2017
    Messages:
    12,018
    Likes Received:
    15,302
    I find IDs 404 and 405 quite interesting.
     
    Lesh' and toadchild like this.
  9. Ben Kenobi

    Ben Kenobi Well-Known Member

    Joined:
    May 2, 2018
    Messages:
    1,386
    Likes Received:
    1,639
    They cut the files. What were they fore?
     
  10. Jan

    Jan New Member

    Joined:
    Mar 2, 2019
    Messages:
    1
    Likes Received:
    1
    And now I'm dreaming about a web app to
    automate all dice rolls between two given army lists.

    All available faction IDs can also be found in the translation file
    https://army.infinitythegame.com/import/idioma_ENG.js
    - in the JSON_SECTORIAL_NOMBRE section:

    "idSectorial_901" : "Non-Aligned Armies"
    "idSectorial_902" : "Druze Bayram Security"
    "idSectorial_903" : "Japanese Secessionist Army"
    "idSectorial_904" : "Ikari Company"
    "idSectorial_905" : "Starco. Free Company of the Star"
    "idSectorial_101" : "PanOceania"
    "idSectorial_102" : "Shock Army of Acontecimento"
    "idSectorial_103" : "Military Orders"
    "idSectorial_104" : "Neoterran Capitaline Army"
    "idSectorial_105" : "Varuna Immediate Reaction Division"
    "idSectorial_201" : "Yu Jing"
    "idSectorial_202" : "Imperial Service"
    // "idSectorial_203" : "Japanese Sectorial Army"
    "idSectorial_204" : "Invincible Army"
    "idSectorial_301" : "Ariadna"
    "idSectorial_302" : "Caledonian Highlander Army"
    "idSectorial_303" : "Force de Réponse Rapide Merovingienne"
    "idSectorial_304" : "USAriadna Ranger Force"
    "idSectorial_305" : "Tartary Army Corps"
    "idSectorial_401" : "Haqqislam"
    "idSectorial_402" : "Hassassin Bahram"
    "idSectorial_403" : "Qapu Khalqi"
    "idSectorial_501" : "Nomads"
    "idSectorial_502" : "Jurisdictional Command of Corregidor"
    "idSectorial_503" : "Jurisdictional Command of Bakunin"
    "idSectorial_504" : "Jurisdictional Command of Tunguska"
    "idSectorial_601" : "Combined Army"
    "idSectorial_602" : "Morat Aggression Force"
    "idSectorial_603" : "Shasvastii Expeditionary Force"
    "idSectorial_604" : "Onyx Contact Force"
    "idSectorial_701" : "ALEPH"
    "idSectorial_702" : "Steel Phalanx"
    "idSectorial_703" : "Operations Subsection of the S.S.S."
    "idSectorial_801" : "Tohaa"
     
    oldGregg likes this.
  11. Kurolox

    Kurolox Member

    Joined:
    Mar 6, 2019
    Messages:
    1
    Likes Received:
    9
    Hello.

    I've stumbled upon this post, so I though that it would be worth mentioning that I'm working on making a public API out of the infinity army JSON files.

    If anyone wants to check it out (though it's not even close to being finished yet, so far I've finished parsing the JSON and right now I'm working in structuring the data into a sqlite database so you can make queries on it) here's the link:

    https://github.com/Kurolox/infinity-api

    You can also use what I have in there so far to fetch all their files and generate properly formatted individual JSON files (run fetcher.py)

    Have a nice day!
     
  12. harl3quin

    harl3quin Well-Known Member

    Joined:
    Jan 17, 2018
    Messages:
    35
    Likes Received:
    50
    love it, looking forward to it!
     
  13. ZlaKhon

    ZlaKhon New scale enthusiast

    Joined:
    Nov 27, 2017
    Messages:
    444
    Likes Received:
    506
    Not sure if this is OT or not:

    I just had the idea to build a „NA2 sectorial creator“ in the sense that I‘d like to create a clone of Army in which I add a new sectorial with units from different factions and self written link team rules.

    I‘m pretty clueless about programming outside of some science stuff, so I was hoping I might be able to reuse lots of the army code base. Are there ways to do so or is there nothing aside from this JSON file which in the end just has profile values etc?
     
    Wolf likes this.
  14. ZlaKhon

    ZlaKhon New scale enthusiast

    Joined:
    Nov 27, 2017
    Messages:
    444
    Likes Received:
    506
    Or maybe to clarify:

    I feel like the only thing necessary to create a new sectorial would be to add the required data into the data bank that seems to be in the JSON file and then get army to load the new file instead of the standard one. Does that sound about right?
     
  15. ZlaKhon

    ZlaKhon New scale enthusiast

    Joined:
    Nov 27, 2017
    Messages:
    444
    Likes Received:
    506
    Thanks for doing this!

    I am pretty new to this, so I'm not sure how to work with the provided files. So far, I managed to clone the github repository into my Pycharm CE, install the required packages and run fetcher.py without any errors. I feel like the next step would be to to put a command like this one
    store_remote_data('https://army.infinitythegame.com/im...,'testJSONfile','Users/XXXXX/PycharmProjects/') into the Python console, or maybe something like fetch_json('idSectorial_701').
    Does anyone have the commands necessary to create that database?
     
  16. n21lv

    n21lv SymbioHate

    Joined:
    Nov 27, 2017
    Messages:
    592
    Likes Received:
    767
    We tried to create something like that with @Magonus. Unfortunately, being the only coder and having other priorities and interests in life, along with supposedly low interest in the project and upcoming updates for Tohaa (at the time) and dealing with print layouts had me burn out.

    If there is another coder who would like to share the workload, I'd consider another attempt to finish the project, but there has been no interest so far.
     
    ZlaKhon likes this.
  17. Muad'dib

    Muad'dib Well-Known Member

    Joined:
    Feb 6, 2021
    Messages:
    165
    Likes Received:
    373
    Sorry to resurrect this thread. I am looking to develop a program that needs to pull unit profiles (stat blocks, weapons, and equipment) and it looks like the previous urls to download the database are no longer valid (they all redirect to the ARMY 7 main page). Is it still possible to download the database and/or has an API been developed?
     
  18. Ieldin Soecr

    Ieldin Soecr Well-Known Member

    Joined:
    Nov 23, 2017
    Messages:
    129
    Likes Received:
    329
  19. Romansky

    Romansky Shadowrunner

    Joined:
    Mar 26, 2021
    Messages:
    117
    Likes Received:
    129
    yeah, REST-API could really push aditional-community Tools etc...
     
    LeGweg and zapp like this.
  • About Us

    We are a company founded in 2001 in Cangas (Spain), and devoted to design and manufacture games and figures. Our main product, Infinity the Game, was born with the ambition to satisfy the most demanding audience, offering the best quality.

     

    Why are we here?

     

    Because we are, first and foremost, players.

  • Quick Navigation

    Open the Quick Navigation