feat: Implemented jellyfin api

This commit is contained in:
Aleksi Lassila
2024-03-28 00:49:43 +02:00
parent da2b4ee6d5
commit 71b70e5868
15 changed files with 157 additions and 64 deletions

View File

@@ -1,11 +1,15 @@
import type createClient from 'openapi-fetch';
export abstract class Api<Paths extends NonNullable<unknown>> {
protected abstract baseUrl: string;
protected abstract client: ReturnType<typeof createClient<Paths>>;
protected abstract isLoggedIn: boolean;
getApi() {
return this.client;
}
export interface Api<Paths extends NonNullable<unknown>> {
getClient(): ReturnType<typeof createClient<Paths>>;
}
// export abstract class Api<Paths extends NonNullable<unknown>> {
// protected abstract baseUrl: string;
// protected abstract client: ReturnType<typeof createClient<Paths>>;
// protected abstract isLoggedIn: boolean;
//
// getApi() {
// return this.client;
// }
// }