TwitcheryNet 0.0.1-prerelease

This is a prerelease version of TwitcheryNet.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package TwitcheryNet --version 0.0.1-prerelease
                    
NuGet\Install-Package TwitcheryNet -Version 0.0.1-prerelease
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TwitcheryNet" Version="0.0.1-prerelease" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TwitcheryNet" Version="0.0.1-prerelease" />
                    
Directory.Packages.props
<PackageReference Include="TwitcheryNet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TwitcheryNet --version 0.0.1-prerelease
                    
#r "nuget: TwitcheryNet, 0.0.1-prerelease"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TwitcheryNet@0.0.1-prerelease
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TwitcheryNet&version=0.0.1-prerelease&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TwitcheryNet&version=0.0.1-prerelease&prerelease
                    
Install as a Cake Tool

Twitchery.Net - A .NET library for Twitch

Freshly born library to access Twitch stuff, designed to be simple, efficient and easy to use. We want you to be able to create your own Twitch bots, chat clients, stream viewers, and more with ease.

This library is still under heavy development and not ready for production use.

You can check the current implementation status here: Implementation Status

Using Twitchery.Net: For Developers, Contributors and Testers

Getting Started

  1. Create a new Twitch application at Twitch Developer Console
  2. Create a new .NET8+ project or open an existing one
  3. Install the library from NuGet: dotnet add package TwitcheryNet --prerelease
  4. Start coding!

Example Usage

using TwitcheryNet.Services.Implementations;

var myClientId = "your-client-id";
var myRedirectUri = "http://localhost:8080";
var myScopes = new string[] { "chat:read", "chat:edit", "channel:moderate" };

var twitchery = new Twitchery { ClientId = myClientId };

// Authenticate with the user's default browser (Windows, Linux and OSX supported)
await twitchery.UserBrowserAuthAsync(redirectUri, scopes);

// Print the user's display name
Console.WriteLine("Logged in as: " + twitchery.Me!.DisplayName);

// How many followers do I have?
Console.WriteLine("I have {0} followers", twitchery.ChannelFollowers[twitchery.Me!.Id].Count);

// Am I streaming right now?
var myStream = twitchery.Streams[twitchery.Me!.Login];
if (myStream is null)
{
    Console.WriteLine("I'm not streaming right now");
}
else
{
    Console.WriteLine("I'm streaming {0} for {1} viewers!", myStream.GameName, myStream.ViewerCount);
}

// Who was the last person to follow me?
var lastFollower = twitchery.ChannelFollowers[twitchery.Me!.Id].First(); // First, because the list is sorted by follow date
Console.WriteLine("My last follower was {0}, who followed on {1}!", lastFollower.UserName, lastFollower.FollowedAt);

// Yes, it's that simple!
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.3.1-prerelease 80 9/29/2024
0.0.3-prerelease 66 9/29/2024
0.0.2.4-prerelease 79 9/27/2024
0.0.2.2-prerelease 64 9/27/2024
0.0.2.1-prerelease 72 9/27/2024
0.0.2-prerelease 71 9/27/2024
0.0.1-prerelease 74 9/20/2024