TwitchSharp.Hosting
0.1.3
Prefix Reserved
See the version list below for details.
dotnet add package TwitchSharp.Hosting --version 0.1.3
NuGet\Install-Package TwitchSharp.Hosting -Version 0.1.3
<PackageReference Include="TwitchSharp.Hosting" Version="0.1.3" />
<PackageVersion Include="TwitchSharp.Hosting" Version="0.1.3" />
<PackageReference Include="TwitchSharp.Hosting" />
paket add TwitchSharp.Hosting --version 0.1.3
#r "nuget: TwitchSharp.Hosting, 0.1.3"
#:package TwitchSharp.Hosting@0.1.3
#addin nuget:?package=TwitchSharp.Hosting&version=0.1.3
#tool nuget:?package=TwitchSharp.Hosting&version=0.1.3
TwitchSharp
A .NET 10 library for the Twitch Helix API and EventSub WebSocket, designed for Native AOT from the ground up.
WARNING: I am currently handling getting the root namespace released back into the pool, so currently all package except the root namespace is on Nuget. Also, pleae be advised that this is an alpha release. Release 0.2.0 will have the full documentation once I get Nuget resolved.
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.Configuration.Abstractions (>= 10.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.2)
- Microsoft.Extensions.Http (>= 10.0.2)
- Microsoft.Extensions.Options (>= 10.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.2)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.2)
- TwitchSharp.Api (>= 0.1.3)
- TwitchSharp.EventSub (>= 0.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.