Jellyfin SDK for Swift 5 generated using the OpenAPI generator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Ethan Pippin 0878c236b5
Non-Fixed Width Integers, Hashable, Inline Patching, and 10.8.9 (#18)
2 months ago
JellyfinAPI.doccarchive generate with CreateAPI 0.1.0 and doccarchive 10 months ago
Plugins/CreateAPI Non-Fixed Width Integers, Hashable, Inline Patching, and 10.8.9 (#18) 2 months ago
Sources Non-Fixed Width Integers, Hashable, Inline Patching, and 10.8.9 (#18) 2 months ago
.gitignore Update .gitignore 10 months ago
.swiftformat update 10 months ago
Package.resolved Non-Fixed Width Integers, Hashable, Inline Patching, and 10.8.9 (#18) 2 months ago
Package.swift Non-Fixed Width Integers, Hashable, Inline Patching, and 10.8.9 (#18) 2 months ago
README.md Non-Fixed Width Integers, Hashable, Inline Patching, and 10.8.9 (#18) 2 months ago

README.md

Swift SDK Jellyfin

Swift SDK to work with Jellyfin servers.

Generated using CreateAPI

Usage

JellyfinClient uses an underlying Get APIClient to provide basic functionality for interfacing with a Jellyfin server:

  • inject required Authorization header for every request
  • encoding/decoding of expected Date values
  • signIn for generating a session access token
  • signOut for revoking the current access token
// Create client instance
let jellyfinClient = JellyfinClient(configuration: configuration)

// Sign in user with credentials
let response = jellyfinClient.signIn(username: "jelly", password: "fin")

Alternatively, you can use your own network stack with the generated Entities and Paths.

Generation

The mechanism for generating 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

Alternatively, you can generate your own Swift Jellyfin SDK using CreateAPI or any other OpenAPI generator.