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

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

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