From 4b5260cbdd45f4dd0dfa959d0288110278649040 Mon Sep 17 00:00:00 2001 From: Antoine Lima Date: Mon, 7 Jan 2019 09:55:16 +0100 Subject: [PATCH] Typo in ginger/player --- core/ginger.py | 4 ++-- core/player.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ginger.py b/core/ginger.py index f8326b0..00f00f3 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 0ce7657..d79a8da 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 -- GitLab