diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-26 23:50:22 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-27 10:42:05 +0100 |
| commit | 0c7abdcf1887285a5dccf0073629521a91cc0276 (patch) | |
| tree | f74e04b93f9b2df7eab6e6b47c644224529ec1c9 /crawler.py | |
| parent | 8b3cc388c11ab0f56e998728c0f61f1ef782f777 (diff) | |
| download | apigrabber-0c7abdcf1887285a5dccf0073629521a91cc0276.tar.gz apigrabber-0c7abdcf1887285a5dccf0073629521a91cc0276.zip | |
api: demo /matches endpoint
Diffstat (limited to 'crawler.py')
| -rw-r--r-- | crawler.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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. |
