diff --git a/core/ginger.py b/core/ginger.py index f8326b0454738f2d6460f6a4517594117247cd6d..00f00f36eac038665e26706972ed6ee79e7648e2 100644 --- a/core/ginger.py +++ b/core/ginger.py @@ -14,8 +14,8 @@ class Ginger(object): def __init__(self): if Ginger._instance!=None: - self.url = Settings['ginger.url'] self.api_key = Settings['ginger.key'] + self.url = Ginger.URL @property @staticmethod @@ -25,7 +25,7 @@ class Ginger(object): return Ginger._instance @staticmethod - def call(endpoint, params={}): + def get(endpoint, params={}): # Add the API key to the parameter list params['key'] = Ginger.instance.api_key diff --git a/core/player.py b/core/player.py index 0ce76570062f345acf944f9f7cdbf6099dafffbd..d79a8da5e49ed101b3ec96feac579b883c3a1dc6 100644 --- a/core/player.py +++ b/core/player.py @@ -121,7 +121,7 @@ class Player(QObject): ''' Retrieves a player's informations from the Ginger API ''' - response = Ginger.call('badge/{}'.format(rfid)) + response = Ginger.instance.get('badge/{}'.format(rfid)) if isinstance(response, HTTPStatus): logging.debug('Request to Ginger failed ({}): returning Guest'.format(response.value)) return PlayerGuest