1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hemos actualizado nuestra Política de Privacidad acorde con la nueva RGPD. +Info // We've updated our Privacy Policy to comply with the GDPR. +Info
    Dismiss Notice

Open API

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

  1. harl3quin

    harl3quin Well-Known Member

    Joined:
    Jan 17, 2018
    Messages:
    31
    Likes Received:
    47
    Hey guys,

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

    cheers
     
    rushputin likes this.
  2. ijw

    ijw Wargaming Trader, Freelance Editor (UK)
    Warcor

    Joined:
    Apr 25, 2017
    Messages:
    5,281
    Likes Received:
    10,694
    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:
    31
    Likes Received:
    47
    thanks!
    where is it? and is it up to date?
     
  4. Ieldin Soecr

    Ieldin Soecr Well-Known Member

    Joined:
    Nov 23, 2017
    Messages:
    80
    Likes Received:
    158
    ijw likes this.
  5. harl3quin

    harl3quin Well-Known Member

    Joined:
    Jan 17, 2018
    Messages:
    31
    Likes Received:
    47
  6. Ben Kenobi

    Ben Kenobi Well-Known Member

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

    Ben Kenobi Well-Known Member

    Joined:
    May 2, 2018
    Messages:
    1,234
    Likes Received:
    1,272
    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:
    6,437
    Likes Received:
    7,992
    I find IDs 404 and 405 quite interesting.
     
    toadchild likes this.
  9. Ben Kenobi

    Ben Kenobi Well-Known Member

    Joined:
    May 2, 2018
    Messages:
    1,234
    Likes Received:
    1,272
    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:
    8
    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!
     
    meikyoushisui, n21lv, ZlaKhon and 5 others like this.
  12. harl3quin

    harl3quin Well-Known Member

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

    ZlaKhon New scale enthusiast

    Joined:
    Nov 27, 2017
    Messages:
    396
    Likes Received:
    446
    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:
    396
    Likes Received:
    446
    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:
    396
    Likes Received:
    446
    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:
    496
    Likes Received:
    695
    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.