241 lines
8.8 KiB
TypeScript
241 lines
8.8 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Jellyfin API
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 10.8.9
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
import * as runtime from '../runtime';
|
|
import type {
|
|
ImageByNameInfo,
|
|
ProblemDetails,
|
|
} from '../models';
|
|
import {
|
|
ImageByNameInfoFromJSON,
|
|
ImageByNameInfoToJSON,
|
|
ProblemDetailsFromJSON,
|
|
ProblemDetailsToJSON,
|
|
} from '../models';
|
|
|
|
export interface GetGeneralImageRequest {
|
|
name: string;
|
|
type: string;
|
|
}
|
|
|
|
export interface GetMediaInfoImageRequest {
|
|
theme: string;
|
|
name: string;
|
|
}
|
|
|
|
export interface GetRatingImageRequest {
|
|
theme: string;
|
|
name: string;
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
export class ImageByNameApi extends runtime.BaseAPI {
|
|
|
|
/**
|
|
* Get General Image.
|
|
*/
|
|
async getGeneralImageRaw(requestParameters: GetGeneralImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getGeneralImage.');
|
|
}
|
|
|
|
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling getGeneralImage.');
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/Images/General/{name}/{type}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))).replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Get General Image.
|
|
*/
|
|
async getGeneralImage(requestParameters: GetGeneralImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.getGeneralImageRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Get all general images.
|
|
*/
|
|
async getGeneralImagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ImageByNameInfo>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/Images/General`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageByNameInfoFromJSON));
|
|
}
|
|
|
|
/**
|
|
* Get all general images.
|
|
*/
|
|
async getGeneralImages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ImageByNameInfo>> {
|
|
const response = await this.getGeneralImagesRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Get media info image.
|
|
*/
|
|
async getMediaInfoImageRaw(requestParameters: GetMediaInfoImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
if (requestParameters.theme === null || requestParameters.theme === undefined) {
|
|
throw new runtime.RequiredError('theme','Required parameter requestParameters.theme was null or undefined when calling getMediaInfoImage.');
|
|
}
|
|
|
|
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getMediaInfoImage.');
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/Images/MediaInfo/{theme}/{name}`.replace(`{${"theme"}}`, encodeURIComponent(String(requestParameters.theme))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Get media info image.
|
|
*/
|
|
async getMediaInfoImage(requestParameters: GetMediaInfoImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.getMediaInfoImageRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Get all media info images.
|
|
*/
|
|
async getMediaInfoImagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ImageByNameInfo>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/Images/MediaInfo`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageByNameInfoFromJSON));
|
|
}
|
|
|
|
/**
|
|
* Get all media info images.
|
|
*/
|
|
async getMediaInfoImages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ImageByNameInfo>> {
|
|
const response = await this.getMediaInfoImagesRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Get rating image.
|
|
*/
|
|
async getRatingImageRaw(requestParameters: GetRatingImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
if (requestParameters.theme === null || requestParameters.theme === undefined) {
|
|
throw new runtime.RequiredError('theme','Required parameter requestParameters.theme was null or undefined when calling getRatingImage.');
|
|
}
|
|
|
|
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getRatingImage.');
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/Images/Ratings/{theme}/{name}`.replace(`{${"theme"}}`, encodeURIComponent(String(requestParameters.theme))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Get rating image.
|
|
*/
|
|
async getRatingImage(requestParameters: GetRatingImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.getRatingImageRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Get all general images.
|
|
*/
|
|
async getRatingImagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ImageByNameInfo>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/Images/Ratings`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageByNameInfoFromJSON));
|
|
}
|
|
|
|
/**
|
|
* Get all general images.
|
|
*/
|
|
async getRatingImages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ImageByNameInfo>> {
|
|
const response = await this.getRatingImagesRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
}
|