![]() ![]() If you'd like to see a new feature you can open an issue or make pull request. I'll try to improve the wrapper as far as I need. The following environment variables are required: TEST_GAME_ID and TEST_GAME_URL, save those in the. ![]() Testing is done with PyTest, to run the tests use the command pytest. Other information about functions and exceptions can be found on the wiki. url = str ( exception ) result = supremacy. players () except ServerChangeError as exception : # update the url in the Supremacy instance supremacy. from supremacy1914_wrapper import Supremacy, ServerChangeError # Create a Supremacy instance using game id and server url supremacy = Supremacy ( "2502620", "" ) # Send a request and except server change error try : result = supremacy. Make sure to use a try except because the server changes over time. When you have to server url from the game you can pass it into the Supremacy constructor. Conquer provinces, forge alliances and build up your economy in real-time on persistent maps. players () except ServerChangeError as exception : # update the url in the Supremacy instance supremacy. Description Take over the control of one of the mighty nations during the times of World War 1 in the biggest WW1 strategy game of all time. ![]() from supremacy1914_wrapper import Supremacy, ServerChangeError # Create a Supremacy instance using game id supremacy = Supremacy ( "2502620" ) # Send a request and except server change error try : result = supremacy. If you don't have the server url you can make a Supremacy instance without the url parameter, wrap it in a try except to get the server url. We use cookies to improve user experience and analyse game usage. It's advised to store the server url for the game you want to request. The World War I real-time strategy browsergame. Install $ pip install supremacy1914-wrapper You'll only need to supply the server URL and the game_id before you'll be able to get data. This wrapper support API data as far as known and is intended to be easy to use. This unofficial API wrapper is an implementation of the Supremacy 1914 API.
0 Comments
Leave a Reply. |