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–2019 Io Mintz <io@mintz.cc>
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.6.1.tar.gz
(7.3 kB
view details)
Built Distribution
aioec-0.6.1-py3-none-any.whl
(8.8 kB
view details)
File details
Details for the file aioec-0.6.1.tar.gz
.
File metadata
- Download URL: aioec-0.6.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 474d5359f80dc4bc1f6ec2476205c137f98ef587698a0bff3b082e74d376ec3d |
|
MD5 | 5dead98df57190d657841d15fb89ff33 |
|
BLAKE2b-256 | c5349accccd14af3d1393ed5b08dcaef46aa5d47f8b5c4ec344cf558c3fdb623 |
File details
Details for the file aioec-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: aioec-0.6.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c550e2eaa6466a24f50101e0e7cdd4b3298ae7810a6a1850ebe9f39e4210a95 |
|
MD5 | a10ed9f8cd34ce7789c5359f1bc2a365 |
|
BLAKE2b-256 | d6a32d129848fc28952c6413496c14ab081fc29c25e14eefae61b1032e7d5b51 |