GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - meenzen/Streamlabs.SocketClient: Unofficial C# client library for the Streamlabs socket API. Allows you to receive events from Streamlabs in real-time.

BranchesTags
Open more actions menu

Latest commit

 

History

832 Commits
832 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.husky
.husky
 
 
src
src
 
 
test/Streamlabs.SocketClient.Tests
test/Streamlabs.SocketClient.Tests
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
Directory.Build.props
Directory.Build.props
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
Streamlabs.slnx
Streamlabs.slnx
 
 
codecov.yml
codecov.yml
 
 
dotnet-tools.json
dotnet-tools.json
 
 
global.json
global.json
 
 
renovate.json
renovate.json
 
 
version.json
version.json
 
 

Repository files navigation

GitHub codecov NuGet NuGet FOSSA Status

Streamlabs.SocketClient

Unofficial C# client library for the Streamlabs socket API. Allows you to receive events from Streamlabs in real-time.

Installation

dotnet add package Streamlabs.SocketClient

If you use Dependency Injection, you can use the Streamlabs.SocketClient.Extensions package for easier setup.

dotnet add package Streamlabs.SocketClient.Extensions
// provide the token directly
builder.Services.AddStreamlabsClient(options => options.Token = "store your token somewhere safe");

// or use a configuration section
builder.Services.AddStreamlabsClient(configuration.GetSection("Streamlabs"));

// automatically connect and disconnect the client
builder.Services.AddHostedService<StreamlabsStartStopWorker>();

// get the client via DI and use it
var client = serviceProvider.GetRequiredService<IStreamlabsClient>();
client.OnDonation += (sender, message) => Console.WriteLine($"Donation Received: {message.FormattedAmount}");

Usage

First, you'll need to grab your Socket API Token from the Streamlabs Dashboard.

Open the Dashboard, then navigate to Avatar Menu → Account Settings → API Settings → API Tokens. You will find the token in the field Your Socket API Token.

Now you're ready to set up the client. These examples show how to set up the client and listen for events:

  • Basic Example
  • Advanced Example (Worker Service with DI)

Contributing

Pull requests are welcome. Please use Conventional Commits to keep commit messages consistent.

When reporting bugs, please include the raw JSON payload of the event that caused the issue. You can find it attached to the error message or by enabling debug logging and looking for Streamlabs: Event received - [json]. Alternatively, you can use the Event Capture tool to capture events and save them to a file.

Acknowledgements

  • Streamlabs API Documentation
  • SocketIOClient by @doghappy is a great library for working with SocketIO servers in C#.
  • Streamlabs-Events-Receiver by @ocgineer is a similar project that served as inspiration for this one.

License

Distributed under the MIT License. See LICENSE for more information.

FOSSA Status

About

Unofficial C# client library for the Streamlabs socket API. Allows you to receive events from Streamlabs in real-time.

www.nuget.org/packages/Streamlabs.SocketClient

Topics

csharp-librarystreamlabsstreamlabs-apistreamlabs-sockettwitch

Resources

Readme
MIT license

Security policy

Security policy
Activity

Stars

9 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.