Исправлен эндпоинт get_chatters и ошибку использования int в headers
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "twitchclient"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
description = "Client for Twitch API"
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
|
||||
@ -702,7 +702,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
)
|
||||
@ -728,7 +728,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
cache_time: int | None = None,
|
||||
):
|
||||
req = await self.get(
|
||||
'/chatters',
|
||||
'/chat/chatters',
|
||||
params=self.clean_dict(
|
||||
{
|
||||
'broadcaster_id': broadcaster_id,
|
||||
@ -740,7 +740,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
)
|
||||
@ -767,7 +767,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -791,7 +791,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
)
|
||||
@ -818,7 +818,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'emote_set_id': emote_set_id},
|
||||
@ -846,7 +846,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -870,7 +870,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
)
|
||||
@ -898,7 +898,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -931,7 +931,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -961,7 +961,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1146,7 +1146,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'user_id': user_id},
|
||||
@ -1231,7 +1231,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1273,7 +1273,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1308,7 +1308,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
)
|
||||
@ -1390,7 +1390,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1498,7 +1498,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1570,7 +1570,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {jwt_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1703,7 +1703,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1737,7 +1737,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {jwt_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'extension_id': extension_id},
|
||||
@ -1814,7 +1814,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {jwt_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1848,7 +1848,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -1881,7 +1881,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2023,7 +2023,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2061,7 +2061,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2097,7 +2097,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2131,7 +2131,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -2161,7 +2161,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -2189,7 +2189,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -2248,7 +2248,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={
|
||||
@ -2509,7 +2509,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2632,7 +2632,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2669,7 +2669,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2750,7 +2750,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -2867,7 +2867,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={
|
||||
@ -2941,7 +2941,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3045,7 +3045,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3201,7 +3201,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3239,7 +3239,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -3409,7 +3409,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3442,7 +3442,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3477,7 +3477,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -3512,7 +3512,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3553,7 +3553,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3623,7 +3623,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3664,7 +3664,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3700,7 +3700,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3733,7 +3733,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'broadcaster_id': broadcaster_id},
|
||||
@ -3762,7 +3762,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict({'name': name, 'id': team_id}),
|
||||
@ -3791,7 +3791,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict({'id': user_id, 'login': login}),
|
||||
@ -3840,7 +3840,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'user_id': user_id},
|
||||
@ -3875,7 +3875,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
@ -3960,7 +3960,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
)
|
||||
@ -3987,7 +3987,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params={'user_id': user_id},
|
||||
@ -4044,7 +4044,7 @@ class TwitchAPIClient(AioHTTPXClient):
|
||||
headers=self.clean_dict(
|
||||
{
|
||||
'Authorization': f'Bearer {access_token}',
|
||||
'X-Cache-TTL': cache_time,
|
||||
'X-Cache-TTL': str(cache_time),
|
||||
}
|
||||
),
|
||||
params=self.clean_dict(
|
||||
|
||||
Reference in New Issue
Block a user