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 = [emote async for emote in 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 Distribution

aioec-0.4.0.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file aioec-0.4.0.tar.gz.

File metadata

  • Download URL: aioec-0.4.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for aioec-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9042a3e61216066804c2e2792a8e6ff1f17bb5f36387b8cb5c0ea912ab30b802
MD5 7ae70a3ad1af7fe174a04e9c824d3a9d
BLAKE2b-256 4b554ee162120632a5d918e497850c37fb34fef6c344174993383f60fbc23367

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