![]() ![]() 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. ![]() 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. ![]() Get this app while signed in to your Microsoft account and install on up to ten. To ensure further improvements and fresh content, there is the possibility to purchase premium currency and premium account in-game. ![]() 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. Supremacy 1914 is a free game and is continuously being updated and further developed. It's advised to store the server url for the game you want to request. 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. |