aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/api.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bot/api.py b/bot/api.py
index 6b9598da2..20522d154 100644
--- a/bot/api.py
+++ b/bot/api.py
@@ -28,3 +28,11 @@ class APIClient:
async def get(self, endpoint: str, *args, **kwargs):
async with self.session.get(self._url_for(endpoint), *args, **kwargs) as resp:
return await resp.json()
+
+ async def post(self, endpoint: str, *args. **kwargs):
+ async with self.session.post(self._url_for(endpoint), *args, **kwargs) as resp:
+ return await resp.json()
+
+ async def delete(self, endpoint: str, *args. **kwargs):
+ async with self.session.delete(self._url_for(endpoint), *args, **kwargs) as resp:
+ return await resp.json()