Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TwitchMessenger

Hierarchy

  • TwitchMessenger

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

channelID

channelID: string

debug

extensionID

extensionID: string

Methods

close

  • close(): void
  • Returns void

listen

  • listen is the low level listening interface.

    Parameters

    • id: any

      the extension id or app id of the app thats sending the message.

    • topic: string

      either broadcast or whisper-<opaque-user-id>.

    • callback: any

      a function(body)

    Returns CallbackHandle

    a handle that can be passed into unlisten to unbind the callback.

send

  • send(id: any, event: any, target: any, body: any): void
  • send will send a message to all clients.

    Parameters

    • id: any

      the extension id or app id of the app thats sending the message.

    • event: any

      an event name. Event names should be in the form [a-z0-9_]+

    • target: any
    • body: any

      a json object to send

    Returns void

unlisten

  • unlisten will unregister a listening callback.

    Parameters

    • id: any

      the extension id or app id of the app thats sending the message.

    • h: CallbackHandle

      the handle returned from listen

    Returns void

Generated using TypeDoc