summaryrefslogtreecommitdiff
path: root/teawie_bot/apis/guzzle.py
diff options
context:
space:
mode:
authorseth <[email protected]>2023-04-04 23:23:28 -0400
committerseth <[email protected]>2023-04-05 20:34:12 -0400
commit65d0b7a553f718b1ba34799e604ceb07c062af61 (patch)
tree9a6b1c78aa6e79c2201ba124b536a05231b0ae20 /teawie_bot/apis/guzzle.py
parented076bbd6fc22b32ea353ae6bd3cac79d039719a (diff)
rewrite in rust :)
Diffstat (limited to 'teawie_bot/apis/guzzle.py')
-rw-r--r--teawie_bot/apis/guzzle.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/teawie_bot/apis/guzzle.py b/teawie_bot/apis/guzzle.py
deleted file mode 100644
index d307ddd..0000000
--- a/teawie_bot/apis/guzzle.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import requests
-
-GUZZLE: str = "http://198.199.68.30"
-
-
-def get_random_teawie() -> str:
- resp: requests.Response
- try:
- resp = requests.get(GUZZLE + "/get_random_teawie", timeout=30)
- except (requests.RequestException, requests.ConnectionError,
- requests.HTTPError, requests.JSONDecodeError):
- return "something went wrong :("
- if not resp.status_code == 200:
- return "api request failed :("
-
- try:
- ret = resp.json()["url"]
- except KeyError:
- return "couldn't get url from api response :("
- return ret