diff --git a/build_deb.sh b/build_deb.sh index 567adfe..a710b7b 100644 --- a/build_deb.sh +++ b/build_deb.sh @@ -34,7 +34,7 @@ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefi -d "python3-pigpio" \ -d "python3-numpy" \ -d "ffmpeg" \ - -v 0.1.0-3 -t deb setup.py + -v 0.1.1-0 -t deb setup.py # --deb-changelog changelog \ # --deb-upstream-changelog changelog \ diff --git a/compLib/Api.py b/compLib/Api.py index 4b4ffdc..230c563 100644 --- a/compLib/Api.py +++ b/compLib/Api.py @@ -14,6 +14,7 @@ API_URL_GET_ITEMS = API_URL + "getItems" API_URL_GET_PARK = API_URL + "getPark" API_URL_PAY_PARK = API_URL + "payPark" API_URL_SIMON_SAYS = API_URL + "simonSays" +API_URL_GET_SCORES = API_URL + "getScores" class Seeding: @@ -123,3 +124,15 @@ class DoubleElim: response = json.loads(res.content) Logging.get_logger().debug(f"DoubleElim.get_items = {response}, status code = {res.status_code}") return response, res.status_code + + @staticmethod + def get_scores() -> Tuple[Dict, int]: + """Get the current scores + + :return: A dictionary with all scores included like: {"self":2,"opponent":0} + :rtype: Tuple[Dict, int] + """ + res = requests.get(API_URL_GET_SCORES) + response = json.loads(res.content) + Logging.get_logger().debug(f"DoubleElim.get_scores = {response}, status code = {res.status_code}") + return response, res.status_code diff --git a/compLib/__init__.py b/compLib/__init__.py index bcbe0d7..fe11fc3 100644 --- a/compLib/__init__.py +++ b/compLib/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.1.0-3" +__version__ = "0.1.1-0" import compLib.LogstashLogging import logging diff --git a/setup.py b/setup.py index 0588203..a547066 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ else: setuptools.setup( name="complib", - version="0.1.0-3", + version="0.1.1-0", author="F-WuTs", author_email="--", description="",