async client library for the Emote Collector API
Project description
An aiohttp-based client for the Emote Collector API.
Usage
import aioec
anonymous_client = aioec.Client()
authenticated_client = aioec.Client(token='your token here')
local_client = aioec.Client(base_url='http://ec.localhost:2018/api/v0') # no trailing slash!
# 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
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.5.0.tar.gz
(6.2 kB
view details)
Built Distribution
aioec-0.5.0-py3-none-any.whl
(8.5 kB
view details)
File details
Details for the file aioec-0.5.0.tar.gz
.
File metadata
- Download URL: aioec-0.5.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4147e74441b42af0d55342da378d73bccfb9444a974c729238daa3f1e963054c |
|
MD5 | 0a06a6193e64df341681e9ba03a6c7b7 |
|
BLAKE2b-256 | acd8db2ce0f1b80ada5ddfea7bd6ef70286b27e99fef99a8c35a2d5a0c1d6a7e |
File details
Details for the file aioec-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: aioec-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2269baf34023976517a000f9813f81dc0fa224c1a247fb717f43550e2605648 |
|
MD5 | 75dd4948f0e366351b0eb717a2f94151 |
|
BLAKE2b-256 | 3578e21672826dff9084d108b3bffc63fcf0975e4f9290b07e1da4056e9b5f27 |