Index

Functions

Functions

Const applyTheme

  • applyTheme(t: ITheme): Promise<void>
  • applyTheme Dynamically change the theme

    async
    since

    1.24.0

    Parameters

    Returns Promise<void>


Index

Functions

Functions

Const applyLocalization

  • applyLocalization(localizedStrings: any): Promise<boolean>
  • applyLocalization Dynamically add localization Languages

    async
    since

    2.1.2

    Parameters

    • localizedStrings: any

    Returns Promise<boolean>


Index

Functions

Functions

Const init

  • init(args: InitArgs): Promise<unknown>
  • Parameters

    Returns Promise<unknown>


Index

Functions

Const getApplicationBadges

  • Gets Application Badges.

    async
    since

    2.7.0

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

    Returns Promise<IApplicationBadges>

Const getBadgeProgress

  • getBadgeProgress(args: { badgeIds: string[]; profileId: string }): Promise<IBadgeProgress[]>
  • Gets Progress of Badges.

    async
    since

    2.7.0

    example
    getBadgeProgress().then(res => console.log(res))

    Parameters

    • args: { badgeIds: string[]; profileId: string }
      • badgeIds: string[]
      • profileId: string

    Returns Promise<IBadgeProgress[]>

Const getPaginatedProfileBadges

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

    • args: { profileId: string }
      • profileId: string

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

Const getProfileBadges

  • getProfileBadges(args: { profileId: string }): Promise<IProfileBadges>
  • Gets userProfile Badges.

    async
    since

    2.7.0

    example
    getProfileBadges({ profileId }).then(padinatedResponse => console.log(padinatedResponse))

    Parameters

    • args: { profileId: string }
      • profileId: string

        userProfile ID

    Returns Promise<IProfileBadges>


Index

Functions

addNewMemberToChatRoom

  • addNewMemberToChatRoom(__namedParameters: { profileId: string; roomId: string }): Promise<IChatRoomMembership>
  • description

    Add new member to the chat room (requires roomId and profileId)

    example
    addNewMemberToChatRoom({
     roomId: "9e6f1bc4-9f02-4c57-92b7-7521d0f5b027",
     profileId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7"
    }).then(membership => console.log(membership))

    Parameters

    • __namedParameters: { profileId: string; roomId: string }
      • profileId: string
      • roomId: string

    Returns Promise<IChatRoomMembership>

    Promise

Const createChatRoom

Const getChatRoom

Const getChatRoomMemberships

Const getChatUserMutedStatus

  • Gets the muted status of the current user for a given chat room

    async
    since

    2.2.0

    Parameters

    Returns Promise<IMutedResponse>

Const getProfileChatRoomMemberships

Const joinChatRoom

  • Join chat room by roomId, current user becomes 'member' and is available in chatroom membership list through LiveLike.getChatRoomMemberships().

    async
    since

    1.20

    Parameters

    Returns Promise<IChatRoomMembership>

Const leaveChatRoom

  • Leave chat room by roomId, current user 'member' status removed from chatroom membership list through LiveLike.getChatRoomMemberships().

    async
    since

    1.20

    Parameters

    Returns Promise<boolean>

Const updateChatRoom


Index

Functions

addChatRoomEventListener

  • addChatRoomEventListener<_Event, _EventListener>(chatRoomEvent: _Event, listenerFn?: _EventListener): void
  • description

    Add listener for the given ChatRoomEvent

    since

    2.12.0

    example

    addChatRoomEventListener(ChatRoomEvent.INVITE_NEW_MEMBER, function onReceieveChatRoomInvitationListener(invitation){ console.log(invitation); })

    Type parameters

    • _Event: ChatRoomEvent

    • _EventListener: IChatRoomEventListenerFnMap[_Event]

    Parameters

    • chatRoomEvent: _Event
    • Optional listenerFn: _EventListener

    Returns void

