/getScores is now implemented in api
This commit is contained in:
parent
a7d1fca14a
commit
ee9432317a
4 changed files with 16 additions and 3 deletions
|
@ -34,7 +34,7 @@ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefi
|
||||||
-d "python3-pigpio" \
|
-d "python3-pigpio" \
|
||||||
-d "python3-numpy" \
|
-d "python3-numpy" \
|
||||||
-d "ffmpeg" \
|
-d "ffmpeg" \
|
||||||
-v 0.1.0-3 -t deb setup.py
|
-v 0.1.1-0 -t deb setup.py
|
||||||
|
|
||||||
# --deb-changelog changelog \
|
# --deb-changelog changelog \
|
||||||
# --deb-upstream-changelog changelog \
|
# --deb-upstream-changelog changelog \
|
||||||
|
|
|
@ -14,6 +14,7 @@ API_URL_GET_ITEMS = API_URL + "getItems"
|
||||||
API_URL_GET_PARK = API_URL + "getPark"
|
API_URL_GET_PARK = API_URL + "getPark"
|
||||||
API_URL_PAY_PARK = API_URL + "payPark"
|
API_URL_PAY_PARK = API_URL + "payPark"
|
||||||
API_URL_SIMON_SAYS = API_URL + "simonSays"
|
API_URL_SIMON_SAYS = API_URL + "simonSays"
|
||||||
|
API_URL_GET_SCORES = API_URL + "getScores"
|
||||||
|
|
||||||
|
|
||||||
class Seeding:
|
class Seeding:
|
||||||
|
@ -123,3 +124,15 @@ class DoubleElim:
|
||||||
response = json.loads(res.content)
|
response = json.loads(res.content)
|
||||||
Logging.get_logger().debug(f"DoubleElim.get_items = {response}, status code = {res.status_code}")
|
Logging.get_logger().debug(f"DoubleElim.get_items = {response}, status code = {res.status_code}")
|
||||||
return response, 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
__version__ = "0.1.0-3"
|
__version__ = "0.1.1-0"
|
||||||
|
|
||||||
import compLib.LogstashLogging
|
import compLib.LogstashLogging
|
||||||
import logging
|
import logging
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -12,7 +12,7 @@ else:
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="complib",
|
name="complib",
|
||||||
version="0.1.0-3",
|
version="0.1.1-0",
|
||||||
author="F-WuTs",
|
author="F-WuTs",
|
||||||
author_email="--",
|
author_email="--",
|
||||||
description="",
|
description="",
|
||||||
|
|
Reference in a new issue