TypeScript SDK for Jellyfin
Go to file
2021-09-15 01:30:55 -04:00
docs Move documentation to markdown 2021-09-15 00:11:33 -04:00
scripts Fix openapi schema 2021-08-30 00:36:18 -04:00
src Update structure 2021-09-15 01:30:55 -04:00
.eslintignore Initial commit 2021-08-29 01:00:52 -04:00
.eslintrc.js Initial commit 2021-08-29 01:00:52 -04:00
.gitattributes Initial commit 2021-08-29 01:00:52 -04:00
.gitignore Initial commit 2021-08-29 01:00:52 -04:00
jest.config.js Initial commit 2021-08-29 01:00:52 -04:00
LICENSE Update license 2021-09-14 01:10:15 -04:00
openapi.json Restore openapi.json 2021-09-14 01:40:42 -04:00
openapitools.json Initial commit 2021-08-29 01:00:52 -04:00
package-lock.json Move documentation to markdown 2021-09-15 00:11:33 -04:00
package.json Move documentation to markdown 2021-09-15 00:11:33 -04:00
README.md Update structure 2021-09-15 01:30:55 -04:00
tsconfig.json Add typedoc for documentation 2021-09-15 00:04:48 -04:00

jellyfin-sdk-typescript

A TypeScript SDK for Jellyfin.

Warning: This project is under active development and is not ready for production use. API changes will occur.

Usage

// Create a new instance of the SDK
const jellyfin = new Jellyfin();
const api = jellyfin.createApi(new Configuration({
    basePath: 'https://demo.jellyfin.org/stable'
}));

// Each API endpoint is exposed via a getter on the SDK instance using
// a shared Configuration and Axios instance. For example the /System APIs
// are available as api.systemApi.

// Fetch the public system info
const info = await api.systemApi.getPublicSystemInfo();
console.log('Info =>', info.data);

// Fetch the list of public users
const users = await api.userApi.getPublicUsers();
console.log('Users =>', users.data);

// A helper method for authentication has been added to the SDK because
// the default method exposed in the generated Axios client is rather
// cumbersome to use.
const auth = await api.authenticateUserByName({ Username: 'demo', Pw: '' });
console.log('Auth =>', auth.data);