How to use jellyfin-apiclient - 3 common examples

To help you get started, we’ve selected a few jellyfin-apiclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jellyfin / jellyfin-react-client / src / actions / ConnectAction.ts View on Github external
return async (dispatch) => {
        const normalizedAddress = normalizeAddress(serverAddress);
        setApiClient(new ApiClient(null, normalizedAddress || '-', "Jellyfin WebNG", "0.0.1", "WebNG", "WebNG", ""));

        try {
            await getApiClient().getPublicSystemInfo()
            dispatch(connectSuccessful({ serverAddress }));
            return true
        } catch (err) {
            dispatch(connectFailed({ serverAddress }));
            return false
        }
    };
}
github jellyfin / jellyfin-react-client / jellyfinclient / src / actions / ApiClient.js View on Github external
connect: function (address) {
        this.apiClient = new ApiClient(null, address, "Jellyfin WebNG", '0.0.1', 'WebNG', 'WebNG', '')
    }
}
github jellyfin / jellyfin-react-client / src / utilities / api-client.ts View on Github external
import ApiClient from 'jellyfin-apiclient/dist/apiclient';

let apiClient = new ApiClient(null, '-', "Jellyfin WebNG", "0.0.1", "WebNG", "WebNG", "")

export function getApiClient(): ApiClient {
  return apiClient
}

export function setApiClient(client: ApiClient) {
  apiClient = client;
}

jellyfin-apiclient

API client for Jellyfin

MIT
Latest version published 7 months ago

Package Health Score

62 / 100
Full package analysis

Popular jellyfin-apiclient functions

Similar packages