/jellyfin-client-axios

Axios client and TypeScript typings for Jellyfin, the free media server

Primary LanguageTypeScriptMIT LicenseMIT

Jellyfin API Client for Axios

Part of the Jellyfin Project


Logo Banner

MIT License Donate Feature Requests Chat on Matrix Join our Subreddit

WARNING: The code generated by this project is currently unusable due to a bug in the OpenAPITools generator OpenAPITools/openapi-generator#9163

This library is meant to help clients written in JavaScript or TypeScript interact with Jellyfin's REST API. It's generated automatically using OpenAPITools generator and it's fully typed for TypeScript

Compatibility

This library depends on Axios.

TypeScript typings

You can also use this library as a development dependency just for the TypeScript typings. Types are located under the models subfolder:

import type TYPE_NAME from '@jellyfin/client-axios/models';

Build Process

This API client is built automatically every midnight for the stable and unstable API releases. You can build it yourself using Docker:

Stable API (>= Jellyfin Server 10.7.0)

docker run --rm openapitools/openapi-generator-cli generate -i https://api.jellyfin.org/openapi/jellyfin-openapi-stable.json
-g typescript-axios --additional-properties=npmName=@jellyfin/client-axios
--additional-properties=supportsES6=true
--additional-properties=useSingleRequestParameter=true
--additional-properties=withSeparateModelsAndApi=true
--additional-properties=modelPackage=models
--additional-properties=apiPackage=api
--enable-post-process-file
-o /output/dir

Unstable API (current Jellyfin Server master branch)

docker run --rm openapitools/openapi-generator-cli generate -i https://api.jellyfin.org/openapi/jellyfin-openapi-unstable.json
-g typescript-axios --additional-properties=npmName=@jellyfin/client-axios
--additional-properties=supportsES6=true
--additional-properties=useSingleRequestParameter=true
--additional-properties=withSeparateModelsAndApi=true
--additional-properties=modelPackage=models
--additional-properties=apiPackage=api
--enable-post-process-file
-o /output/dir

If you want to compile the TypeScript sources to JavaScript, check the README of the generated output, as it will contain up to date instructions of how to do it yourself.

Examples

We use this API client at Jellyfin Vue and Jellyfin Chromecast