Last active
August 12, 2019 18:02
-
-
Save Ronserruya/d0daea9e9b436e5821bb9cbbc2b8f7cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import clashroyale, asyncio | |
| async def top(client): | |
| p = await client.get_top_players() | |
| return p | |
| async def main(): | |
| token = "my token" | |
| cr = clashroyale.official_api.Client(token=token, is_async=True) | |
| try: | |
| topplayers = top(cr) | |
| # more methods | |
| finally: | |
| await cr.session.close() | |
| asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment