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

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

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

  • 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

    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 Promise<void>

Const sendMessage


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 }): Promise<IUserProfile>
  • Gets userProfile from accessToken.

    async
    since

    1.18.0

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

    Parameters

    • args: { accessToken: string }
      • accessToken: string

        userProfile access_token

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


Index

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

MessageListenerCallback

MessageListenerCallback: (args: IMessageListenerCallbackArgs) => unknown

Type declaration

MessagePreparationCallback

MessagePreparationCallback: (message: IMessageResponse) => IMessageResponse

Type declaration

RegisterMenuArgs

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

Type declaration

Rewards

Rewards: IRewardItem[]

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" | "image-slider" | "rich-post"

WidgetMode

WidgetMode: (args: IWidgetModeArgs) => void

Type declaration