Jellyfin API client using axios


Keywords
axios, typescript, jellyfin
License
MIT
Install
npm install @jellyfin/client-axios@10.7.8

Documentation

Jellyfin API Client for Axios

Part of the Jellyfin Project


Logo Banner

stable npm unstable npm MIT License Donate Feature Requests Chat on Matrix Join our Subreddit

WARNING: The current 10.7.8 package for this project is the one matching the 10.7.7 server API due to a bug in our deployment. New versions should be fixed and follow the server versioning.

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