From 63a874b94c8a1cd391c78d0798382aec26f8e072 Mon Sep 17 00:00:00 2001 From: Miwory Date: Thu, 26 Feb 2026 17:57:07 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20READ?= =?UTF-8?q?ME?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 64c8e18..ef06fcd 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,10 @@ import asyncio from oxidetwitch.api import TwitchAPIClient async def main(): - async with TwitchClient( + async with TwitchAPIClient( client_id="your_id", client_secret="your_client_secret", + redirect_uri="https://example.com", redis_url="redis://localhost:6379", ) as twitch: # Get user data (automatically cached if configured) @@ -57,11 +58,10 @@ If you are polling 100+ streams, OxideTwitch spaces out the requests using the * ```python async def poll_streams(channels): - async with TwitchClient(...) as twitch: + async with TwitchAPIClient(...) as twitch: # These will be executed as fast as the rate limiter allows - tasks = [twitch.get_stream(user_login=name) for name in channels] + tasks = [twitch.get_streams(..., user_login=name) for name in channels] streams = await asyncio.gather(*tasks) - return [s for s in streams if s.is_live] ``` From 645f7029ad1ba7edc3376c1a27fcc1a84beb4eed Mon Sep 17 00:00:00 2001 From: Miwory Date: Sun, 8 Mar 2026 00:25:32 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20base=5Furl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/oxidetwitch/api.py | 2 +- src/oxidetwitch/auth.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3726fb0..18fb659 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "oxidetwitch" -version = "1.2.0" +version = "1.2.1" description = "Client for Twitch API" readme = "README.md" authors = [{ name = "Miwory", email = "miwory.uwu@gmail.com" }] diff --git a/src/oxidetwitch/api.py b/src/oxidetwitch/api.py index 860ba19..ab082ad 100644 --- a/src/oxidetwitch/api.py +++ b/src/oxidetwitch/api.py @@ -23,7 +23,7 @@ class TwitchAPIClient(OxideHTTP): redis_url: str | None = None, proxy_url: str | None = None, ) -> None: - self.base_uri = 'https://api.twitch.tv/helix' + self.base_uri = 'https://api.twitch.tv/helix/' self.client_id = client_id self.client_secret = client_secret self.redirect_uri = redirect_uri diff --git a/src/oxidetwitch/auth.py b/src/oxidetwitch/auth.py index 2c99fd2..92ef635 100644 --- a/src/oxidetwitch/auth.py +++ b/src/oxidetwitch/auth.py @@ -16,7 +16,7 @@ class TwitchAuthClient(OxideHTTP): redis_url: str | None = None, proxy_url: str | None = None, ) -> None: - self.base_uri = 'https://id.twitch.tv/oauth2' + self.base_uri = 'https://id.twitch.tv/oauth2/' self.client_id = client_id self.client_secret = client_secret self.redirect_uri = redirect_uri