TwitchSharp.Api
0.1.5
Prefix Reserved
dotnet add package TwitchSharp.Api --version 0.1.5
NuGet\Install-Package TwitchSharp.Api -Version 0.1.5
<PackageReference Include="TwitchSharp.Api" Version="0.1.5" />
<PackageVersion Include="TwitchSharp.Api" Version="0.1.5" />
<PackageReference Include="TwitchSharp.Api" />
paket add TwitchSharp.Api --version 0.1.5
#r "nuget: TwitchSharp.Api, 0.1.5"
#:package TwitchSharp.Api@0.1.5
#addin nuget:?package=TwitchSharp.Api&version=0.1.5
#tool nuget:?package=TwitchSharp.Api&version=0.1.5
TwitchSharp
A .NET 10 library for the Twitch Helix API and EventSub WebSocket, designed for Native AOT from the ground up.
NOTE: Pleae be advised that this is an alpha release. Release 0.2.0 will have the full documentation.
Features
- Full Helix API coverage -- 30 endpoint categories with typed request/response models
- EventSub WebSocket client -- real-time events with automatic reconnection and keepalive monitoring
- Native AOT compatible -- trimming-safe with source-generated JSON serialization (zero reflection)
- Built-in resilience -- automatic retries with exponential backoff, rate limiting, and token management
- Dependency injection ready -- first-class integration with
Microsoft.Extensions.Hosting - Modern C# 14 -- sealed records, file-scoped namespaces, collection expressions, and
fieldkeyword
Packages
| Package | Description |
|---|---|
TwitchSharp |
Core primitives, exceptions, and pagination helpers |
TwitchSharp.Api |
Helix API client with authentication and rate limiting |
TwitchSharp.EventSub |
EventSub WebSocket client for real-time events |
TwitchSharp.Hosting |
Dependency injection and hosted service integration |
TwitchSharp.Extensions.Authentication |
Interactive OAuth PKCE flow for desktop/CLI apps |
Quick Start
Standalone usage
await using var client = TwitchApiClient.Create(new TwitchApiClientOptions
{
ClientId = "your_client_id",
ClientSecret = "your_client_secret"
});
var users = await client.Users.GetUsersAsync(logins: ["twitchdev"]);
With dependency injection
var builder = Host.CreateApplicationBuilder(args);
builder.AddTwitchApi();
builder.AddTwitchEventSub();
var app = builder.Build();
app.Run();
Configure via appsettings.json:
{
"Twitch": {
"ClientId": "your_client_id",
"ClientSecret": "your_client_secret"
}
}
Contributing
See CONTRIBUTING.md for development setup and coding guidelines.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.2)
- System.Threading.RateLimiting (>= 10.0.2)
- TwitchSharp (>= 0.1.5)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on TwitchSharp.Api:
| Package | Downloads |
|---|---|
|
TwitchSharp.EventSub
EventSub WebSocket real-time client for TwitchSharp. |
|
|
TwitchSharp.Extensions.Authentication
Optional authentication convenience utilities for TwitchSharp. Provides interactive browser auth flows, local OAuth callback listener, file-based token persistence, and flow orchestration. |
|
|
TwitchSharp.Hosting
Dependency injection and hosting integration for TwitchSharp. |
GitHub repositories
This package is not used by any popular GitHub repositories.