用于emote收集器api的异步客户端库
aioec的Python项目详细描述
基于aiohttp的Emote Collector API客户端。
用法
importaioecclient=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 correctmy_user_id=awaitclient.login()# it returns the user ID associated with your token# in a coroutine...emote=awaitclient.emote('Think')emote.name# Thinkawaitemote.edit(name='Think_',description='a real happy thinker')# remove the description:awaitemote.edit(description=None)forgamewisp_emoteinawaitclient.search('GW'):awaitgamewisp_emote.delete()all_emotes=[emoteasyncforemoteinclient.emotes()]popular_emotes=awaitclient.popular()awaitclient.close()# it's also a context manager:asyncwithaioec.Client(token=my_token)asclient:awaitclient.delete('Think_')# this will automatically close the client