diff options
Diffstat (limited to 'wikijscmd/custom_requests.py')
-rw-r--r-- | wikijscmd/custom_requests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wikijscmd/custom_requests.py b/wikijscmd/custom_requests.py index bc9b16e..a32a14c 100644 --- a/wikijscmd/custom_requests.py +++ b/wikijscmd/custom_requests.py @@ -28,3 +28,12 @@ def send_query(query, query_vars): handle_errors(r) return r.json() +def query_date(date): + res = requests.get( + f'{config["tracker"]["url"]}/{date}', + auth=requests.auth.HTTPBasicAuth( + config["tracker"]["username"], config["tracker"]["password"]) + ) + if res.status_code != 200: + return [] + return res.json() |