Swift SDK for Jellyfin
Go to file
2022-08-17 15:11:52 -06:00
JellyfinAPI.doccarchive generate with CreateAPI 0.1.0 and doccarchive 2022-08-16 23:32:51 -06:00
Plugins/CreateAPI lint 2022-08-17 15:08:41 -06:00
Sources lint 2022-08-17 15:08:41 -06:00
.gitignore Update .gitignore 2022-08-16 23:39:51 -06:00
.swiftformat update 2022-08-15 20:37:47 -06:00
Package.resolved fix Get package 2022-08-08 14:23:59 -06:00
Package.swift lint 2022-08-17 15:08:41 -06:00
README.md Update README.md 2022-08-17 15:11:52 -06:00

Jellyfin SDK for Swift

A Swift async/await SDK for Jellyfin, generated using CreateAPI.

Usage

The JellyfinClient object is a wrapper around Get's APIClient to provide basic functionality for interfacing with a Jellyfin server, notably injecting required headers for each request. JellyfinClient uses the same API as APIClient for making all requests. You are still able to use any networking stack you desire by using the provided Entities and Paths.

let jellyfinClient = JellyfinClient(configuration: configuration)

// Provided method on JellyfinClient
let response = jellyfinClient.signIn(username: "jelly", password: "fin")

Generation

Generating and updating the Entities, Extensions, and Paths with CreateAPI is provided as an Xcode command plugin.

  1. Download the latest Jellyfin schema
  2. Move the schema to /Sources
  3. Delete the current Entities, Extensions, and Paths directories
  4. Run the following command in the package directory:
# runs the CreateAPI Xcode command plugin
$ swift package --allow-writing-to-package-directory generate-api
  1. New Entities, Extensions, and Paths directories should be available within the package