Skip to content

Commit

Permalink
Merge pull request #35 from grofit/chore/update-readme-for-subscripti…
Browse files Browse the repository at this point in the history
…on-use-cases

Update README.md
  • Loading branch information
Mahsaap authored May 30, 2024
2 parents d8d96b5 + 3a3042d commit bd20f9d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,19 @@ namespace TwitchLib.EventSub.Websockets.Test

if (!e.IsRequestedReconnect)
{
// subscribe to topics
/*
Subscribe to topics via the TwitchApi.Helix.EventSub object, this example shows how to subscribe to the channel follow event used in the example above.
var conditions = new Dictionary<string, string>()
{
{ "broadcaster_user_id", someUserId }
};
var subscriptionResponse = await TwitchApi.Helix.EventSub.CreateEventSubSubscriptionAsync("channel.follow", "2", conditions,
EventSubTransportMethod.Websocket, _eventSubWebsocketClient.SessionId);
You can find more examples on the subscription types and their requirements here https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types/
Prerequisite: Twitchlib.Api nuget package installed (included in the Twitchlib package automatically)
*/
}
}

Expand Down

0 comments on commit bd20f9d

Please sign in to comment.