Skip to main content

async client library for the Emote Collector API

Project description

An aiohttp-based client for the Emote Collector API.

Usage

import aioec

client = aioec.Client(token='your token here')
# if no token is provided, only anonymous endpoints will be available

# this step isn't necessary but makes sure that your token is correct
my_user_id = await client.login()
# it returns the user ID associated with your token

# in a coroutine...
emote = await client.emote('Think')
emote.name  # Think

await emote.edit(name='Think_', description='a real happy thinker')
# remove the description:
await emote.edit(description=None)

for gamewisp_emote in await client.search('GW'):
        await gamewisp_emote.delete()

all_emotes = await client.emotes()
popular_emotes = await client.popular()

await client.close()

# it's also a context manager:
async with aioec.Client(token=my_token) as client:
        await client.delete('Think_')
# this will automatically close the client

License

MIT/X11

Copyright © 2018 Benjamin Mintz <bmintz@protonmail.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

aioec-0.3.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file aioec-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: aioec-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for aioec-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f182a2b190f70b13af9b2dfb8b29c82aff613662c13a95f5c507af5e4bf0987
MD5 cc5c58bc0b9b695e7b7cbf0bc220b973
BLAKE2b-256 0641be89f7e62d25467fa64e2d9de859c0043f6dcb66638a91bffcc211f3bf1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page