summaryrefslogtreecommitdiff
path: root/crawler.py
diff options
context:
space:
mode:
Diffstat (limited to 'crawler.py')
-rw-r--r--crawler.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawler.py b/crawler.py
index 07ca22f..68b994f 100644
--- a/crawler.py
+++ b/crawler.py
@@ -37,6 +37,13 @@ class Crawler(object):
assert response.status == 200
return await response.json()
+ async def version(self):
+ """Returns the current API version."""
+
+ async with aiohttp.ClientSession() as session:
+ status = await self._req(session, "status")
+ return status["data"]["attributes"]["version"]
+
async def matches(self, region="na", params=None):
"""Queries the API for matches and their related data.