Class representing the Jellyfin API.

Constructors

  • Parameters

    • basePath: string
    • clientInfo: ClientInfo
    • deviceInfo: DeviceInfo
    • accessToken: string = ''
    • axiosInstance: AxiosInstance = globalInstance

    Returns Api

Properties

accessToken: string
axiosInstance: AxiosInstance
basePath: string
clientInfo: ClientInfo
deviceInfo: DeviceInfo

Accessors

  • get authorizationHeader(): string
  • Returns string

Methods

  • Convenience method for authenticating a user by name and updating the internal state.

    Parameters

    • username: string

      The username.

    • Optionalpassword: string

      The user password if required.

    Returns Promise<AxiosResponse<AuthenticationResult>>

  • Gets a full URI for a relative URL to the Jellyfin server for a given SDK Api instance.

    Parameters

    • url: string

      The relative URL.

    • Optionalparams: object

      Any URL parameters.

    Returns string

    The complete URI with protocol, host, and base URL (if any).

  • Convenience method for logging out and updating the internal state.

    Returns Promise<AxiosResponse<void> | AxiosResponse<never>>