removeChatRoomEventListener

  • removeChatRoomEventListener<_Event, _EventListener>(chatRoomEvent: _Event, listenerFn?: _EventListener): void
  • description

    Remove registered listenerFn for the given ChatRoomEvent, when no listener passed, all registered event listener will be removed

    since

    2.12.0

    example

    removeChatRoomEventListener(ChatRoomEvent.INVITE_NEW_MEMBER, onReceieveChatRoomInvitationListener);

    Type parameters

    • _Event: ChatRoomEvent

    • _EventListener: IChatRoomEventListenerFnMap[_Event]

    Parameters

    • chatRoomEvent: _Event
    • Optional listenerFn: _EventListener

    Returns void


Index

Functions

getReceivedChatRoomInvitations

  • description

    Get list of chat room invitations received by the current user profile

    params

    args of type IGetInvitationsArgs

    async
    since

    2.12.0

    example
    getReceivedChatRoomInvitations({
     invitationStatus: ChatRoomInvitationStatus.PENDING
    }).then(paginatedInvitations => console.log(paginatedInvitations))

    Parameters

    Returns any

    Promise<IPaginatedResponse>

getSentChatRoomInvitations

  • description

    Get list of chat room invitations sent by the current user profile

    params

    args of type IGetInvitationsArgs

    async
    since

    2.12.0

    example
    getSentChatRoomInvitations({
     invitationStatus: ChatRoomInvitationStatus.PENDING
    }).then(paginatedInvitations => console.log(paginatedInvitations))

    Parameters

    Returns Promise<IPaginatedResponse<IChatRoomInvitation>>

    Promise<IPaginatedResponse>

sendChatRoomInviteToProfile

  • sendChatRoomInviteToProfile(__namedParameters: { profileId: string; roomId: string }): Promise<IChatRoomInvitation>
  • description

    Send chat room invite to profile (user)

    params

    args of type ISendChatRoomInviteArgs

    async
    since

    2.12.0

    example
    sendChatRoomInviteToProfile({
     roomId: "9e6f1bc4-9f02-4c57-92b7-7521d0f5b027",
     profileId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7"
    }).then(chatRoomInvitation => console.log(chatRoomInvitation))

    Parameters

    • __namedParameters: { profileId: string; roomId: string }
      • profileId: string
      • roomId: string

    Returns Promise<IChatRoomInvitation>

    Promise

updateChatRoomInviteStatus

  • description

    Updates chat room invitation status

    params

    args of type IUpdateChatRoomInvitationStatusArgs

    async
    since

    2.12.0

    example
    updateChatRoomInviteStatus({
     invitationId: "28cc0ceb-8934-48cd-abc5-4d3a3a681c1b",
     invitationStatus: ChatRoomInvitationStatus.ACCEPTED
    }).then(chatRoomInvitation => console.log(chatRoomInvitation))

    Parameters

    Returns Promise<IChatRoomInvitation>

    Promise


Index

Functions

Const getLeaderboard

  • Gets leaderboard detail from leaderboardId.

    async
    since

    1.26.0

    example
    LiveLike.getLeaderboard({leaderboardId: string}).then(leaderboard => console.log(leaderboard))

    Parameters

    Returns Promise<ILeaderboardPayload>

Const getLeaderboardEntries

Const getLeaderboardProfileRank

  • Gets leaderboard entry for a given profile in a given leaderboard.

    async
    since

    1.26.0

    example
    LiveLike.getLeaderboardProfileRank({leaderboardId: string, profileId: string}).then(leaderboardEntry => console.log(leaderboardEntry))

    Parameters

    Returns Promise<ILeaderboardRankPayload>

Const getLeaderboards

  • Gets leaderboard list for a given program.

    async
    since

    1.26.0

    example
    LiveLike.getLeaderboards({programId: string}).then(leaderboards => console.log(leaderboards))

    Parameters

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

    Returns Promise<ILeaderboardPayload[]>

