Добавлен cache_time для get_channel_emotes

This commit is contained in:
2025-12-11 16:14:43 +03:00
parent 947f19afbc
commit 2c5c650ae7

View File

@ -746,10 +746,20 @@ class TwitchAPIClient(AioHTTPXClient):
case _: case _:
raise s.Error(req.status_code, 'Internal Server Error') raise s.Error(req.status_code, 'Internal Server Error')
async def get_channel_emotes(self, access_token: str, broadcaster_id: int): async def get_channel_emotes(
self,
access_token: str,
broadcaster_id: int,
cache_time: int | None = None,
):
req = await self.get( req = await self.get(
'/emotes', '/emotes',
headers={'Authorization': f'Bearer {access_token}'}, headers=self.clean_dict(
{
'Authorization': f'Bearer {access_token}',
'X-Cache-TTL': cache_time,
}
),
params={'broadcaster_id': broadcaster_id}, params={'broadcaster_id': broadcaster_id},
) )