A comprehensive Twitch API toolkit for Go.
- Complete OAuth Support: All four Twitch OAuth flows (Implicit, Authorization Code, Client Credentials, Device Code)
- Token Management: Automatic token refresh, validation, and revocation
- Comprehensive API Coverage: 147+ Helix API endpoints supported
- IRC/TMI Chat: Full IRC chat client for building chat bots with message parsing, subs, raids, and moderation events
- EventSub Webhooks: Built-in webhook handler with signature verification and event parsing
- EventSub WebSocket: Real-time event streaming with automatic keepalive and reconnection
- PubSub Compatibility: Migration layer providing familiar PubSub-style API backed by EventSub
- Extension JWT: Full support for Twitch Extension authentication
- Caching Layer: Built-in response caching with TTL support
- Middleware System: Chainable request/response middleware
- Batch Operations: Concurrent batch request processing
- Rate Limiting: Automatic rate limit tracking with retry support
- Type-Safe: Fully typed request/response structures with Go generics
View Full Documentation and a complete cookbook of examples
go get github.com/Its-donkey/kappopherpackage main
import (
"context"
"fmt"
"github.com/Its-donkey/kappopher/helix"
)
func main() {
// Create auth client
authClient := helix.NewAuthClient(helix.AuthConfig{
ClientID: "your-client-id",
ClientSecret: "your-client-secret",
})
// Get app access token
token, _ := authClient.GetAppAccessToken(context.Background())
authClient.SetToken(token)
// Create API client
client := helix.NewClient("your-client-id", authClient)
// Get user info
resp, _ := client.GetUsers(context.Background(), &helix.GetUsersParams{
Logins: []string{"shroud"},
})
fmt.Printf("User: %s (ID: %s)\n", resp.Data[0].DisplayName, resp.Data[0].ID)
}- Quick Start Guide - Installation, authentication, and basic usage
- API Reference - Full endpoint documentation
MIT License - see LICENSE for details.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
