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
Release history Release notifications | RSS feed
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.1.0.tar.gz
(5.8 kB
view details)
File details
Details for the file aioec-0.1.0.tar.gz
.
File metadata
- Download URL: aioec-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac461bf511be6e7f0235aed4027ff93153e910dc92cb75c730b7725ab2a0845f |
|
MD5 | 59745c8d2852446a2cfaf5357bd8ec17 |
|
BLAKE2b-256 | eab3a353f91da7635461e10b3021eb35a230be847dcdbd6526958ec0d6be9b87 |