Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

PaginationIterator

PaginationIterator: AsyncIterator<Object, Function, Function>

Functions

Const addWidgetListener

  • Add a widget listener

    since

    2.4.0

    Parameters

    Returns any

Const getPaginatedUnclaimedRewards

  • getPaginatedUnclaimedRewards(args: { programId: string }): Promise<AsyncIterator<Object, Function, Function>>
  • Parameters

    • args: { programId: string }
      • programId: string

    Returns Promise<AsyncIterator<Object, Function, Function>>

Const getPaginatedWidgets

Const getPostedWidgets

  • Get list of widgets that have already been posted.

    async
    since

    1.18.2

    Parameters

    • __namedParameters: Object

    Returns Promise<IPostedWidgetsPayload>

Const getWidget

Const getWidgetInteractions

  • Get list of widget interactions based on interaction url or an array of widget id or an array of widget kinds

    async
    example
    getWidgetInteractions({
    interactionUrl: "<url>"
    }).then(interactions => console.log(interactions))

    // OR
    getWidgetInteractions({
    programId: "<program-id>",
    widgets: [{
    kind: WidgetKind.TEXT_POLL,
    id: "<widget-id>"
    }]
    }).then(interactions => console.log(interactions))

    // OR
    getWidgetInteractions({
    programId: "<program-id>",
    widgetKinds: [ WidgetKind.TEXT_POLL, WidgetKind.TEXT_PREDICTION ]
    }).then(interactions => console.log(interactions))

    Parameters

    Returns Promise<IWidgetKindInteractionsMap>

Const getWidgets

  • description

    Fetch paginated List of Widgets filtered by widget status and kind

    since

    2.13.0

    example
    getWidgets({
    programId: "xxxx",
    status: "pending",
    widgetKinds: ["text-poll"],
    ordering: "recent",
    interactive: true,
    since: "2022-05-26T12:41:27.463Z"
    }).then(res => console.log(res));

    Parameters

    Returns Promise<IPaginatedResponse<IWidgetPayload>>

Const registerWidgetMode

  • registerWidgetMode(name: string, mode: WidgetMode): any
  • Registers a custom widget state transition mode. The name argument is used to pass to one of the widget instantiation methods to choose

    since

    1.18.0

    Parameters

    Returns any

Const removeWidgetListener

  • Remove widget listener

    since

    2.4.0

    Parameters

    Returns void

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Interface
  • Interface with type parameter
  • Enumeration

Generated using TypeDoc