Const getPaginatedLeaderboardEntries

  • getPaginatedLeaderboardEntries(args: ILeaderboardArgs): Promise<AsyncIterator<Object, Function, Function>>
  • Gets leaderboard entries list from leaderboardId.

    async
    since

    1.26.0

    example
    LiveLike.getLeaderboardEntries({programId: string}).then(response => console.log(response))

    Parameters

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

    Promise


Index

Functions

Const addMessageListener

  • addMessageListener(arg: { roomId: string }, callback: Function): Promise<void>
  • Adds a listener to a chatroom that calls passed callback function when event fires.

    since

    1.18.0

    example
    addMessageListener({roomId: string}, function(e){console.log(e)})

    Parameters

    • arg: { roomId: string }
      • roomId: string
    • callback: Function

    Returns Promise<void>

Const getMessageCount

  • getMessageCount(roomId: string, time?: { since: string | number | Date }): Promise<IMessageCount>
  • getMessageCount Returns number of messages in chat room

    async
    example
    messageCount('c1f6082c-f7b9-4d1e-b64e-9071a3860ffc', {since: "2020-04-16T16:29:39.158Z"}).then(r => console.log(r.count))

    Parameters

    • roomId: string
    • Optional time: { since: string | number | Date }
      • since: string | number | Date

        Time to get messages since

    Returns Promise<IMessageCount>

Const getMessageList

  • getMessageList Returns array of message objects

    async
    example
    messageList({roomId: string}).then(list => console.log(list))

    Parameters

    Returns Promise<IMessageListPayload>

Const prepareOutgoingChatMessage

Const removeMessageListener

  • Removes listener from chatroom

    since

    1.18.0

    example
    removeMessageListener({roomId: string}, function(e){console.log(e)})

    Parameters

    Returns void

