diff options
| -rw-r--r-- | bot/api.py | 8 |
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() |