C# Class TwitchLib.TwitchPubSub

Afficher le fichier Open project: swiftyspiffy/TwitchLib Class Usage Examples

Méthodes publiques

Свойство Type Description
OnBan EventHandler
OnBitsReceived EventHandler
OnClear EventHandler
OnEmoteOnly EventHandler
OnEmoteOnlyOff EventHandler
OnHost EventHandler
OnListenResponse EventHandler
OnPubSubServiceClosed EventHandler
OnPubSubServiceConnected EventHandler
OnPubSubServiceError EventHandler
OnR9kBeta EventHandler
OnR9kBetaOff EventHandler
OnStreamDown EventHandler
OnStreamUp EventHandler
OnSubscribersOnly EventHandler
OnSubscribersOnlyOff EventHandler
OnTimeout EventHandler
OnUnban EventHandler
OnUntimeout EventHandler
OnViewCount EventHandler
OnWhisper EventHandler

Méthodes publiques

Méthode Description
Connect ( ) : void

Method to connect to Twitch's PubSub service. You MUST listen toOnConnected event and listen to a Topic within 15 seconds of connecting (or be disconnected)

Disconnect ( ) : void

What do you think it does? :)

ListenToBitsEvents ( int channelTwitchId, string channelOAuth ) : void

[TESTED & WORKING] Sends request to listenOn bits events in specific channel

ListenToChatModeratorActions ( int myTwitchId, int channelTwitchId, string moderatorOAuth ) : void

[TESTED & WORKING] Sends a request to listenOn timeouts and bans in a specific channel

ListenToVideoPlayback ( int channelTwitchId ) : void

[UNTESTED] Sends request to listenOn video playback events in specific channel

ListenToWhispers ( int channelTwitchId, string channelOAuth ) : void

Sends request to listen to whispers from specific channel.

TestMessageParser ( string testJsonString ) : void

This method will send passed json text to the message parser in order to allow forOn-demand parser testing.

TwitchPubSub ( bool _logging = false ) : System

Constructor for a client that interface's with Twitch's new PubSub system.

Private Methods

Méthode Description
OnClose ( object sender, object e ) : void
OnError ( object sender, SuperSocket.ClientEngine.ErrorEventArgs e ) : void
OnMessage ( object sender, WebSocket4Net.MessageReceivedEventArgs e ) : void
OnOpen ( object sender, object e ) : void
generateNonce ( ) : string
listenToTopic ( string topic, string oauth = null, bool unlisten = false ) : void
parseMessage ( string message ) : void
pingTimerTick ( object sender, System e ) : void
unaccountedFor ( string message ) : void

Method Details

Connect() public méthode

Method to connect to Twitch's PubSub service. You MUST listen toOnConnected event and listen to a Topic within 15 seconds of connecting (or be disconnected)
public Connect ( ) : void
Résultat void

Disconnect() public méthode

What do you think it does? :)
public Disconnect ( ) : void
Résultat void

ListenToBitsEvents() public méthode

[TESTED & WORKING] Sends request to listenOn bits events in specific channel
public ListenToBitsEvents ( int channelTwitchId, string channelOAuth ) : void
channelTwitchId int Channel Id of channel to listen to bitsOn (can be fetched from TwitchApi)
channelOAuth string OAuth token linked to the channel.
Résultat void

ListenToChatModeratorActions() public méthode

[TESTED & WORKING] Sends a request to listenOn timeouts and bans in a specific channel
public ListenToChatModeratorActions ( int myTwitchId, int channelTwitchId, string moderatorOAuth ) : void
myTwitchId int A moderator's twitch acount's ID (can be fetched from TwitchApi)
channelTwitchId int Channel ID who has previous parameter's moderator (can be fetched from TwitchApi)
moderatorOAuth string Moderator OAuth key (can be OAuth key with any scope)
Résultat void

ListenToVideoPlayback() public méthode

[UNTESTED] Sends request to listenOn video playback events in specific channel
public ListenToVideoPlayback ( int channelTwitchId ) : void
channelTwitchId int Channel Id of channel to listen to playback events in.
Résultat void

ListenToWhispers() public méthode

Sends request to listen to whispers from specific channel.
public ListenToWhispers ( int channelTwitchId, string channelOAuth ) : void
channelTwitchId int Channel to listen to whispers on.
channelOAuth string OAuth token to verify identity.
Résultat void

TestMessageParser() public méthode

This method will send passed json text to the message parser in order to allow forOn-demand parser testing.
public TestMessageParser ( string testJsonString ) : void
testJsonString string
Résultat void

TwitchPubSub() public méthode

Constructor for a client that interface's with Twitch's new PubSub system.
public TwitchPubSub ( bool _logging = false ) : System
_logging bool Set this true to have raw messages from PubSub system printed to console.
Résultat System

Property Details

OnBan public_oe property

public EventHandler OnBan
Résultat EventHandler

OnBitsReceived public_oe property

public EventHandler OnBitsReceived
Résultat EventHandler

OnClear public_oe property

public EventHandler OnClear
Résultat EventHandler

OnEmoteOnly public_oe property

public EventHandler OnEmoteOnly
Résultat EventHandler

OnEmoteOnlyOff public_oe property

public EventHandler OnEmoteOnlyOff
Résultat EventHandler

OnHost public_oe property

public EventHandler OnHost
Résultat EventHandler

OnListenResponse public_oe property

public EventHandler OnListenResponse
Résultat EventHandler

OnPubSubServiceClosed public_oe property

public EventHandler OnPubSubServiceClosed
Résultat EventHandler

OnPubSubServiceConnected public_oe property

public EventHandler OnPubSubServiceConnected
Résultat EventHandler

OnPubSubServiceError public_oe property

public EventHandler OnPubSubServiceError
Résultat EventHandler

OnR9kBeta public_oe property

public EventHandler OnR9kBeta
Résultat EventHandler

OnR9kBetaOff public_oe property

public EventHandler OnR9kBetaOff
Résultat EventHandler

OnStreamDown public_oe property

public EventHandler OnStreamDown
Résultat EventHandler

OnStreamUp public_oe property

public EventHandler OnStreamUp
Résultat EventHandler

OnSubscribersOnly public_oe property

public EventHandler OnSubscribersOnly
Résultat EventHandler

OnSubscribersOnlyOff public_oe property

public EventHandler OnSubscribersOnlyOff
Résultat EventHandler

OnTimeout public_oe property

public EventHandler OnTimeout
Résultat EventHandler

OnUnban public_oe property

public EventHandler OnUnban
Résultat EventHandler

OnUntimeout public_oe property

public EventHandler OnUntimeout
Résultat EventHandler

OnViewCount public_oe property

public EventHandler OnViewCount
Résultat EventHandler

OnWhisper public_oe property

public EventHandler OnWhisper
Résultat EventHandler