@jellyfin/sdk
Version:
A TypeScript SDK for Jellyfin.
32 lines (31 loc) • 1.24 kB
TypeScript
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import type { AxiosInstance } from 'axios';
import { Api } from './api';
import { DiscoveryService } from './discovery/discovery-service';
import type { ClientInfo, DeviceInfo } from './models';
/** Supported server version constants */
export * from './versions';
/** Parameters to create a Jellyfin SDK instance. */
export interface JellyfinParameters {
clientInfo: ClientInfo;
deviceInfo: DeviceInfo;
}
/** Class representing the Jellyfin SDK. */
export declare class Jellyfin {
clientInfo: ClientInfo;
deviceInfo: DeviceInfo;
discovery: DiscoveryService;
constructor(parameters: JellyfinParameters);
/**
* Creates an Api instance for a given server path.
* @param basePath A base path of a server.
* @param accessToken An (optional) access token to use for authentication.
* @param axiosInstance An (optional) Axios instance for the Api to use.
* @returns An Api instance.
*/
createApi(basePath: string, accessToken?: string, axiosInstance?: AxiosInstance): Api;
}