@jellyfin/sdk
Version:
A TypeScript SDK for Jellyfin.
566 lines (563 loc) • 41.9 kB
JavaScript
import globalAxios from 'axios';
import { DUMMY_BASE_URL, setApiKeyToObject, setSearchParams, toPathString, assertParamExists, createRequestFunction } from '../common.js';
import { operationServerMap, BaseAPI, BASE_PATH } from '../base.js';
/* tslint:disable */
/* eslint-disable */
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*
* Jellyfin API
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/**
* ArtistsApi - axios parameter creator
* @export
*/
const ArtistsApiAxiosParamCreator = function (configuration) {
return {
/**
*
* @summary Gets all album artists from a given item, folder, or the entire library.
* @param {number} [minCommunityRating] Optional filter by minimum community rating.
* @param {number} [startIndex] Optional. The record index to start at. All items with a lower index will be dropped from the results.
* @param {number} [limit] Optional. The maximum number of records to return.
* @param {string} [searchTerm] Optional. Search term.
* @param {string} [parentId] Specify this to localize the search to a specific item or folder. Omit to use the root.
* @param {Array<ItemFields>} [fields] Optional. Specify additional fields of information to return in the output.
* @param {Array<BaseItemKind>} [excludeItemTypes] Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
* @param {Array<BaseItemKind>} [includeItemTypes] Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
* @param {Array<ItemFilter>} [filters] Optional. Specify additional filters to apply.
* @param {boolean} [isFavorite] Optional filter by items that are marked as favorite, or not.
* @param {Array<MediaType>} [mediaTypes] Optional filter by MediaType. Allows multiple, comma delimited.
* @param {Array<string>} [genres] Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.
* @param {Array<string>} [genreIds] Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.
* @param {Array<string>} [officialRatings] Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.
* @param {Array<string>} [tags] Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.
* @param {Array<number>} [years] Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.
* @param {boolean} [enableUserData] Optional, include user data.
* @param {number} [imageTypeLimit] Optional, the max number of images to return, per image type.
* @param {Array<ImageType>} [enableImageTypes] Optional. The image types to include in the output.
* @param {string} [person] Optional. If specified, results will be filtered to include only those containing the specified person.
* @param {Array<string>} [personIds] Optional. If specified, results will be filtered to include only those containing the specified person ids.
* @param {Array<string>} [personTypes] Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.
* @param {Array<string>} [studios] Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.
* @param {Array<string>} [studioIds] Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.
* @param {string} [userId] User id.
* @param {string} [nameStartsWithOrGreater] Optional filter by items whose name is sorted equally or greater than a given input string.
* @param {string} [nameStartsWith] Optional filter by items whose name is sorted equally than a given input string.
* @param {string} [nameLessThan] Optional filter by items whose name is equally or lesser than a given input string.
* @param {Array<ItemSortBy>} [sortBy] Optional. Specify one or more sort orders, comma delimited.
* @param {Array<SortOrder>} [sortOrder] Sort Order - Ascending,Descending.
* @param {boolean} [enableImages] Optional, include image information in output.
* @param {boolean} [enableTotalRecordCount] Total record count.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAlbumArtists: async (minCommunityRating, startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, filters, isFavorite, mediaTypes, genres, genreIds, officialRatings, tags, years, enableUserData, imageTypeLimit, enableImageTypes, person, personIds, personTypes, studios, studioIds, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options = {}) => {
const localVarPath = `/Artists/AlbumArtists`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication CustomAuthentication required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
if (minCommunityRating !== undefined) {
localVarQueryParameter['minCommunityRating'] = minCommunityRating;
}
if (startIndex !== undefined) {
localVarQueryParameter['startIndex'] = startIndex;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (searchTerm !== undefined) {
localVarQueryParameter['searchTerm'] = searchTerm;
}
if (parentId !== undefined) {
localVarQueryParameter['parentId'] = parentId;
}
if (fields) {
localVarQueryParameter['fields'] = fields;
}
if (excludeItemTypes) {
localVarQueryParameter['excludeItemTypes'] = excludeItemTypes;
}
if (includeItemTypes) {
localVarQueryParameter['includeItemTypes'] = includeItemTypes;
}
if (filters) {
localVarQueryParameter['filters'] = filters;
}
if (isFavorite !== undefined) {
localVarQueryParameter['isFavorite'] = isFavorite;
}
if (mediaTypes) {
localVarQueryParameter['mediaTypes'] = mediaTypes;
}
if (genres) {
localVarQueryParameter['genres'] = genres;
}
if (genreIds) {
localVarQueryParameter['genreIds'] = genreIds;
}
if (officialRatings) {
localVarQueryParameter['officialRatings'] = officialRatings;
}
if (tags) {
localVarQueryParameter['tags'] = tags;
}
if (years) {
localVarQueryParameter['years'] = years;
}
if (enableUserData !== undefined) {
localVarQueryParameter['enableUserData'] = enableUserData;
}
if (imageTypeLimit !== undefined) {
localVarQueryParameter['imageTypeLimit'] = imageTypeLimit;
}
if (enableImageTypes) {
localVarQueryParameter['enableImageTypes'] = enableImageTypes;
}
if (person !== undefined) {
localVarQueryParameter['person'] = person;
}
if (personIds) {
localVarQueryParameter['personIds'] = personIds;
}
if (personTypes) {
localVarQueryParameter['personTypes'] = personTypes;
}
if (studios) {
localVarQueryParameter['studios'] = studios;
}
if (studioIds) {
localVarQueryParameter['studioIds'] = studioIds;
}
if (userId !== undefined) {
localVarQueryParameter['userId'] = userId;
}
if (nameStartsWithOrGreater !== undefined) {
localVarQueryParameter['nameStartsWithOrGreater'] = nameStartsWithOrGreater;
}
if (nameStartsWith !== undefined) {
localVarQueryParameter['nameStartsWith'] = nameStartsWith;
}
if (nameLessThan !== undefined) {
localVarQueryParameter['nameLessThan'] = nameLessThan;
}
if (sortBy) {
localVarQueryParameter['sortBy'] = sortBy;
}
if (sortOrder) {
localVarQueryParameter['sortOrder'] = sortOrder;
}
if (enableImages !== undefined) {
localVarQueryParameter['enableImages'] = enableImages;
}
if (enableTotalRecordCount !== undefined) {
localVarQueryParameter['enableTotalRecordCount'] = enableTotalRecordCount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Gets an artist by name.
* @param {string} name Studio name.
* @param {string} [userId] Optional. Filter by user id, and attach user data.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getArtistByName: async (name, userId, options = {}) => {
// verify required parameter 'name' is not null or undefined
assertParamExists('getArtistByName', 'name', name);
const localVarPath = `/Artists/{name}`
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication CustomAuthentication required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
if (userId !== undefined) {
localVarQueryParameter['userId'] = userId;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Gets all artists from a given item, folder, or the entire library.
* @param {number} [minCommunityRating] Optional filter by minimum community rating.
* @param {number} [startIndex] Optional. The record index to start at. All items with a lower index will be dropped from the results.
* @param {number} [limit] Optional. The maximum number of records to return.
* @param {string} [searchTerm] Optional. Search term.
* @param {string} [parentId] Specify this to localize the search to a specific item or folder. Omit to use the root.
* @param {Array<ItemFields>} [fields] Optional. Specify additional fields of information to return in the output.
* @param {Array<BaseItemKind>} [excludeItemTypes] Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
* @param {Array<BaseItemKind>} [includeItemTypes] Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
* @param {Array<ItemFilter>} [filters] Optional. Specify additional filters to apply.
* @param {boolean} [isFavorite] Optional filter by items that are marked as favorite, or not.
* @param {Array<MediaType>} [mediaTypes] Optional filter by MediaType. Allows multiple, comma delimited.
* @param {Array<string>} [genres] Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.
* @param {Array<string>} [genreIds] Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.
* @param {Array<string>} [officialRatings] Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.
* @param {Array<string>} [tags] Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.
* @param {Array<number>} [years] Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.
* @param {boolean} [enableUserData] Optional, include user data.
* @param {number} [imageTypeLimit] Optional, the max number of images to return, per image type.
* @param {Array<ImageType>} [enableImageTypes] Optional. The image types to include in the output.
* @param {string} [person] Optional. If specified, results will be filtered to include only those containing the specified person.
* @param {Array<string>} [personIds] Optional. If specified, results will be filtered to include only those containing the specified person ids.
* @param {Array<string>} [personTypes] Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.
* @param {Array<string>} [studios] Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.
* @param {Array<string>} [studioIds] Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.
* @param {string} [userId] User id.
* @param {string} [nameStartsWithOrGreater] Optional filter by items whose name is sorted equally or greater than a given input string.
* @param {string} [nameStartsWith] Optional filter by items whose name is sorted equally than a given input string.
* @param {string} [nameLessThan] Optional filter by items whose name is equally or lesser than a given input string.
* @param {Array<ItemSortBy>} [sortBy] Optional. Specify one or more sort orders, comma delimited.
* @param {Array<SortOrder>} [sortOrder] Sort Order - Ascending,Descending.
* @param {boolean} [enableImages] Optional, include image information in output.
* @param {boolean} [enableTotalRecordCount] Total record count.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getArtists: async (minCommunityRating, startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, filters, isFavorite, mediaTypes, genres, genreIds, officialRatings, tags, years, enableUserData, imageTypeLimit, enableImageTypes, person, personIds, personTypes, studios, studioIds, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options = {}) => {
const localVarPath = `/Artists`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication CustomAuthentication required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
if (minCommunityRating !== undefined) {
localVarQueryParameter['minCommunityRating'] = minCommunityRating;
}
if (startIndex !== undefined) {
localVarQueryParameter['startIndex'] = startIndex;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (searchTerm !== undefined) {
localVarQueryParameter['searchTerm'] = searchTerm;
}
if (parentId !== undefined) {
localVarQueryParameter['parentId'] = parentId;
}
if (fields) {
localVarQueryParameter['fields'] = fields;
}
if (excludeItemTypes) {
localVarQueryParameter['excludeItemTypes'] = excludeItemTypes;
}
if (includeItemTypes) {
localVarQueryParameter['includeItemTypes'] = includeItemTypes;
}
if (filters) {
localVarQueryParameter['filters'] = filters;
}
if (isFavorite !== undefined) {
localVarQueryParameter['isFavorite'] = isFavorite;
}
if (mediaTypes) {
localVarQueryParameter['mediaTypes'] = mediaTypes;
}
if (genres) {
localVarQueryParameter['genres'] = genres;
}
if (genreIds) {
localVarQueryParameter['genreIds'] = genreIds;
}
if (officialRatings) {
localVarQueryParameter['officialRatings'] = officialRatings;
}
if (tags) {
localVarQueryParameter['tags'] = tags;
}
if (years) {
localVarQueryParameter['years'] = years;
}
if (enableUserData !== undefined) {
localVarQueryParameter['enableUserData'] = enableUserData;
}
if (imageTypeLimit !== undefined) {
localVarQueryParameter['imageTypeLimit'] = imageTypeLimit;
}
if (enableImageTypes) {
localVarQueryParameter['enableImageTypes'] = enableImageTypes;
}
if (person !== undefined) {
localVarQueryParameter['person'] = person;
}
if (personIds) {
localVarQueryParameter['personIds'] = personIds;
}
if (personTypes) {
localVarQueryParameter['personTypes'] = personTypes;
}
if (studios) {
localVarQueryParameter['studios'] = studios;
}
if (studioIds) {
localVarQueryParameter['studioIds'] = studioIds;
}
if (userId !== undefined) {
localVarQueryParameter['userId'] = userId;
}
if (nameStartsWithOrGreater !== undefined) {
localVarQueryParameter['nameStartsWithOrGreater'] = nameStartsWithOrGreater;
}
if (nameStartsWith !== undefined) {
localVarQueryParameter['nameStartsWith'] = nameStartsWith;
}
if (nameLessThan !== undefined) {
localVarQueryParameter['nameLessThan'] = nameLessThan;
}
if (sortBy) {
localVarQueryParameter['sortBy'] = sortBy;
}
if (sortOrder) {
localVarQueryParameter['sortOrder'] = sortOrder;
}
if (enableImages !== undefined) {
localVarQueryParameter['enableImages'] = enableImages;
}
if (enableTotalRecordCount !== undefined) {
localVarQueryParameter['enableTotalRecordCount'] = enableTotalRecordCount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* ArtistsApi - functional programming interface
* @export
*/
const ArtistsApiFp = function (configuration) {
const localVarAxiosParamCreator = ArtistsApiAxiosParamCreator(configuration);
return {
/**
*
* @summary Gets all album artists from a given item, folder, or the entire library.
* @param {number} [minCommunityRating] Optional filter by minimum community rating.
* @param {number} [startIndex] Optional. The record index to start at. All items with a lower index will be dropped from the results.
* @param {number} [limit] Optional. The maximum number of records to return.
* @param {string} [searchTerm] Optional. Search term.
* @param {string} [parentId] Specify this to localize the search to a specific item or folder. Omit to use the root.
* @param {Array<ItemFields>} [fields] Optional. Specify additional fields of information to return in the output.
* @param {Array<BaseItemKind>} [excludeItemTypes] Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
* @param {Array<BaseItemKind>} [includeItemTypes] Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
* @param {Array<ItemFilter>} [filters] Optional. Specify additional filters to apply.
* @param {boolean} [isFavorite] Optional filter by items that are marked as favorite, or not.
* @param {Array<MediaType>} [mediaTypes] Optional filter by MediaType. Allows multiple, comma delimited.
* @param {Array<string>} [genres] Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.
* @param {Array<string>} [genreIds] Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.
* @param {Array<string>} [officialRatings] Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.
* @param {Array<string>} [tags] Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.
* @param {Array<number>} [years] Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.
* @param {boolean} [enableUserData] Optional, include user data.
* @param {number} [imageTypeLimit] Optional, the max number of images to return, per image type.
* @param {Array<ImageType>} [enableImageTypes] Optional. The image types to include in the output.
* @param {string} [person] Optional. If specified, results will be filtered to include only those containing the specified person.
* @param {Array<string>} [personIds] Optional. If specified, results will be filtered to include only those containing the specified person ids.
* @param {Array<string>} [personTypes] Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.
* @param {Array<string>} [studios] Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.
* @param {Array<string>} [studioIds] Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.
* @param {string} [userId] User id.
* @param {string} [nameStartsWithOrGreater] Optional filter by items whose name is sorted equally or greater than a given input string.
* @param {string} [nameStartsWith] Optional filter by items whose name is sorted equally than a given input string.
* @param {string} [nameLessThan] Optional filter by items whose name is equally or lesser than a given input string.
* @param {Array<ItemSortBy>} [sortBy] Optional. Specify one or more sort orders, comma delimited.
* @param {Array<SortOrder>} [sortOrder] Sort Order - Ascending,Descending.
* @param {boolean} [enableImages] Optional, include image information in output.
* @param {boolean} [enableTotalRecordCount] Total record count.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAlbumArtists(minCommunityRating, startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, filters, isFavorite, mediaTypes, genres, genreIds, officialRatings, tags, years, enableUserData, imageTypeLimit, enableImageTypes, person, personIds, personTypes, studios, studioIds, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options) {
var _a, _b, _c;
const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumArtists(minCommunityRating, startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, filters, isFavorite, mediaTypes, genres, genreIds, officialRatings, tags, years, enableUserData, imageTypeLimit, enableImageTypes, person, personIds, personTypes, studios, studioIds, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ArtistsApi.getAlbumArtists']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Gets an artist by name.
* @param {string} name Studio name.
* @param {string} [userId] Optional. Filter by user id, and attach user data.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getArtistByName(name, userId, options) {
var _a, _b, _c;
const localVarAxiosArgs = await localVarAxiosParamCreator.getArtistByName(name, userId, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ArtistsApi.getArtistByName']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Gets all artists from a given item, folder, or the entire library.
* @param {number} [minCommunityRating] Optional filter by minimum community rating.
* @param {number} [startIndex] Optional. The record index to start at. All items with a lower index will be dropped from the results.
* @param {number} [limit] Optional. The maximum number of records to return.
* @param {string} [searchTerm] Optional. Search term.
* @param {string} [parentId] Specify this to localize the search to a specific item or folder. Omit to use the root.
* @param {Array<ItemFields>} [fields] Optional. Specify additional fields of information to return in the output.
* @param {Array<BaseItemKind>} [excludeItemTypes] Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
* @param {Array<BaseItemKind>} [includeItemTypes] Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
* @param {Array<ItemFilter>} [filters] Optional. Specify additional filters to apply.
* @param {boolean} [isFavorite] Optional filter by items that are marked as favorite, or not.
* @param {Array<MediaType>} [mediaTypes] Optional filter by MediaType. Allows multiple, comma delimited.
* @param {Array<string>} [genres] Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.
* @param {Array<string>} [genreIds] Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.
* @param {Array<string>} [officialRatings] Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.
* @param {Array<string>} [tags] Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.
* @param {Array<number>} [years] Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.
* @param {boolean} [enableUserData] Optional, include user data.
* @param {number} [imageTypeLimit] Optional, the max number of images to return, per image type.
* @param {Array<ImageType>} [enableImageTypes] Optional. The image types to include in the output.
* @param {string} [person] Optional. If specified, results will be filtered to include only those containing the specified person.
* @param {Array<string>} [personIds] Optional. If specified, results will be filtered to include only those containing the specified person ids.
* @param {Array<string>} [personTypes] Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.
* @param {Array<string>} [studios] Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.
* @param {Array<string>} [studioIds] Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.
* @param {string} [userId] User id.
* @param {string} [nameStartsWithOrGreater] Optional filter by items whose name is sorted equally or greater than a given input string.
* @param {string} [nameStartsWith] Optional filter by items whose name is sorted equally than a given input string.
* @param {string} [nameLessThan] Optional filter by items whose name is equally or lesser than a given input string.
* @param {Array<ItemSortBy>} [sortBy] Optional. Specify one or more sort orders, comma delimited.
* @param {Array<SortOrder>} [sortOrder] Sort Order - Ascending,Descending.
* @param {boolean} [enableImages] Optional, include image information in output.
* @param {boolean} [enableTotalRecordCount] Total record count.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getArtists(minCommunityRating, startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, filters, isFavorite, mediaTypes, genres, genreIds, officialRatings, tags, years, enableUserData, imageTypeLimit, enableImageTypes, person, personIds, personTypes, studios, studioIds, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options) {
var _a, _b, _c;
const localVarAxiosArgs = await localVarAxiosParamCreator.getArtists(minCommunityRating, startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, filters, isFavorite, mediaTypes, genres, genreIds, officialRatings, tags, years, enableUserData, imageTypeLimit, enableImageTypes, person, personIds, personTypes, studios, studioIds, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ArtistsApi.getArtists']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
};
};
/**
* ArtistsApi - factory interface
* @export
*/
const ArtistsApiFactory = function (configuration, basePath, axios) {
const localVarFp = ArtistsApiFp(configuration);
return {
/**
*
* @summary Gets all album artists from a given item, folder, or the entire library.
* @param {ArtistsApiGetAlbumArtistsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAlbumArtists(requestParameters = {}, options) {
return localVarFp.getAlbumArtists(requestParameters.minCommunityRating, requestParameters.startIndex, requestParameters.limit, requestParameters.searchTerm, requestParameters.parentId, requestParameters.fields, requestParameters.excludeItemTypes, requestParameters.includeItemTypes, requestParameters.filters, requestParameters.isFavorite, requestParameters.mediaTypes, requestParameters.genres, requestParameters.genreIds, requestParameters.officialRatings, requestParameters.tags, requestParameters.years, requestParameters.enableUserData, requestParameters.imageTypeLimit, requestParameters.enableImageTypes, requestParameters.person, requestParameters.personIds, requestParameters.personTypes, requestParameters.studios, requestParameters.studioIds, requestParameters.userId, requestParameters.nameStartsWithOrGreater, requestParameters.nameStartsWith, requestParameters.nameLessThan, requestParameters.sortBy, requestParameters.sortOrder, requestParameters.enableImages, requestParameters.enableTotalRecordCount, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Gets an artist by name.
* @param {ArtistsApiGetArtistByNameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getArtistByName(requestParameters, options) {
return localVarFp.getArtistByName(requestParameters.name, requestParameters.userId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Gets all artists from a given item, folder, or the entire library.
* @param {ArtistsApiGetArtistsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getArtists(requestParameters = {}, options) {
return localVarFp.getArtists(requestParameters.minCommunityRating, requestParameters.startIndex, requestParameters.limit, requestParameters.searchTerm, requestParameters.parentId, requestParameters.fields, requestParameters.excludeItemTypes, requestParameters.includeItemTypes, requestParameters.filters, requestParameters.isFavorite, requestParameters.mediaTypes, requestParameters.genres, requestParameters.genreIds, requestParameters.officialRatings, requestParameters.tags, requestParameters.years, requestParameters.enableUserData, requestParameters.imageTypeLimit, requestParameters.enableImageTypes, requestParameters.person, requestParameters.personIds, requestParameters.personTypes, requestParameters.studios, requestParameters.studioIds, requestParameters.userId, requestParameters.nameStartsWithOrGreater, requestParameters.nameStartsWith, requestParameters.nameLessThan, requestParameters.sortBy, requestParameters.sortOrder, requestParameters.enableImages, requestParameters.enableTotalRecordCount, options).then((request) => request(axios, basePath));
},
};
};
/**
* ArtistsApi - object-oriented interface
* @export
* @class ArtistsApi
* @extends {BaseAPI}
*/
class ArtistsApi extends BaseAPI {
/**
*
* @summary Gets all album artists from a given item, folder, or the entire library.
* @param {ArtistsApiGetAlbumArtistsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ArtistsApi
*/
getAlbumArtists(requestParameters = {}, options) {
return ArtistsApiFp(this.configuration).getAlbumArtists(requestParameters.minCommunityRating, requestParameters.startIndex, requestParameters.limit, requestParameters.searchTerm, requestParameters.parentId, requestParameters.fields, requestParameters.excludeItemTypes, requestParameters.includeItemTypes, requestParameters.filters, requestParameters.isFavorite, requestParameters.mediaTypes, requestParameters.genres, requestParameters.genreIds, requestParameters.officialRatings, requestParameters.tags, requestParameters.years, requestParameters.enableUserData, requestParameters.imageTypeLimit, requestParameters.enableImageTypes, requestParameters.person, requestParameters.personIds, requestParameters.personTypes, requestParameters.studios, requestParameters.studioIds, requestParameters.userId, requestParameters.nameStartsWithOrGreater, requestParameters.nameStartsWith, requestParameters.nameLessThan, requestParameters.sortBy, requestParameters.sortOrder, requestParameters.enableImages, requestParameters.enableTotalRecordCount, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Gets an artist by name.
* @param {ArtistsApiGetArtistByNameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ArtistsApi
*/
getArtistByName(requestParameters, options) {
return ArtistsApiFp(this.configuration).getArtistByName(requestParameters.name, requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Gets all artists from a given item, folder, or the entire library.
* @param {ArtistsApiGetArtistsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ArtistsApi
*/
getArtists(requestParameters = {}, options) {
return ArtistsApiFp(this.configuration).getArtists(requestParameters.minCommunityRating, requestParameters.startIndex, requestParameters.limit, requestParameters.searchTerm, requestParameters.parentId, requestParameters.fields, requestParameters.excludeItemTypes, requestParameters.includeItemTypes, requestParameters.filters, requestParameters.isFavorite, requestParameters.mediaTypes, requestParameters.genres, requestParameters.genreIds, requestParameters.officialRatings, requestParameters.tags, requestParameters.years, requestParameters.enableUserData, requestParameters.imageTypeLimit, requestParameters.enableImageTypes, requestParameters.person, requestParameters.personIds, requestParameters.personTypes, requestParameters.studios, requestParameters.studioIds, requestParameters.userId, requestParameters.nameStartsWithOrGreater, requestParameters.nameStartsWith, requestParameters.nameLessThan, requestParameters.sortBy, requestParameters.sortOrder, requestParameters.enableImages, requestParameters.enableTotalRecordCount, options).then((request) => request(this.axios, this.basePath));
}
}
export { ArtistsApi, ArtistsApiAxiosParamCreator, ArtistsApiFactory, ArtistsApiFp };