Const sendCustomMessage

  • sendCustomMessage Send custom message to chat room.

    async
    example
    sendCustomMessage({custom_data: 'Test message', roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'})

    Parameters

    Returns Promise<any>

Const sendMessage

  • sendMessage Send user message to chat room.

    async
    example
    sendMessage({message: 'Test message', roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'})

    Parameters

    Returns Promise<any>


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))

    Returns Promise<IApplicationRewardItems>

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<IRewardItemBalances>

Const getRewardItemTransfers

  • Gets user's Reward Item Transfers.

    async
    since

    2.9.0

    example
    getRewardItemTransfers({transferType: "sent"}).then(res => console.log(res))

    Parameters

    Returns Promise<IRewardItemTransfers>

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>


Index

Functions

Functions

Const getSponsors

  • Gets sponsors list for a given program.

    async
    since

    2.5.1

    example
    LiveLike.getSponsors({programId: string}).then(sponsors => console.log(sponsors))

    Parameters

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

    Returns Promise<ISponsorPayload[]>






Index

Functions

Const createUserProfile

  • createUserProfile(args: { nickname?: string }): Promise<IUserProfile>
  • Creates user profile. If no nickname argument is passed, a random nickname will be generated.

    async
    since

    1.18.0

    example
    createUserProfile({ nickname: 'Test Nickname' }).then(profile => console.log(profile))

    Parameters

    • args: { nickname?: string }
      • Optional nickname?: string

        Optional nickname

    Returns Promise<IUserProfile>

Const getUserProfile

  • getUserProfile(args: { accessToken?: string; profileId?: string }): Promise<IUserProfile>
  • Gets userProfile from accessToken.

    async
    since

    1.18.0

    example
    getUserProfile({ accessToken }).then(profile => console.log(profile))

    Parameters

    • args: { accessToken?: string; profileId?: string }
      • Optional accessToken?: string
      • Optional profileId?: string

    Returns Promise<IUserProfile>

Const updateUserProfile

  • updateUserProfile(args: { accessToken: string; options?: { custom_data?: string; nickname?: string } }): Promise<IUserProfile>
  • Updates profile by accessToken with optional changed nickname or custom_data.

    async
    since

    1.18.0

    example
    const options = {nickname: 'New Nickname'}
    updateUserProfile({accessToken, options}).then(profile => console.log(profile))

    Parameters

    • args: { accessToken: string; options?: { custom_data?: string; nickname?: string } }
      • accessToken: string

        userProfile access_token

      • Optional options?: { custom_data?: string; nickname?: string }
        • Optional custom_data?: string

          Data saved to profile's custom_data property

        • Optional nickname?: string

          The nickname to update the userProfile

    Returns Promise<IUserProfile>


Index

Functions

Const addWidgetListener

  • 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

  • getPaginatedWidgets(__namedParameters: { programId: any }): Promise<PaginationIterator>
  • Get list of widgets that have already been posted.

    async
    since

    1.18.2

    Parameters

    • __namedParameters: { programId: any }
      • programId: any

    Returns Promise<PaginationIterator>

Const getPostedWidgets

  • Parameters

    • __namedParameters: { programId: any }
      • programId: any

    Returns Promise<IPostedWidgetsPayload>

Const getWidget

Const getWidgetInteractions

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

  • since

    2.4.0

    Parameters

    Returns void


Index

Enumerations

Interfaces

Type aliases

Type aliases

CustomWidgetRenderer

CustomWidgetRenderer: (__namedParameters: { IWidgetPayload: any }) => HTMLElement | Node

Type declaration

    • (__namedParameters: { IWidgetPayload: any }): HTMLElement | Node
    • Parameters

      • __namedParameters: { IWidgetPayload: any }
        • IWidgetPayload: any

      Returns HTMLElement | Node

ListenerFn

ListenerFn<TEvent, TMessage>: (msg: ListenerEventMessage<TEvent, TMessage>) => void

Type parameters

  • TEvent

  • TMessage

Type declaration

MessageListenerCallback

MessageListenerCallback: (args: IMessageListenerCallbackArgs) => unknown

Type declaration

MessagePreparationCallback

MessagePreparationCallback: (message: IMessageResponse) => IMessageResponse

Type declaration

RegisterMenuArgs

RegisterMenuArgs: (message?: any) => IMessageMenuItem[]

Type declaration

WidgetKind

WidgetKind: "alert" | "text-poll" | "image-poll" | "text-quiz" | "image-quiz" | "text-prediction" | "text-prediction-follow-up" | "image-prediction" | "image-prediction-follow-up" | "cheer-meter" | "social-embed" | "emoji-slider" | "rich-post" | "text-ask" | "video-alert" | "text-number-prediction" | "text-number-prediction-follow-up" | "image-number-prediction" | "image-number-prediction-follow-up"

WidgetListenerCallback

WidgetListenerCallback: (args: IWidgetListenerCallbackArgs) => unknown

Type declaration

WidgetListenerEvents

WidgetListenerEvents: "alert-created" | "text-poll-created" | "image-poll-created" | "text-quiz-created" | "image-quiz-created" | "text-prediction-created" | "text-prediction-follow-up-updated" | "image-prediction-created" | "image-prediction-follow-up-updated" | "cheer-meter-created" | "social-embed-created" | "emoji-slider-created" | "rich-post-created" | "text-ask-created" | "video-alert-created" | "text-number-prediction-created" | "text-number-prediction-follow-up-updated" | "image-number-prediction-created" | "image-number-prediction-follow-up-updated"

WidgetMode

WidgetMode: (args: IWidgetModeArgs) => void

Type declaration

customMessageRenderer

customMessageRenderer: (__namedParameters: { IMessagePayload: any }) => HTMLElement | Node

Type declaration

    • (__namedParameters: { IMessagePayload: any }): HTMLElement | Node
    • Parameters

      • __namedParameters: { IMessagePayload: any }
        • IMessagePayload: any

      Returns HTMLElement | Node