Commit 4b5260cb authored by Antoine Lima's avatar Antoine Lima

Typo in ginger/player

parent 035a14af
...@@ -14,8 +14,8 @@ class Ginger(object): ...@@ -14,8 +14,8 @@ class Ginger(object):
def __init__(self): def __init__(self):
if Ginger._instance!=None: if Ginger._instance!=None:
self.url = Settings['ginger.url']
self.api_key = Settings['ginger.key'] self.api_key = Settings['ginger.key']
self.url = Ginger.URL
@property @property
@staticmethod @staticmethod
...@@ -25,7 +25,7 @@ class Ginger(object): ...@@ -25,7 +25,7 @@ class Ginger(object):
return Ginger._instance return Ginger._instance
@staticmethod @staticmethod
def call(endpoint, params={}): def get(endpoint, params={}):
# Add the API key to the parameter list # Add the API key to the parameter list
params['key'] = Ginger.instance.api_key params['key'] = Ginger.instance.api_key
......
...@@ -121,7 +121,7 @@ class Player(QObject): ...@@ -121,7 +121,7 @@ class Player(QObject):
''' '''
Retrieves a player's informations from the Ginger API 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): if isinstance(response, HTTPStatus):
logging.debug('Request to Ginger failed ({}): returning Guest'.format(response.value)) logging.debug('Request to Ginger failed ({}): returning Guest'.format(response.value))
return PlayerGuest return PlayerGuest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment