Options
All
  • Public
  • Public/Protected
  • All
Menu

CelebrityAPI is an interface for celebrity actions.

Hierarchy

  • CelebrityAPI

Index

Constructors

constructor

Methods

login

  • login(username: string, password: string): Promise<void>
  • Used to login to the system. Request is retried multiple times in case of network error. Can reject with SDKError. If username/password pair is incorrect, rejects with SDKError with Errors.NOT_FOUND code.

    Parameters

    • username: string
    • password: string

    Returns Promise<void>

logout

  • logout(): void
  • Used to logout from the system. Stops subscription if active.

    Returns void

setLogLevel

subscribe

  • subscribe(onData: (data: { sessions: [Session]; total: number }) => any, onError: (e: SDKError) => any): void
  • Used to start a subscription for active sessions. Accepts two callbacks:

    Parameters

    • onData: (data: { sessions: [Session]; total: number }) => any

      Is called when sessions list is updated with data containing total number of active sessions and top 500 sessions.

        • (data: { sessions: [Session]; total: number }): any
        • Parameters

          • data: { sessions: [Session]; total: number }

          Returns any

    • onError: (e: SDKError) => any

      Is called in case of critical error such as Errors.NOT_AUTHORIZED. Automatically stops the subscription.

    Returns void

unsubscribe

  • unsubscribe(): void
  • Used to stop the subscription for active sessions. Aborts any inflight requests.

    Returns void