From a8c21af06e94b3e9aee75fddecd3b825ed3c8533 Mon Sep 17 00:00:00 2001 From: Miwory Date: Wed, 17 Dec 2025 20:59:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=8D=D0=BD=D0=B4=D0=BF=D0=BE=D0=B8=D0=BD=D1=82?= =?UTF-8?q?=20get=5Fchatters=20=D0=B8=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA?= =?UTF-8?q?=D1=83=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20int=20=D0=B2=20headers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/twitchclient/api.py | 110 ++++++++++++++++++++-------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9d52ac2..ecc0540 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "twitchclient" -version = "1.0.2" +version = "1.0.3" description = "Client for Twitch API" readme = "README.md" authors = [ diff --git a/src/twitchclient/api.py b/src/twitchclient/api.py index e63ad43..a494a53 100644 --- a/src/twitchclient/api.py +++ b/src/twitchclient/api.py @@ -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(