add advanced game settings
This commit is contained in:
11
SatiAPI.py
11
SatiAPI.py
@@ -16,7 +16,7 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
class SatiAPI:
|
||||
"""A API wrapper for Satisfactory dedicated server"""
|
||||
__AUTHOR__ = 'anima'
|
||||
__VERSION__ = '0.3.2'
|
||||
__VERSION__ = '0.4.0'
|
||||
|
||||
def __init__(self, host: str = None, port: int = 7777, token: str = None, conffile: str = 'conf.yml', logfile: str = 'SatiAPI.log', loglevel: int = 20) -> None:
|
||||
"""create a wrapper for satisfactory dedicated server
|
||||
@@ -248,10 +248,17 @@ class SatiAPI:
|
||||
"""
|
||||
return self.__query('GetServerOptions')
|
||||
|
||||
def get_advanced_game_settings(self):
|
||||
"""Retrieves currently applied advanced game settings. Does not require input parameters.
|
||||
|
||||
:return: full return from server
|
||||
:rtpye: dict
|
||||
"""
|
||||
return self.__query('GetAdvancedGameSettings')
|
||||
## todo
|
||||
#PasswordlessLogin
|
||||
|
||||
if __name__ == "__main__":
|
||||
sati = SatiAPI(loglevel=10)
|
||||
# print('Verbundene Spieler: ', sati.get_status()['serverGameState']['numConnectedPlayers'])
|
||||
print(sati.get_server_options())
|
||||
print(sati.get_advanced_game_settings())
|
||||
Reference in New Issue
Block a user