aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-11-10 13:26:10 +0100
committerGravatar Johannes Christ <[email protected]>2018-11-10 13:26:10 +0100
commit8938871b6c522eeba519224fa864d55b5a7d099f (patch)
tree65104e75eb2f0fffd174d318febf36f427de686b
parentAdd `delete` and `post` API methods. (diff)
Remove obsolete method.
-rw-r--r--bot/cogs/tags.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py
index 85244b835..d9bee6608 100644
--- a/bot/cogs/tags.py
+++ b/bot/cogs/tags.py
@@ -89,27 +89,6 @@ class Tags:
self.tag_cooldowns = {}
self.headers = {"Authorization": f"Token {Keys.site_api}"}
- async def get_tag_data(self, tag_name=None) -> dict:
- """
- Retrieve the tag_data from our API
-
- :param tag_name: the tag to retrieve
- :return:
- if tag_name was provided, returns a dict with tag data.
- if not, returns a list of dicts with all tag data.
-
- """
-
- if tag_name:
- url = f'{URLs.site_tags_api}/{tag_name}'
- else:
- url = URLs.site_tags_api
-
- response = await self.bot.http_session.get(url, headers=self.headers)
- tag_data = await response.json()
-
- return tag_data
-
async def post_tag_data(self, tag_name: str, tag_content: str, image_url: Optional[str]) -> dict:
"""
Send some tag_data to our API to have it saved in the database.