livelike logo
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

addRewardEventListener

  • description

    Add listener for the RewardEvent

    since

    2.12.0

    example

    addRewardEventListener(RewardEvent.REWARD_ITEM_TRANSFER_RECEIVED, function onReceiveNewRewardItemTransfer(rewardItemTransfer){ console.log(rewardItemTransfer); })

    Parameters

    Returns void

Const getApplicationRewardItems

  • Gets Application Reward Items.

    async
    since

    2.9.0

    example
    getApplicationRewardItems().then(padinatedResponse => console.log(padinatedResponse))
    

    Parameters

    Returns Promise<IPaginatedResponse<IRewardItem>>

Const getRewardItemBalances

  • Gets userProfile Reward Item Balance.

    async
    since

    2.9.0

    example
    getRewardItemBalances({ rewardItemIds: ["xxx", "xxx"] }).then(res => console.log(res))
    

    Parameters

    • args: { rewardItemIds: string[] }
      • rewardItemIds: string[]

    Returns Promise<IPaginatedResponse<IRewardItemBalancePayload>>

Const getRewardItemTransfers

Const getRewardTransactions

  • description

    Fetch paginated List of Reward Transactions filtered by widget_id and kind

    since

    2.13.0

    example

    getRewardTransactions({ widgetIds: ["xx", "yy"], widgetKinds: ["text-poll", "text-prediction"] }).then(res => console.log(res));

    Parameters

    Returns Promise<IPaginatedResponse<IRewardTransaction>>

removeRewardEventListener

  • description

    Remove registered listenerFn for the RewardEvent. If no listenerFn is passed, it removes all the listeners attached to that event

    since

    2.12.0

    example

    removeRewardEventListener(RewardEvent.REWARD_ITEM_TRANSFER_RECEIVED);

    Parameters

    Returns void

Const transferRewardItemAmount

  • transferRewardItemAmount(args: { amount: number; recipientProfileId: string; rewardItemId: string }): Promise<IRewardItemTransferPayload>
  • Transfer Reward Item Balance to another profile.

    async
    since

    2.9.0

    example
    transferRewardItemAmount({ rewardItemId: "xxxx", amount: 10, recipientProfileId: "xxxx" }).then(res => console.log(res))
    

    Parameters

    • args: { amount: number; recipientProfileId: string; rewardItemId: string }
      • amount: number
      • recipientProfileId: string
      • rewardItemId: string

    Returns Promise<IRewardItemTransferPayload>

Legend

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

Generated using TypeDoc