Index
Type Aliases
Functions
- add
Widget Listener - create
Alert Widget - create
Image Poll Widget - create
Image Prediction Widget - create
Prediction Follow Up Widget - create
Text Poll Widget - create
Text Prediction Widget - delete
Widget - get
Paginated Unclaimed Rewards - get
Paginated Widgets - get
Posted Widgets - get
Widget - get
Widget Interactions - get
Widgets - publish
Widget - register
Widget Mode - remove
Widget Listener - update
Image Prediction Widget Option - update
Text Prediction Widget Option
Type Aliases
Pagination Iterator
Functions
add Widget Listener
Parameters
arg: { programId: string }
program
Id: string
callback: WidgetListenerCallback
Returns any
create Alert Widget
Parameters
args: ICreateAlertWidgetArg
Returns Promise<IAlertWidget>
create Image Poll Widget
Parameters
Returns Promise<IImagePollWidget>
create Image Prediction Widget
Parameters
Returns Promise<IImagePredictionWidget>
create Prediction Follow Up Widget
Parameters
Returns Promise<IPredictionFollowUpWidget>
create Text Poll Widget
Parameters
args: ICreateTextPollWidgetArg
Returns Promise<ITextPollWidget>
create Text Prediction Widget
Parameters
Returns Promise<ITextPredictionWidget>
delete Widget
Parameters
args: IDeleteWidgetArg
Returns Promise<void>
get Paginated Unclaimed Rewards
Parameters
args: { programId: string }
program
Id: string
Returns Promise<AsyncIterator<Object, Function, Function>>
get Paginated Widgets
Parameters
args: IGetPostedWidgetsArgs
Returns Promise<PaginationIterator>
get Posted Widgets
Get list of widgets that have already been posted.
Parameters
args: IGetPostedWidgetsArgs
Returns Promise<IPostedWidgetsPayload>
get Widget
Gets widget object from passed kind and id
Parameters
args: IWidgetCreationArgs
Returns Promise<IWidgetPayload>
get Widget Interactions
Get list of widget interactions based on interaction url or an array of widget id or an array of widget kinds
Parameters
args: IWidgetInteractionArgs
Returns Promise<IWidgetKindInteractionsMap>
get Widgets
Parameters
args: IWidgetArgs
Returns Promise<IPaginatedResponse<IWidgetPayload>>
publish Widget
Parameters
args: IPublishWidgetArg
Returns Promise<IPublishWidgetRes>
register Widget Mode
Registers a custom widget state transition mode. The name argument is used to pass to one of the widget instantiation methods to choose
Parameters
name: string
mode: WidgetMode
Returns any
remove Widget Listener
Remove widget listener
Parameters
arg: { programId: string }
program
Id: string
callback: WidgetListenerCallback
Returns void
update Image Prediction Widget Option
Parameters
Returns Promise<IImagePredictionWidgetOption>
update Text Prediction Widget Option
Parameters
Returns Promise<ITextPredictionWidgetOption>
Generated using TypeDoc
Add a widget listener
2.4.0