Skip to content

Instantly share code, notes, and snippets.

@Ronserruya
Last active August 12, 2019 18:02
Show Gist options
  • Select an option

  • Save Ronserruya/d0daea9e9b436e5821bb9cbbc2b8f7cd to your computer and use it in GitHub Desktop.

Select an option

Save Ronserruya/d0daea9e9b436e5821bb9cbbc2b8f7cd to your computer and use it in GitHub Desktop.
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