SessionApi - functional programming interface

  • Parameters

    Returns {
        addUserToSession(sessionId: string, userId: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        displayContent(sessionId: string, itemType: BaseItemKind, itemId: string, itemName: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        getAuthProviders(options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<NameIdPair[]>)>;
        getPasswordResetProviders(options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<NameIdPair[]>)>;
        getSessions(controllableByUserId?: string, deviceId?: string, activeWithinSeconds?: number, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionInfoDto[]>)>;
        play(sessionId: string, playCommand: PlayCommand, itemIds: string[], startPositionTicks?: number, mediaSourceId?: string, audioStreamIndex?: number, subtitleStreamIndex?: number, startIndex?: number, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        postCapabilities(id?: string, playableMediaTypes?: MediaType[], supportedCommands?: GeneralCommandType[], supportsMediaControl?: boolean, supportsPersistentIdentifier?: boolean, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        postFullCapabilities(clientCapabilitiesDto: ClientCapabilitiesDto, id?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        removeUserFromSession(sessionId: string, userId: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        reportSessionEnded(options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        reportViewing(itemId: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        sendFullGeneralCommand(sessionId: string, generalCommand: GeneralCommand, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        sendGeneralCommand(sessionId: string, command: GeneralCommandType, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        sendMessageCommand(sessionId: string, messageCommand: MessageCommand, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        sendPlaystateCommand(sessionId: string, command: PlaystateCommand, seekPositionTicks?: number, controllingUserId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        sendSystemCommand(sessionId: string, command: GeneralCommandType, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
    }

    • addUserToSession:function
      • Parameters

        • sessionId: string

          The session id.

        • userId: string

          The user id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Adds an additional user to a session.

    • displayContent:function
      • Parameters

        • sessionId: string

          The session Id.

        • itemType: BaseItemKind

          The type of item to browse to.

        • itemId: string

          The Id of the item.

        • itemName: string

          The name of the item.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Instructs a session to browse to an item or view.

    • getAuthProviders:function
      • Parameters

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<NameIdPair[]>)>

        Get all auth providers.

    • getPasswordResetProviders:function
      • Parameters

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<NameIdPair[]>)>

        Get all password reset providers.

    • getSessions:function
      • Parameters

        • OptionalcontrollableByUserId: string

          Filter by sessions that a given user is allowed to remote control.

        • OptionaldeviceId: string

          Filter by device Id.

        • OptionalactiveWithinSeconds: number

          Optional. Filter by sessions that were active in the last n seconds.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionInfoDto[]>)>

        Gets a list of sessions.

    • play:function
      • Parameters

        • sessionId: string

          The session id.

        • playCommand: PlayCommand

          The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.

        • itemIds: string[]

          The ids of the items to play, comma delimited.

        • OptionalstartPositionTicks: number

          The starting position of the first item.

        • OptionalmediaSourceId: string

          Optional. The media source id.

        • OptionalaudioStreamIndex: number

          Optional. The index of the audio stream to play.

        • OptionalsubtitleStreamIndex: number

          Optional. The index of the subtitle stream to play.

        • OptionalstartIndex: number

          Optional. The start index.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Instructs a session to play an item.

    • postCapabilities:function
      • Parameters

        • Optionalid: string

          The session id.

        • OptionalplayableMediaTypes: MediaType[]

          A list of playable media types, comma delimited. Audio, Video, Book, Photo.

        • OptionalsupportedCommands: GeneralCommandType[]

          A list of supported remote control commands, comma delimited.

        • OptionalsupportsMediaControl: boolean

          Determines whether media can be played remotely..

        • OptionalsupportsPersistentIdentifier: boolean

          Determines whether the device supports a unique identifier.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Updates capabilities for a device.

    • postFullCapabilities:function
      • Parameters

        • clientCapabilitiesDto: ClientCapabilitiesDto

          The MediaBrowser.Model.Session.ClientCapabilities.

        • Optionalid: string

          The session id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Updates capabilities for a device.

    • removeUserFromSession:function
      • Parameters

        • sessionId: string

          The session id.

        • userId: string

          The user id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Removes an additional user from a session.

    • reportSessionEnded:function
      • Parameters

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports that a session has ended.

    • reportViewing:function
      • Parameters

        • itemId: string

          The item id.

        • OptionalsessionId: string

          The session id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports that a session is viewing an item.

    • sendFullGeneralCommand:function
      • Parameters

        • sessionId: string

          The session id.

        • generalCommand: GeneralCommand

          The MediaBrowser.Model.Session.GeneralCommand.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Issues a full general command to a client.

    • sendGeneralCommand:function
      • Parameters

        • sessionId: string

          The session id.

        • command: GeneralCommandType

          The command to send.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Issues a general command to a client.

    • sendMessageCommand:function
      • Parameters

        • sessionId: string

          The session id.

        • messageCommand: MessageCommand

          The MediaBrowser.Model.Session.MessageCommand object containing Header, Message Text, and TimeoutMs.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Issues a command to a client to display a message to the user.

    • sendPlaystateCommand:function
      • Parameters

        • sessionId: string

          The session id.

        • command: PlaystateCommand

          The MediaBrowser.Model.Session.PlaystateCommand.

        • OptionalseekPositionTicks: number

          The optional position ticks.

        • OptionalcontrollingUserId: string

          The optional controlling user id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Issues a playstate command to a client.

    • sendSystemCommand:function
      • Parameters

        • sessionId: string

          The session id.

        • command: GeneralCommandType

          The command to send.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Issues a system command to a client.