add jellyfin api
This commit is contained in:
55407
jellyfin-openapi-stable.json
Normal file
55407
jellyfin-openapi-stable.json
Normal file
File diff suppressed because it is too large
Load Diff
4
jellyfin/.gitignore
vendored
Normal file
4
jellyfin/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
||||
dist
|
23
jellyfin/.openapi-generator-ignore
Normal file
23
jellyfin/.openapi-generator-ignore
Normal file
@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
441
jellyfin/.openapi-generator/FILES
Normal file
441
jellyfin/.openapi-generator/FILES
Normal file
@ -0,0 +1,441 @@
|
||||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
api.ts
|
||||
api/activityLogApi.ts
|
||||
api/apiKeyApi.ts
|
||||
api/apis.ts
|
||||
api/artistsApi.ts
|
||||
api/audioApi.ts
|
||||
api/brandingApi.ts
|
||||
api/channelsApi.ts
|
||||
api/clientLogApi.ts
|
||||
api/collectionApi.ts
|
||||
api/configurationApi.ts
|
||||
api/dashboardApi.ts
|
||||
api/devicesApi.ts
|
||||
api/displayPreferencesApi.ts
|
||||
api/dlnaApi.ts
|
||||
api/dlnaServerApi.ts
|
||||
api/dynamicHlsApi.ts
|
||||
api/environmentApi.ts
|
||||
api/filterApi.ts
|
||||
api/genresApi.ts
|
||||
api/hlsSegmentApi.ts
|
||||
api/imageApi.ts
|
||||
api/imageByNameApi.ts
|
||||
api/instantMixApi.ts
|
||||
api/itemLookupApi.ts
|
||||
api/itemRefreshApi.ts
|
||||
api/itemUpdateApi.ts
|
||||
api/itemsApi.ts
|
||||
api/libraryApi.ts
|
||||
api/libraryStructureApi.ts
|
||||
api/liveTvApi.ts
|
||||
api/localizationApi.ts
|
||||
api/mediaInfoApi.ts
|
||||
api/moviesApi.ts
|
||||
api/musicGenresApi.ts
|
||||
api/notificationsApi.ts
|
||||
api/packageApi.ts
|
||||
api/personsApi.ts
|
||||
api/playlistsApi.ts
|
||||
api/playstateApi.ts
|
||||
api/pluginsApi.ts
|
||||
api/quickConnectApi.ts
|
||||
api/remoteImageApi.ts
|
||||
api/scheduledTasksApi.ts
|
||||
api/searchApi.ts
|
||||
api/sessionApi.ts
|
||||
api/startupApi.ts
|
||||
api/studiosApi.ts
|
||||
api/subtitleApi.ts
|
||||
api/suggestionsApi.ts
|
||||
api/syncPlayApi.ts
|
||||
api/systemApi.ts
|
||||
api/timeSyncApi.ts
|
||||
api/tmdbApi.ts
|
||||
api/trailersApi.ts
|
||||
api/tvShowsApi.ts
|
||||
api/universalAudioApi.ts
|
||||
api/userApi.ts
|
||||
api/userLibraryApi.ts
|
||||
api/userViewsApi.ts
|
||||
api/videoAttachmentsApi.ts
|
||||
api/videosApi.ts
|
||||
api/yearsApi.ts
|
||||
git_push.sh
|
||||
model/accessSchedule.ts
|
||||
model/activityLogEntry.ts
|
||||
model/activityLogEntryQueryResult.ts
|
||||
model/addListingProviderRequest.ts
|
||||
model/addMediaPathRequest.ts
|
||||
model/addTunerHostRequest.ts
|
||||
model/addVirtualFolderDto.ts
|
||||
model/addVirtualFolderDtoLibraryOptions.ts
|
||||
model/addVirtualFolderRequest.ts
|
||||
model/adminNotificationDto.ts
|
||||
model/albumInfo.ts
|
||||
model/albumInfoRemoteSearchQuery.ts
|
||||
model/allThemeMediaResult.ts
|
||||
model/allThemeMediaResultThemeVideosResult.ts
|
||||
model/applySearchCriteriaRequest.ts
|
||||
model/architecture.ts
|
||||
model/artistInfo.ts
|
||||
model/artistInfoRemoteSearchQuery.ts
|
||||
model/authenticateUserByName.ts
|
||||
model/authenticateUserByNameRequest.ts
|
||||
model/authenticateWithQuickConnectRequest.ts
|
||||
model/authenticationInfo.ts
|
||||
model/authenticationInfoQueryResult.ts
|
||||
model/authenticationResult.ts
|
||||
model/authenticationResultSessionInfo.ts
|
||||
model/authenticationResultUser.ts
|
||||
model/baseItem.ts
|
||||
model/baseItemDto.ts
|
||||
model/baseItemDtoCurrentProgram.ts
|
||||
model/baseItemDtoImageBlurHashes.ts
|
||||
model/baseItemDtoQueryResult.ts
|
||||
model/baseItemDtoUserData.ts
|
||||
model/baseItemKind.ts
|
||||
model/baseItemPerson.ts
|
||||
model/baseItemPersonImageBlurHashes.ts
|
||||
model/bookInfo.ts
|
||||
model/bookInfoRemoteSearchQuery.ts
|
||||
model/boxSetInfo.ts
|
||||
model/boxSetInfoRemoteSearchQuery.ts
|
||||
model/brandingOptions.ts
|
||||
model/bufferRequestDto.ts
|
||||
model/channelFeatures.ts
|
||||
model/channelItemSortField.ts
|
||||
model/channelMappingOptionsDto.ts
|
||||
model/channelMediaContentType.ts
|
||||
model/channelMediaType.ts
|
||||
model/channelType.ts
|
||||
model/chapterInfo.ts
|
||||
model/clientCapabilities.ts
|
||||
model/clientCapabilitiesDeviceProfile.ts
|
||||
model/clientCapabilitiesDto.ts
|
||||
model/clientCapabilitiesDtoDeviceProfile.ts
|
||||
model/clientLogDocumentResponseDto.ts
|
||||
model/codecProfile.ts
|
||||
model/codecType.ts
|
||||
model/collectionCreationResult.ts
|
||||
model/collectionTypeOptions.ts
|
||||
model/configImageTypes.ts
|
||||
model/configurationPageInfo.ts
|
||||
model/containerProfile.ts
|
||||
model/controlResponse.ts
|
||||
model/countryInfo.ts
|
||||
model/createAdminNotificationRequest.ts
|
||||
model/createPlaylistDto.ts
|
||||
model/createPlaylistRequest.ts
|
||||
model/createProfileRequest.ts
|
||||
model/createSeriesTimerRequest.ts
|
||||
model/createTimerRequest.ts
|
||||
model/createUserByName.ts
|
||||
model/createUserByNameRequest.ts
|
||||
model/cultureDto.ts
|
||||
model/dayOfWeek.ts
|
||||
model/dayPattern.ts
|
||||
model/defaultDirectoryBrowserInfoDto.ts
|
||||
model/deviceIdentification.ts
|
||||
model/deviceInfo.ts
|
||||
model/deviceInfoCapabilities.ts
|
||||
model/deviceInfoQueryResult.ts
|
||||
model/deviceOptions.ts
|
||||
model/deviceOptionsDto.ts
|
||||
model/deviceProfile.ts
|
||||
model/deviceProfileIdentification.ts
|
||||
model/deviceProfileInfo.ts
|
||||
model/deviceProfileType.ts
|
||||
model/directPlayProfile.ts
|
||||
model/displayPreferencesDto.ts
|
||||
model/dlnaOptions.ts
|
||||
model/dlnaProfileType.ts
|
||||
model/dynamicDayOfWeek.ts
|
||||
model/embeddedSubtitleOptions.ts
|
||||
model/encodingContext.ts
|
||||
model/encodingOptions.ts
|
||||
model/endPointInfo.ts
|
||||
model/externalIdInfo.ts
|
||||
model/externalIdMediaType.ts
|
||||
model/externalUrl.ts
|
||||
model/fFmpegLocation.ts
|
||||
model/fileSystemEntryInfo.ts
|
||||
model/fileSystemEntryType.ts
|
||||
model/fontFile.ts
|
||||
model/forgotPasswordAction.ts
|
||||
model/forgotPasswordDto.ts
|
||||
model/forgotPasswordPinDto.ts
|
||||
model/forgotPasswordPinRequest.ts
|
||||
model/forgotPasswordRequest.ts
|
||||
model/forgotPasswordResult.ts
|
||||
model/generalCommand.ts
|
||||
model/generalCommandType.ts
|
||||
model/getBookRemoteSearchResultsRequest.ts
|
||||
model/getBoxSetRemoteSearchResultsRequest.ts
|
||||
model/getMovieRemoteSearchResultsRequest.ts
|
||||
model/getMusicAlbumRemoteSearchResultsRequest.ts
|
||||
model/getMusicArtistRemoteSearchResultsRequest.ts
|
||||
model/getMusicVideoRemoteSearchResultsRequest.ts
|
||||
model/getPersonRemoteSearchResultsRequest.ts
|
||||
model/getPostedPlaybackInfoRequest.ts
|
||||
model/getProgramsDto.ts
|
||||
model/getProgramsRequest.ts
|
||||
model/getSeriesRemoteSearchResultsRequest.ts
|
||||
model/getTrailerRemoteSearchResultsRequest.ts
|
||||
model/groupInfoDto.ts
|
||||
model/groupQueueMode.ts
|
||||
model/groupRepeatMode.ts
|
||||
model/groupShuffleMode.ts
|
||||
model/groupStateType.ts
|
||||
model/groupUpdateType.ts
|
||||
model/guideInfo.ts
|
||||
model/hardwareEncodingType.ts
|
||||
model/headerMatchType.ts
|
||||
model/httpHeaderInfo.ts
|
||||
model/iPlugin.ts
|
||||
model/ignoreWaitRequestDto.ts
|
||||
model/imageByNameInfo.ts
|
||||
model/imageFormat.ts
|
||||
model/imageInfo.ts
|
||||
model/imageOption.ts
|
||||
model/imageOrientation.ts
|
||||
model/imageProviderInfo.ts
|
||||
model/imageSavingConvention.ts
|
||||
model/imageType.ts
|
||||
model/installationInfo.ts
|
||||
model/installationInfoPackageInfo.ts
|
||||
model/isoType.ts
|
||||
model/itemCounts.ts
|
||||
model/itemFields.ts
|
||||
model/itemFilter.ts
|
||||
model/joinGroupRequestDto.ts
|
||||
model/keepUntil.ts
|
||||
model/libraryOptionInfoDto.ts
|
||||
model/libraryOptions.ts
|
||||
model/libraryOptionsResultDto.ts
|
||||
model/libraryTypeOptionsDto.ts
|
||||
model/libraryUpdateInfo.ts
|
||||
model/listingsProviderInfo.ts
|
||||
model/liveStreamResponse.ts
|
||||
model/liveStreamResponseMediaSource.ts
|
||||
model/liveTvInfo.ts
|
||||
model/liveTvOptions.ts
|
||||
model/liveTvServiceInfo.ts
|
||||
model/liveTvServiceStatus.ts
|
||||
model/localizationOption.ts
|
||||
model/locationType.ts
|
||||
model/logFile.ts
|
||||
model/logLevel.ts
|
||||
model/mediaAttachment.ts
|
||||
model/mediaEncoderPathDto.ts
|
||||
model/mediaPathDto.ts
|
||||
model/mediaPathDtoPathInfo.ts
|
||||
model/mediaPathInfo.ts
|
||||
model/mediaProtocol.ts
|
||||
model/mediaSourceInfo.ts
|
||||
model/mediaSourceType.ts
|
||||
model/mediaStream.ts
|
||||
model/mediaStreamType.ts
|
||||
model/mediaUpdateInfoDto.ts
|
||||
model/mediaUpdateInfoPathDto.ts
|
||||
model/mediaUrl.ts
|
||||
model/messageCommand.ts
|
||||
model/metadataConfiguration.ts
|
||||
model/metadataEditorInfo.ts
|
||||
model/metadataField.ts
|
||||
model/metadataOptions.ts
|
||||
model/metadataRefreshMode.ts
|
||||
model/models.ts
|
||||
model/movePlaylistItemRequestDto.ts
|
||||
model/movieInfo.ts
|
||||
model/movieInfoRemoteSearchQuery.ts
|
||||
model/musicVideoInfo.ts
|
||||
model/musicVideoInfoRemoteSearchQuery.ts
|
||||
model/nameGuidPair.ts
|
||||
model/nameIdPair.ts
|
||||
model/nameValuePair.ts
|
||||
model/networkConfiguration.ts
|
||||
model/newGroupRequestDto.ts
|
||||
model/nextItemRequestDto.ts
|
||||
model/notificationDto.ts
|
||||
model/notificationLevel.ts
|
||||
model/notificationOption.ts
|
||||
model/notificationOptions.ts
|
||||
model/notificationResultDto.ts
|
||||
model/notificationTypeInfo.ts
|
||||
model/notificationsSummaryDto.ts
|
||||
model/objectGroupUpdate.ts
|
||||
model/openLiveStreamDto.ts
|
||||
model/openLiveStreamRequest.ts
|
||||
model/packageInfo.ts
|
||||
model/parentalRating.ts
|
||||
model/pathSubstitution.ts
|
||||
model/personLookupInfo.ts
|
||||
model/personLookupInfoRemoteSearchQuery.ts
|
||||
model/pinRedeemResult.ts
|
||||
model/pingRequestDto.ts
|
||||
model/playAccess.ts
|
||||
model/playCommand.ts
|
||||
model/playMethod.ts
|
||||
model/playRequest.ts
|
||||
model/playRequestDto.ts
|
||||
model/playbackErrorCode.ts
|
||||
model/playbackInfoDto.ts
|
||||
model/playbackInfoResponse.ts
|
||||
model/playbackProgressInfo.ts
|
||||
model/playbackProgressInfoItem.ts
|
||||
model/playbackStartInfo.ts
|
||||
model/playbackStopInfo.ts
|
||||
model/playerStateInfo.ts
|
||||
model/playlistCreationResult.ts
|
||||
model/playstateCommand.ts
|
||||
model/playstateRequest.ts
|
||||
model/pluginInfo.ts
|
||||
model/pluginStatus.ts
|
||||
model/postFullCapabilitiesRequest.ts
|
||||
model/postUpdatedMediaRequest.ts
|
||||
model/previousItemRequestDto.ts
|
||||
model/problemDetails.ts
|
||||
model/profileCondition.ts
|
||||
model/profileConditionType.ts
|
||||
model/profileConditionValue.ts
|
||||
model/programAudio.ts
|
||||
model/publicSystemInfo.ts
|
||||
model/queryFilters.ts
|
||||
model/queryFiltersLegacy.ts
|
||||
model/queueItem.ts
|
||||
model/queueRequestDto.ts
|
||||
model/quickConnectDto.ts
|
||||
model/quickConnectResult.ts
|
||||
model/ratingType.ts
|
||||
model/readyRequestDto.ts
|
||||
model/recommendationDto.ts
|
||||
model/recommendationType.ts
|
||||
model/recordingStatus.ts
|
||||
model/remoteImageInfo.ts
|
||||
model/remoteImageResult.ts
|
||||
model/remoteSearchResult.ts
|
||||
model/remoteSubtitleInfo.ts
|
||||
model/removeFromPlaylistRequestDto.ts
|
||||
model/repeatMode.ts
|
||||
model/reportPlaybackProgressRequest.ts
|
||||
model/reportPlaybackStartRequest.ts
|
||||
model/reportPlaybackStoppedRequest.ts
|
||||
model/repositoryInfo.ts
|
||||
model/responseProfile.ts
|
||||
model/scrollDirection.ts
|
||||
model/searchHint.ts
|
||||
model/searchHintResult.ts
|
||||
model/seekRequestDto.ts
|
||||
model/sendCommand.ts
|
||||
model/sendCommandType.ts
|
||||
model/sendFullGeneralCommandRequest.ts
|
||||
model/sendMessageCommandRequest.ts
|
||||
model/sendToUserType.ts
|
||||
model/seriesInfo.ts
|
||||
model/seriesInfoRemoteSearchQuery.ts
|
||||
model/seriesStatus.ts
|
||||
model/seriesTimerInfoDto.ts
|
||||
model/seriesTimerInfoDtoQueryResult.ts
|
||||
model/serverConfiguration.ts
|
||||
model/serverDiscoveryInfo.ts
|
||||
model/sessionInfo.ts
|
||||
model/sessionInfoFullNowPlayingItem.ts
|
||||
model/sessionInfoNowPlayingItem.ts
|
||||
model/sessionMessageType.ts
|
||||
model/sessionUserInfo.ts
|
||||
model/setChannelMappingDto.ts
|
||||
model/setChannelMappingRequest.ts
|
||||
model/setPlaylistItemRequestDto.ts
|
||||
model/setRemoteAccessRequest.ts
|
||||
model/setRepeatModeRequestDto.ts
|
||||
model/setShuffleModeRequestDto.ts
|
||||
model/songInfo.ts
|
||||
model/sortOrder.ts
|
||||
model/specialViewOptionDto.ts
|
||||
model/startupConfigurationDto.ts
|
||||
model/startupRemoteAccessDto.ts
|
||||
model/startupUserDto.ts
|
||||
model/subtitleDeliveryMethod.ts
|
||||
model/subtitleOptions.ts
|
||||
model/subtitlePlaybackMode.ts
|
||||
model/subtitleProfile.ts
|
||||
model/syncPlayBufferingRequest.ts
|
||||
model/syncPlayCreateGroupRequest.ts
|
||||
model/syncPlayJoinGroupRequest.ts
|
||||
model/syncPlayMovePlaylistItemRequest.ts
|
||||
model/syncPlayNextItemRequest.ts
|
||||
model/syncPlayPingRequest.ts
|
||||
model/syncPlayPreviousItemRequest.ts
|
||||
model/syncPlayQueueRequest.ts
|
||||
model/syncPlayReadyRequest.ts
|
||||
model/syncPlayRemoveFromPlaylistRequest.ts
|
||||
model/syncPlaySeekRequest.ts
|
||||
model/syncPlaySetIgnoreWaitRequest.ts
|
||||
model/syncPlaySetNewQueueRequest.ts
|
||||
model/syncPlaySetPlaylistItemRequest.ts
|
||||
model/syncPlaySetRepeatModeRequest.ts
|
||||
model/syncPlaySetShuffleModeRequest.ts
|
||||
model/syncPlayUserAccessType.ts
|
||||
model/systemInfo.ts
|
||||
model/taskCompletionStatus.ts
|
||||
model/taskInfo.ts
|
||||
model/taskInfoLastExecutionResult.ts
|
||||
model/taskResult.ts
|
||||
model/taskState.ts
|
||||
model/taskTriggerInfo.ts
|
||||
model/themeMediaResult.ts
|
||||
model/timerEventInfo.ts
|
||||
model/timerInfoDto.ts
|
||||
model/timerInfoDtoProgramInfo.ts
|
||||
model/timerInfoDtoQueryResult.ts
|
||||
model/trailerInfo.ts
|
||||
model/trailerInfoRemoteSearchQuery.ts
|
||||
model/transcodeReason.ts
|
||||
model/transcodeSeekInfo.ts
|
||||
model/transcodingInfo.ts
|
||||
model/transcodingProfile.ts
|
||||
model/transportStreamTimestamp.ts
|
||||
model/tunerChannelMapping.ts
|
||||
model/tunerHostInfo.ts
|
||||
model/typeOptions.ts
|
||||
model/unratedItem.ts
|
||||
model/updateConfigurationRequest.ts
|
||||
model/updateDeviceOptionsRequest.ts
|
||||
model/updateDisplayPreferencesRequest.ts
|
||||
model/updateInitialConfigurationRequest.ts
|
||||
model/updateItemRequest.ts
|
||||
model/updateLibraryOptionsDto.ts
|
||||
model/updateLibraryOptionsRequest.ts
|
||||
model/updateMediaEncoderPathRequest.ts
|
||||
model/updateMediaPathRequest.ts
|
||||
model/updateMediaPathRequestDto.ts
|
||||
model/updateMediaPathRequestDtoPathInfo.ts
|
||||
model/updateStartupUserRequest.ts
|
||||
model/updateUserConfigurationRequest.ts
|
||||
model/updateUserEasyPassword.ts
|
||||
model/updateUserEasyPasswordRequest.ts
|
||||
model/updateUserPassword.ts
|
||||
model/updateUserPasswordRequest.ts
|
||||
model/updateUserPolicyRequest.ts
|
||||
model/updateUserRequest.ts
|
||||
model/uploadSubtitleDto.ts
|
||||
model/uploadSubtitleRequest.ts
|
||||
model/userConfiguration.ts
|
||||
model/userDto.ts
|
||||
model/userDtoConfiguration.ts
|
||||
model/userDtoPolicy.ts
|
||||
model/userItemDataDto.ts
|
||||
model/userPolicy.ts
|
||||
model/utcTimeResponse.ts
|
||||
model/validatePathDto.ts
|
||||
model/validatePathRequest.ts
|
||||
model/versionInfo.ts
|
||||
model/video3DFormat.ts
|
||||
model/videoType.ts
|
||||
model/virtualFolderInfo.ts
|
||||
model/wakeOnLanInfo.ts
|
||||
model/xbmcMetadataOptions.ts
|
||||
model/xmlAttribute.ts
|
1
jellyfin/.openapi-generator/VERSION
Normal file
1
jellyfin/.openapi-generator/VERSION
Normal file
@ -0,0 +1 @@
|
||||
6.5.0
|
3
jellyfin/api.ts
Normal file
3
jellyfin/api.ts
Normal file
@ -0,0 +1,3 @@
|
||||
// This is the entrypoint for the package
|
||||
export * as JellyfinAPI from './api/apis';
|
||||
export * from './model/models';
|
177
jellyfin/api/activityLogApi.ts
Normal file
177
jellyfin/api/activityLogApi.ts
Normal file
@ -0,0 +1,177 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ActivityLogEntryQueryResult } from '../model/activityLogEntryQueryResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ActivityLogApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ActivityLogApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ActivityLogApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ActivityLogApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets activity log entries.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param minDate Optional. The minimum date. Format = ISO.
|
||||
* @param hasUserId Optional. Filter log entries if it has user id, or not.
|
||||
*/
|
||||
public async getLogEntries (startIndex?: number, limit?: number, minDate?: Date, hasUserId?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ActivityLogEntryQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/System/ActivityLog/Entries';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (minDate !== undefined) {
|
||||
localVarQueryParameters['minDate'] = ObjectSerializer.serialize(minDate, "Date");
|
||||
}
|
||||
|
||||
if (hasUserId !== undefined) {
|
||||
localVarQueryParameters['hasUserId'] = ObjectSerializer.serialize(hasUserId, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: ActivityLogEntryQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "ActivityLogEntryQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
288
jellyfin/api/apiKeyApi.ts
Normal file
288
jellyfin/api/apiKeyApi.ts
Normal file
@ -0,0 +1,288 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { AuthenticationInfoQueryResult } from '../model/authenticationInfoQueryResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ApiKeyApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ApiKeyApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ApiKeyApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ApiKeyApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Create a new api key.
|
||||
* @param app Name of the app using the authentication key.
|
||||
*/
|
||||
public async createKey (app: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Auth/Keys';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'app' is not null or undefined
|
||||
if (app === null || app === undefined) {
|
||||
throw new Error('Required parameter app was null or undefined when calling createKey.');
|
||||
}
|
||||
|
||||
if (app !== undefined) {
|
||||
localVarQueryParameters['app'] = ObjectSerializer.serialize(app, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get all keys.
|
||||
*/
|
||||
public async getKeys (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AuthenticationInfoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Auth/Keys';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: AuthenticationInfoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "AuthenticationInfoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Remove an api key.
|
||||
* @param key The access token to delete.
|
||||
*/
|
||||
public async revokeKey (key: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Auth/Keys/{key}'
|
||||
.replace('{' + 'key' + '}', encodeURIComponent(String(key)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'key' is not null or undefined
|
||||
if (key === null || key === undefined) {
|
||||
throw new Error('Required parameter key was null or undefined when calling revokeKey.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
134
jellyfin/api/apis.ts
Normal file
134
jellyfin/api/apis.ts
Normal file
@ -0,0 +1,134 @@
|
||||
export * from './activityLogApi';
|
||||
import { ActivityLogApi } from './activityLogApi';
|
||||
export * from './apiKeyApi';
|
||||
import { ApiKeyApi } from './apiKeyApi';
|
||||
export * from './artistsApi';
|
||||
import { ArtistsApi } from './artistsApi';
|
||||
export * from './audioApi';
|
||||
import { AudioApi } from './audioApi';
|
||||
export * from './brandingApi';
|
||||
import { BrandingApi } from './brandingApi';
|
||||
export * from './channelsApi';
|
||||
import { ChannelsApi } from './channelsApi';
|
||||
export * from './clientLogApi';
|
||||
import { ClientLogApi } from './clientLogApi';
|
||||
export * from './collectionApi';
|
||||
import { CollectionApi } from './collectionApi';
|
||||
export * from './configurationApi';
|
||||
import { ConfigurationApi } from './configurationApi';
|
||||
export * from './dashboardApi';
|
||||
import { DashboardApi } from './dashboardApi';
|
||||
export * from './devicesApi';
|
||||
import { DevicesApi } from './devicesApi';
|
||||
export * from './displayPreferencesApi';
|
||||
import { DisplayPreferencesApi } from './displayPreferencesApi';
|
||||
export * from './dlnaApi';
|
||||
import { DlnaApi } from './dlnaApi';
|
||||
export * from './dlnaServerApi';
|
||||
import { DlnaServerApi } from './dlnaServerApi';
|
||||
export * from './dynamicHlsApi';
|
||||
import { DynamicHlsApi } from './dynamicHlsApi';
|
||||
export * from './environmentApi';
|
||||
import { EnvironmentApi } from './environmentApi';
|
||||
export * from './filterApi';
|
||||
import { FilterApi } from './filterApi';
|
||||
export * from './genresApi';
|
||||
import { GenresApi } from './genresApi';
|
||||
export * from './hlsSegmentApi';
|
||||
import { HlsSegmentApi } from './hlsSegmentApi';
|
||||
export * from './imageApi';
|
||||
import { ImageApi } from './imageApi';
|
||||
export * from './imageByNameApi';
|
||||
import { ImageByNameApi } from './imageByNameApi';
|
||||
export * from './instantMixApi';
|
||||
import { InstantMixApi } from './instantMixApi';
|
||||
export * from './itemLookupApi';
|
||||
import { ItemLookupApi } from './itemLookupApi';
|
||||
export * from './itemRefreshApi';
|
||||
import { ItemRefreshApi } from './itemRefreshApi';
|
||||
export * from './itemUpdateApi';
|
||||
import { ItemUpdateApi } from './itemUpdateApi';
|
||||
export * from './itemsApi';
|
||||
import { ItemsApi } from './itemsApi';
|
||||
export * from './libraryApi';
|
||||
import { LibraryApi } from './libraryApi';
|
||||
export * from './libraryStructureApi';
|
||||
import { LibraryStructureApi } from './libraryStructureApi';
|
||||
export * from './liveTvApi';
|
||||
import { LiveTvApi } from './liveTvApi';
|
||||
export * from './localizationApi';
|
||||
import { LocalizationApi } from './localizationApi';
|
||||
export * from './mediaInfoApi';
|
||||
import { MediaInfoApi } from './mediaInfoApi';
|
||||
export * from './moviesApi';
|
||||
import { MoviesApi } from './moviesApi';
|
||||
export * from './musicGenresApi';
|
||||
import { MusicGenresApi } from './musicGenresApi';
|
||||
export * from './notificationsApi';
|
||||
import { NotificationsApi } from './notificationsApi';
|
||||
export * from './packageApi';
|
||||
import { PackageApi } from './packageApi';
|
||||
export * from './personsApi';
|
||||
import { PersonsApi } from './personsApi';
|
||||
export * from './playlistsApi';
|
||||
import { PlaylistsApi } from './playlistsApi';
|
||||
export * from './playstateApi';
|
||||
import { PlaystateApi } from './playstateApi';
|
||||
export * from './pluginsApi';
|
||||
import { PluginsApi } from './pluginsApi';
|
||||
export * from './quickConnectApi';
|
||||
import { QuickConnectApi } from './quickConnectApi';
|
||||
export * from './remoteImageApi';
|
||||
import { RemoteImageApi } from './remoteImageApi';
|
||||
export * from './scheduledTasksApi';
|
||||
import { ScheduledTasksApi } from './scheduledTasksApi';
|
||||
export * from './searchApi';
|
||||
import { SearchApi } from './searchApi';
|
||||
export * from './sessionApi';
|
||||
import { SessionApi } from './sessionApi';
|
||||
export * from './startupApi';
|
||||
import { StartupApi } from './startupApi';
|
||||
export * from './studiosApi';
|
||||
import { StudiosApi } from './studiosApi';
|
||||
export * from './subtitleApi';
|
||||
import { SubtitleApi } from './subtitleApi';
|
||||
export * from './suggestionsApi';
|
||||
import { SuggestionsApi } from './suggestionsApi';
|
||||
export * from './syncPlayApi';
|
||||
import { SyncPlayApi } from './syncPlayApi';
|
||||
export * from './systemApi';
|
||||
import { SystemApi } from './systemApi';
|
||||
export * from './timeSyncApi';
|
||||
import { TimeSyncApi } from './timeSyncApi';
|
||||
export * from './tmdbApi';
|
||||
import { TmdbApi } from './tmdbApi';
|
||||
export * from './trailersApi';
|
||||
import { TrailersApi } from './trailersApi';
|
||||
export * from './tvShowsApi';
|
||||
import { TvShowsApi } from './tvShowsApi';
|
||||
export * from './universalAudioApi';
|
||||
import { UniversalAudioApi } from './universalAudioApi';
|
||||
export * from './userApi';
|
||||
import { UserApi } from './userApi';
|
||||
export * from './userLibraryApi';
|
||||
import { UserLibraryApi } from './userLibraryApi';
|
||||
export * from './userViewsApi';
|
||||
import { UserViewsApi } from './userViewsApi';
|
||||
export * from './videoAttachmentsApi';
|
||||
import { VideoAttachmentsApi } from './videoAttachmentsApi';
|
||||
export * from './videosApi';
|
||||
import { VideosApi } from './videosApi';
|
||||
export * from './yearsApi';
|
||||
import { YearsApi } from './yearsApi';
|
||||
import * as http from 'http';
|
||||
|
||||
export class HttpError extends Error {
|
||||
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
|
||||
super('HTTP request failed');
|
||||
this.name = 'HttpError';
|
||||
}
|
||||
}
|
||||
|
||||
export { RequestFile } from '../model/models';
|
||||
|
||||
export const APIS = [ActivityLogApi, ApiKeyApi, ArtistsApi, AudioApi, BrandingApi, ChannelsApi, ClientLogApi, CollectionApi, ConfigurationApi, DashboardApi, DevicesApi, DisplayPreferencesApi, DlnaApi, DlnaServerApi, DynamicHlsApi, EnvironmentApi, FilterApi, GenresApi, HlsSegmentApi, ImageApi, ImageByNameApi, InstantMixApi, ItemLookupApi, ItemRefreshApi, ItemUpdateApi, ItemsApi, LibraryApi, LibraryStructureApi, LiveTvApi, LocalizationApi, MediaInfoApi, MoviesApi, MusicGenresApi, NotificationsApi, PackageApi, PersonsApi, PlaylistsApi, PlaystateApi, PluginsApi, QuickConnectApi, RemoteImageApi, ScheduledTasksApi, SearchApi, SessionApi, StartupApi, StudiosApi, SubtitleApi, SuggestionsApi, SyncPlayApi, SystemApi, TimeSyncApi, TmdbApi, TrailersApi, TvShowsApi, UniversalAudioApi, UserApi, UserLibraryApi, UserViewsApi, VideoAttachmentsApi, VideosApi, YearsApi];
|
625
jellyfin/api/artistsApi.ts
Normal file
625
jellyfin/api/artistsApi.ts
Normal file
@ -0,0 +1,625 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDto } from '../model/baseItemDto';
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { ItemFilter } from '../model/itemFilter';
|
||||
import { SortOrder } from '../model/sortOrder';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ArtistsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ArtistsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ArtistsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ArtistsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets all album artists from a given item, folder, or the entire library.
|
||||
* @param minCommunityRating Optional filter by minimum community rating.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param searchTerm Optional. Search term.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
|
||||
* @param filters Optional. Specify additional filters to apply.
|
||||
* @param isFavorite Optional filter by items that are marked as favorite, or not.
|
||||
* @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited.
|
||||
* @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.
|
||||
* @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.
|
||||
* @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.
|
||||
* @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.
|
||||
* @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.
|
||||
* @param enableUserData Optional, include user data.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param person Optional. If specified, results will be filtered to include only those containing the specified person.
|
||||
* @param personIds Optional. If specified, results will be filtered to include only those containing the specified person ids.
|
||||
* @param 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 studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.
|
||||
* @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.
|
||||
* @param userId User id.
|
||||
* @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string.
|
||||
* @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string.
|
||||
* @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited.
|
||||
* @param sortOrder Sort Order - Ascending,Descending.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
* @param enableTotalRecordCount Total record count.
|
||||
*/
|
||||
public async getAlbumArtists (minCommunityRating?: number, startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array<ItemFields>, excludeItemTypes?: Array<BaseItemKind>, includeItemTypes?: Array<BaseItemKind>, filters?: Array<ItemFilter>, isFavorite?: boolean, mediaTypes?: Array<string>, genres?: Array<string>, genreIds?: Array<string>, officialRatings?: Array<string>, tags?: Array<string>, years?: Array<number>, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, person?: string, personIds?: Array<string>, personTypes?: Array<string>, studios?: Array<string>, studioIds?: Array<string>, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array<string>, sortOrder?: Array<SortOrder>, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Artists/AlbumArtists';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (minCommunityRating !== undefined) {
|
||||
localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (filters !== undefined) {
|
||||
localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array<ItemFilter>");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
if (mediaTypes !== undefined) {
|
||||
localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (genres !== undefined) {
|
||||
localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array<string>");
|
||||
}
|
||||
|
||||
if (genreIds !== undefined) {
|
||||
localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (officialRatings !== undefined) {
|
||||
localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array<string>");
|
||||
}
|
||||
|
||||
if (tags !== undefined) {
|
||||
localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array<string>");
|
||||
}
|
||||
|
||||
if (years !== undefined) {
|
||||
localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array<number>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (person !== undefined) {
|
||||
localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string");
|
||||
}
|
||||
|
||||
if (personIds !== undefined) {
|
||||
localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (personTypes !== undefined) {
|
||||
localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (studios !== undefined) {
|
||||
localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array<string>");
|
||||
}
|
||||
|
||||
if (studioIds !== undefined) {
|
||||
localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWithOrGreater !== undefined) {
|
||||
localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWith !== undefined) {
|
||||
localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string");
|
||||
}
|
||||
|
||||
if (nameLessThan !== undefined) {
|
||||
localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array<string>");
|
||||
}
|
||||
|
||||
if (sortOrder !== undefined) {
|
||||
localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array<SortOrder>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets an artist by name.
|
||||
* @param name Studio name.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
*/
|
||||
public async getArtistByName (name: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/Artists/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getArtistByName.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets all artists from a given item, folder, or the entire library.
|
||||
* @param minCommunityRating Optional filter by minimum community rating.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param searchTerm Optional. Search term.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
|
||||
* @param filters Optional. Specify additional filters to apply.
|
||||
* @param isFavorite Optional filter by items that are marked as favorite, or not.
|
||||
* @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited.
|
||||
* @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.
|
||||
* @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.
|
||||
* @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.
|
||||
* @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.
|
||||
* @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.
|
||||
* @param enableUserData Optional, include user data.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param person Optional. If specified, results will be filtered to include only those containing the specified person.
|
||||
* @param personIds Optional. If specified, results will be filtered to include only those containing the specified person ids.
|
||||
* @param 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 studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.
|
||||
* @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.
|
||||
* @param userId User id.
|
||||
* @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string.
|
||||
* @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string.
|
||||
* @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited.
|
||||
* @param sortOrder Sort Order - Ascending,Descending.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
* @param enableTotalRecordCount Total record count.
|
||||
*/
|
||||
public async getArtists (minCommunityRating?: number, startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array<ItemFields>, excludeItemTypes?: Array<BaseItemKind>, includeItemTypes?: Array<BaseItemKind>, filters?: Array<ItemFilter>, isFavorite?: boolean, mediaTypes?: Array<string>, genres?: Array<string>, genreIds?: Array<string>, officialRatings?: Array<string>, tags?: Array<string>, years?: Array<number>, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, person?: string, personIds?: Array<string>, personTypes?: Array<string>, studios?: Array<string>, studioIds?: Array<string>, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array<string>, sortOrder?: Array<SortOrder>, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Artists';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (minCommunityRating !== undefined) {
|
||||
localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (filters !== undefined) {
|
||||
localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array<ItemFilter>");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
if (mediaTypes !== undefined) {
|
||||
localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (genres !== undefined) {
|
||||
localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array<string>");
|
||||
}
|
||||
|
||||
if (genreIds !== undefined) {
|
||||
localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (officialRatings !== undefined) {
|
||||
localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array<string>");
|
||||
}
|
||||
|
||||
if (tags !== undefined) {
|
||||
localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array<string>");
|
||||
}
|
||||
|
||||
if (years !== undefined) {
|
||||
localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array<number>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (person !== undefined) {
|
||||
localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string");
|
||||
}
|
||||
|
||||
if (personIds !== undefined) {
|
||||
localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (personTypes !== undefined) {
|
||||
localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (studios !== undefined) {
|
||||
localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array<string>");
|
||||
}
|
||||
|
||||
if (studioIds !== undefined) {
|
||||
localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWithOrGreater !== undefined) {
|
||||
localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWith !== undefined) {
|
||||
localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string");
|
||||
}
|
||||
|
||||
if (nameLessThan !== undefined) {
|
||||
localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array<string>");
|
||||
}
|
||||
|
||||
if (sortOrder !== undefined) {
|
||||
localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array<SortOrder>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1333
jellyfin/api/audioApi.ts
Normal file
1333
jellyfin/api/audioApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
278
jellyfin/api/brandingApi.ts
Normal file
278
jellyfin/api/brandingApi.ts
Normal file
@ -0,0 +1,278 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BrandingOptions } from '../model/brandingOptions';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum BrandingApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class BrandingApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: BrandingApiApiKeys, value: string) {
|
||||
(this.authentications as any)[BrandingApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets branding css.
|
||||
*/
|
||||
public async getBrandingCss (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> {
|
||||
const localVarPath = this.basePath + '/Branding/Css';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['text/css', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "string");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets branding css.
|
||||
*/
|
||||
public async getBrandingCss2 (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> {
|
||||
const localVarPath = this.basePath + '/Branding/Css.css';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['text/css', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "string");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets branding configuration.
|
||||
*/
|
||||
public async getBrandingOptions (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BrandingOptions; }> {
|
||||
const localVarPath = this.basePath + '/Branding/Configuration';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BrandingOptions; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BrandingOptions");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
535
jellyfin/api/channelsApi.ts
Normal file
535
jellyfin/api/channelsApi.ts
Normal file
@ -0,0 +1,535 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { ChannelFeatures } from '../model/channelFeatures';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { ItemFilter } from '../model/itemFilter';
|
||||
import { SortOrder } from '../model/sortOrder';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ChannelsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ChannelsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ChannelsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ChannelsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get all channel features.
|
||||
*/
|
||||
public async getAllChannelFeatures (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ChannelFeatures>; }> {
|
||||
const localVarPath = this.basePath + '/Channels/Features';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ChannelFeatures>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ChannelFeatures>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get channel features.
|
||||
* @param channelId Channel id.
|
||||
*/
|
||||
public async getChannelFeatures (channelId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ChannelFeatures; }> {
|
||||
const localVarPath = this.basePath + '/Channels/{channelId}/Features'
|
||||
.replace('{' + 'channelId' + '}', encodeURIComponent(String(channelId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'channelId' is not null or undefined
|
||||
if (channelId === null || channelId === undefined) {
|
||||
throw new Error('Required parameter channelId was null or undefined when calling getChannelFeatures.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: ChannelFeatures; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "ChannelFeatures");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get channel items.
|
||||
* @param channelId Channel Id.
|
||||
* @param folderId Optional. Folder Id.
|
||||
* @param userId Optional. User Id.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param sortOrder Optional. Sort Order - Ascending,Descending.
|
||||
* @param filters Optional. Specify additional filters to apply.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
*/
|
||||
public async getChannelItems (channelId: string, folderId?: string, userId?: string, startIndex?: number, limit?: number, sortOrder?: Array<SortOrder>, filters?: Array<ItemFilter>, sortBy?: Array<string>, fields?: Array<ItemFields>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Channels/{channelId}/Items'
|
||||
.replace('{' + 'channelId' + '}', encodeURIComponent(String(channelId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'channelId' is not null or undefined
|
||||
if (channelId === null || channelId === undefined) {
|
||||
throw new Error('Required parameter channelId was null or undefined when calling getChannelItems.');
|
||||
}
|
||||
|
||||
if (folderId !== undefined) {
|
||||
localVarQueryParameters['folderId'] = ObjectSerializer.serialize(folderId, "string");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (sortOrder !== undefined) {
|
||||
localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array<SortOrder>");
|
||||
}
|
||||
|
||||
if (filters !== undefined) {
|
||||
localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array<ItemFilter>");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array<string>");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets available channels.
|
||||
* @param userId User Id to filter by. Use System.Guid.Empty to not filter by user.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param supportsLatestItems Optional. Filter by channels that support getting latest items.
|
||||
* @param supportsMediaDeletion Optional. Filter by channels that support media deletion.
|
||||
* @param isFavorite Optional. Filter by channels that are favorite.
|
||||
*/
|
||||
public async getChannels (userId?: string, startIndex?: number, limit?: number, supportsLatestItems?: boolean, supportsMediaDeletion?: boolean, isFavorite?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Channels';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (supportsLatestItems !== undefined) {
|
||||
localVarQueryParameters['supportsLatestItems'] = ObjectSerializer.serialize(supportsLatestItems, "boolean");
|
||||
}
|
||||
|
||||
if (supportsMediaDeletion !== undefined) {
|
||||
localVarQueryParameters['supportsMediaDeletion'] = ObjectSerializer.serialize(supportsMediaDeletion, "boolean");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets latest channel items.
|
||||
* @param userId Optional. User Id.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param filters Optional. Specify additional filters to apply.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param channelIds Optional. Specify one or more channel id\'s, comma delimited.
|
||||
*/
|
||||
public async getLatestChannelItems (userId?: string, startIndex?: number, limit?: number, filters?: Array<ItemFilter>, fields?: Array<ItemFields>, channelIds?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Channels/Items/Latest';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (filters !== undefined) {
|
||||
localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array<ItemFilter>");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (channelIds !== undefined) {
|
||||
localVarQueryParameters['channelIds'] = ObjectSerializer.serialize(channelIds, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
160
jellyfin/api/clientLogApi.ts
Normal file
160
jellyfin/api/clientLogApi.ts
Normal file
@ -0,0 +1,160 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ClientLogDocumentResponseDto } from '../model/clientLogDocumentResponseDto';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ClientLogApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ClientLogApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ClientLogApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ClientLogApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Upload a document.
|
||||
* @param body
|
||||
*/
|
||||
public async logFile (body?: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ClientLogDocumentResponseDto; }> {
|
||||
const localVarPath = this.basePath + '/ClientLog/Document';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "RequestFile")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: ClientLogDocumentResponseDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "ClientLogDocumentResponseDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
325
jellyfin/api/collectionApi.ts
Normal file
325
jellyfin/api/collectionApi.ts
Normal file
@ -0,0 +1,325 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CollectionCreationResult } from '../model/collectionCreationResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum CollectionApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class CollectionApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: CollectionApiApiKeys, value: string) {
|
||||
(this.authentications as any)[CollectionApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Adds items to a collection.
|
||||
* @param collectionId The collection id.
|
||||
* @param ids Item ids, comma delimited.
|
||||
*/
|
||||
public async addToCollection (collectionId: string, ids: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Collections/{collectionId}/Items'
|
||||
.replace('{' + 'collectionId' + '}', encodeURIComponent(String(collectionId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'collectionId' is not null or undefined
|
||||
if (collectionId === null || collectionId === undefined) {
|
||||
throw new Error('Required parameter collectionId was null or undefined when calling addToCollection.');
|
||||
}
|
||||
|
||||
// verify required parameter 'ids' is not null or undefined
|
||||
if (ids === null || ids === undefined) {
|
||||
throw new Error('Required parameter ids was null or undefined when calling addToCollection.');
|
||||
}
|
||||
|
||||
if (ids !== undefined) {
|
||||
localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates a new collection.
|
||||
* @param name The name of the collection.
|
||||
* @param ids Item Ids to add to the collection.
|
||||
* @param parentId Optional. Create the collection within a specific folder.
|
||||
* @param isLocked Whether or not to lock the new collection.
|
||||
*/
|
||||
public async createCollection (name?: string, ids?: Array<string>, parentId?: string, isLocked?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CollectionCreationResult; }> {
|
||||
const localVarPath = this.basePath + '/Collections';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (ids !== undefined) {
|
||||
localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array<string>");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (isLocked !== undefined) {
|
||||
localVarQueryParameters['isLocked'] = ObjectSerializer.serialize(isLocked, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: CollectionCreationResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "CollectionCreationResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Removes items from a collection.
|
||||
* @param collectionId The collection id.
|
||||
* @param ids Item ids, comma delimited.
|
||||
*/
|
||||
public async removeFromCollection (collectionId: string, ids: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Collections/{collectionId}/Items'
|
||||
.replace('{' + 'collectionId' + '}', encodeURIComponent(String(collectionId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'collectionId' is not null or undefined
|
||||
if (collectionId === null || collectionId === undefined) {
|
||||
throw new Error('Required parameter collectionId was null or undefined when calling removeFromCollection.');
|
||||
}
|
||||
|
||||
// verify required parameter 'ids' is not null or undefined
|
||||
if (ids === null || ids === undefined) {
|
||||
throw new Error('Required parameter ids was null or undefined when calling removeFromCollection.');
|
||||
}
|
||||
|
||||
if (ids !== undefined) {
|
||||
localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
496
jellyfin/api/configurationApi.ts
Normal file
496
jellyfin/api/configurationApi.ts
Normal file
@ -0,0 +1,496 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { MetadataOptions } from '../model/metadataOptions';
|
||||
import { ServerConfiguration } from '../model/serverConfiguration';
|
||||
import { UpdateConfigurationRequest } from '../model/updateConfigurationRequest';
|
||||
import { UpdateMediaEncoderPathRequest } from '../model/updateMediaEncoderPathRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ConfigurationApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ConfigurationApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ConfigurationApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ConfigurationApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets application configuration.
|
||||
*/
|
||||
public async getConfiguration (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ServerConfiguration; }> {
|
||||
const localVarPath = this.basePath + '/System/Configuration';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: ServerConfiguration; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "ServerConfiguration");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a default MetadataOptions object.
|
||||
*/
|
||||
public async getDefaultMetadataOptions (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MetadataOptions; }> {
|
||||
const localVarPath = this.basePath + '/System/Configuration/MetadataOptions/Default';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: MetadataOptions; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "MetadataOptions");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a named configuration.
|
||||
* @param key Configuration key.
|
||||
*/
|
||||
public async getNamedConfiguration (key: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/System/Configuration/{key}'
|
||||
.replace('{' + 'key' + '}', encodeURIComponent(String(key)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'key' is not null or undefined
|
||||
if (key === null || key === undefined) {
|
||||
throw new Error('Required parameter key was null or undefined when calling getNamedConfiguration.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates application configuration.
|
||||
* @param updateConfigurationRequest Configuration.
|
||||
*/
|
||||
public async updateConfiguration (updateConfigurationRequest: UpdateConfigurationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/System/Configuration';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'updateConfigurationRequest' is not null or undefined
|
||||
if (updateConfigurationRequest === null || updateConfigurationRequest === undefined) {
|
||||
throw new Error('Required parameter updateConfigurationRequest was null or undefined when calling updateConfiguration.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateConfigurationRequest, "UpdateConfigurationRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates the path to the media encoder.
|
||||
* @param updateMediaEncoderPathRequest Media encoder path form body.
|
||||
*/
|
||||
public async updateMediaEncoderPath (updateMediaEncoderPathRequest: UpdateMediaEncoderPathRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/System/MediaEncoder/Path';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'updateMediaEncoderPathRequest' is not null or undefined
|
||||
if (updateMediaEncoderPathRequest === null || updateMediaEncoderPathRequest === undefined) {
|
||||
throw new Error('Required parameter updateMediaEncoderPathRequest was null or undefined when calling updateMediaEncoderPath.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateMediaEncoderPathRequest, "UpdateMediaEncoderPathRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates named configuration.
|
||||
* @param key Configuration key.
|
||||
* @param body Configuration.
|
||||
*/
|
||||
public async updateNamedConfiguration (key: string, body: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/System/Configuration/{key}'
|
||||
.replace('{' + 'key' + '}', encodeURIComponent(String(key)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'key' is not null or undefined
|
||||
if (key === null || key === undefined) {
|
||||
throw new Error('Required parameter key was null or undefined when calling updateNamedConfiguration.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updateNamedConfiguration.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "any")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
230
jellyfin/api/dashboardApi.ts
Normal file
230
jellyfin/api/dashboardApi.ts
Normal file
@ -0,0 +1,230 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ConfigurationPageInfo } from '../model/configurationPageInfo';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum DashboardApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class DashboardApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: DashboardApiApiKeys, value: string) {
|
||||
(this.authentications as any)[DashboardApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets the configuration pages.
|
||||
* @param enableInMainMenu Whether to enable in the main menu.
|
||||
*/
|
||||
public async getConfigurationPages (enableInMainMenu?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ConfigurationPageInfo>; }> {
|
||||
const localVarPath = this.basePath + '/web/ConfigurationPages';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (enableInMainMenu !== undefined) {
|
||||
localVarQueryParameters['enableInMainMenu'] = ObjectSerializer.serialize(enableInMainMenu, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ConfigurationPageInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ConfigurationPageInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a dashboard configuration page.
|
||||
* @param name The name of the page.
|
||||
*/
|
||||
public async getDashboardConfigurationPage (name?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/web/ConfigurationPage';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['text/html', 'application/x-javascript', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
469
jellyfin/api/devicesApi.ts
Normal file
469
jellyfin/api/devicesApi.ts
Normal file
@ -0,0 +1,469 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { DeviceInfo } from '../model/deviceInfo';
|
||||
import { DeviceInfoQueryResult } from '../model/deviceInfoQueryResult';
|
||||
import { DeviceOptions } from '../model/deviceOptions';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { UpdateDeviceOptionsRequest } from '../model/updateDeviceOptionsRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum DevicesApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class DevicesApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: DevicesApiApiKeys, value: string) {
|
||||
(this.authentications as any)[DevicesApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Deletes a device.
|
||||
* @param id Device Id.
|
||||
*/
|
||||
public async deleteDevice (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Devices';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling deleteDevice.');
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get info for a device.
|
||||
* @param id Device Id.
|
||||
*/
|
||||
public async getDeviceInfo (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceInfo; }> {
|
||||
const localVarPath = this.basePath + '/Devices/Info';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getDeviceInfo.');
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: DeviceInfo; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "DeviceInfo");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get options for a device.
|
||||
* @param id Device Id.
|
||||
*/
|
||||
public async getDeviceOptions (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceOptions; }> {
|
||||
const localVarPath = this.basePath + '/Devices/Options';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getDeviceOptions.');
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: DeviceOptions; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "DeviceOptions");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get Devices.
|
||||
* @param supportsSync Gets or sets a value indicating whether [supports synchronize].
|
||||
* @param userId Gets or sets the user identifier.
|
||||
*/
|
||||
public async getDevices (supportsSync?: boolean, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceInfoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Devices';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (supportsSync !== undefined) {
|
||||
localVarQueryParameters['supportsSync'] = ObjectSerializer.serialize(supportsSync, "boolean");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: DeviceInfoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "DeviceInfoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Update device options.
|
||||
* @param id Device Id.
|
||||
* @param updateDeviceOptionsRequest Device Options.
|
||||
*/
|
||||
public async updateDeviceOptions (id: string, updateDeviceOptionsRequest: UpdateDeviceOptionsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Devices/Options';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling updateDeviceOptions.');
|
||||
}
|
||||
|
||||
// verify required parameter 'updateDeviceOptionsRequest' is not null or undefined
|
||||
if (updateDeviceOptionsRequest === null || updateDeviceOptionsRequest === undefined) {
|
||||
throw new Error('Required parameter updateDeviceOptionsRequest was null or undefined when calling updateDeviceOptions.');
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateDeviceOptionsRequest, "UpdateDeviceOptionsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
276
jellyfin/api/displayPreferencesApi.ts
Normal file
276
jellyfin/api/displayPreferencesApi.ts
Normal file
@ -0,0 +1,276 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { DisplayPreferencesDto } from '../model/displayPreferencesDto';
|
||||
import { UpdateDisplayPreferencesRequest } from '../model/updateDisplayPreferencesRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum DisplayPreferencesApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class DisplayPreferencesApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: DisplayPreferencesApiApiKeys, value: string) {
|
||||
(this.authentications as any)[DisplayPreferencesApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get Display Preferences.
|
||||
* @param displayPreferencesId Display preferences id.
|
||||
* @param userId User id.
|
||||
* @param client Client.
|
||||
*/
|
||||
public async getDisplayPreferences (displayPreferencesId: string, userId: string, client: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DisplayPreferencesDto; }> {
|
||||
const localVarPath = this.basePath + '/DisplayPreferences/{displayPreferencesId}'
|
||||
.replace('{' + 'displayPreferencesId' + '}', encodeURIComponent(String(displayPreferencesId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'displayPreferencesId' is not null or undefined
|
||||
if (displayPreferencesId === null || displayPreferencesId === undefined) {
|
||||
throw new Error('Required parameter displayPreferencesId was null or undefined when calling getDisplayPreferences.');
|
||||
}
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getDisplayPreferences.');
|
||||
}
|
||||
|
||||
// verify required parameter 'client' is not null or undefined
|
||||
if (client === null || client === undefined) {
|
||||
throw new Error('Required parameter client was null or undefined when calling getDisplayPreferences.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (client !== undefined) {
|
||||
localVarQueryParameters['client'] = ObjectSerializer.serialize(client, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: DisplayPreferencesDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "DisplayPreferencesDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Update Display Preferences.
|
||||
* @param displayPreferencesId Display preferences id.
|
||||
* @param userId User Id.
|
||||
* @param client Client.
|
||||
* @param updateDisplayPreferencesRequest New Display Preferences object.
|
||||
*/
|
||||
public async updateDisplayPreferences (displayPreferencesId: string, userId: string, client: string, updateDisplayPreferencesRequest: UpdateDisplayPreferencesRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/DisplayPreferences/{displayPreferencesId}'
|
||||
.replace('{' + 'displayPreferencesId' + '}', encodeURIComponent(String(displayPreferencesId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'displayPreferencesId' is not null or undefined
|
||||
if (displayPreferencesId === null || displayPreferencesId === undefined) {
|
||||
throw new Error('Required parameter displayPreferencesId was null or undefined when calling updateDisplayPreferences.');
|
||||
}
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling updateDisplayPreferences.');
|
||||
}
|
||||
|
||||
// verify required parameter 'client' is not null or undefined
|
||||
if (client === null || client === undefined) {
|
||||
throw new Error('Required parameter client was null or undefined when calling updateDisplayPreferences.');
|
||||
}
|
||||
|
||||
// verify required parameter 'updateDisplayPreferencesRequest' is not null or undefined
|
||||
if (updateDisplayPreferencesRequest === null || updateDisplayPreferencesRequest === undefined) {
|
||||
throw new Error('Required parameter updateDisplayPreferencesRequest was null or undefined when calling updateDisplayPreferences.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (client !== undefined) {
|
||||
localVarQueryParameters['client'] = ObjectSerializer.serialize(client, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateDisplayPreferencesRequest, "UpdateDisplayPreferencesRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
500
jellyfin/api/dlnaApi.ts
Normal file
500
jellyfin/api/dlnaApi.ts
Normal file
@ -0,0 +1,500 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CreateProfileRequest } from '../model/createProfileRequest';
|
||||
import { DeviceProfile } from '../model/deviceProfile';
|
||||
import { DeviceProfileInfo } from '../model/deviceProfileInfo';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum DlnaApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class DlnaApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: DlnaApiApiKeys, value: string) {
|
||||
(this.authentications as any)[DlnaApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Creates a profile.
|
||||
* @param createProfileRequest Device profile.
|
||||
*/
|
||||
public async createProfile (createProfileRequest?: CreateProfileRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Dlna/Profiles';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(createProfileRequest, "CreateProfileRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Deletes a profile.
|
||||
* @param profileId Profile id.
|
||||
*/
|
||||
public async deleteProfile (profileId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Dlna/Profiles/{profileId}'
|
||||
.replace('{' + 'profileId' + '}', encodeURIComponent(String(profileId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'profileId' is not null or undefined
|
||||
if (profileId === null || profileId === undefined) {
|
||||
throw new Error('Required parameter profileId was null or undefined when calling deleteProfile.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the default profile.
|
||||
*/
|
||||
public async getDefaultProfile (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceProfile; }> {
|
||||
const localVarPath = this.basePath + '/Dlna/Profiles/Default';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: DeviceProfile; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "DeviceProfile");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a single profile.
|
||||
* @param profileId Profile Id.
|
||||
*/
|
||||
public async getProfile (profileId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceProfile; }> {
|
||||
const localVarPath = this.basePath + '/Dlna/Profiles/{profileId}'
|
||||
.replace('{' + 'profileId' + '}', encodeURIComponent(String(profileId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'profileId' is not null or undefined
|
||||
if (profileId === null || profileId === undefined) {
|
||||
throw new Error('Required parameter profileId was null or undefined when calling getProfile.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: DeviceProfile; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "DeviceProfile");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get profile infos.
|
||||
*/
|
||||
public async getProfileInfos (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<DeviceProfileInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Dlna/ProfileInfos';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<DeviceProfileInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<DeviceProfileInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates a profile.
|
||||
* @param profileId Profile id.
|
||||
* @param createProfileRequest Device profile.
|
||||
*/
|
||||
public async updateProfile (profileId: string, createProfileRequest?: CreateProfileRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Dlna/Profiles/{profileId}'
|
||||
.replace('{' + 'profileId' + '}', encodeURIComponent(String(profileId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'profileId' is not null or undefined
|
||||
if (profileId === null || profileId === undefined) {
|
||||
throw new Error('Required parameter profileId was null or undefined when calling updateProfile.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(createProfileRequest, "CreateProfileRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1251
jellyfin/api/dlnaServerApi.ts
Normal file
1251
jellyfin/api/dlnaServerApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
3058
jellyfin/api/dynamicHlsApi.ts
Normal file
3058
jellyfin/api/dynamicHlsApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
521
jellyfin/api/environmentApi.ts
Normal file
521
jellyfin/api/environmentApi.ts
Normal file
@ -0,0 +1,521 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { DefaultDirectoryBrowserInfoDto } from '../model/defaultDirectoryBrowserInfoDto';
|
||||
import { FileSystemEntryInfo } from '../model/fileSystemEntryInfo';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { ValidatePathRequest } from '../model/validatePathRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum EnvironmentApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class EnvironmentApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: EnvironmentApiApiKeys, value: string) {
|
||||
(this.authentications as any)[EnvironmentApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get Default directory browser.
|
||||
*/
|
||||
public async getDefaultDirectoryBrowser (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DefaultDirectoryBrowserInfoDto; }> {
|
||||
const localVarPath = this.basePath + '/Environment/DefaultDirectoryBrowser';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: DefaultDirectoryBrowserInfoDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "DefaultDirectoryBrowserInfoDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the contents of a given directory in the file system.
|
||||
* @param path The path.
|
||||
* @param includeFiles An optional filter to include or exclude files from the results. true/false.
|
||||
* @param includeDirectories An optional filter to include or exclude folders from the results. true/false.
|
||||
*/
|
||||
public async getDirectoryContents (path: string, includeFiles?: boolean, includeDirectories?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<FileSystemEntryInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Environment/DirectoryContents';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'path' is not null or undefined
|
||||
if (path === null || path === undefined) {
|
||||
throw new Error('Required parameter path was null or undefined when calling getDirectoryContents.');
|
||||
}
|
||||
|
||||
if (path !== undefined) {
|
||||
localVarQueryParameters['path'] = ObjectSerializer.serialize(path, "string");
|
||||
}
|
||||
|
||||
if (includeFiles !== undefined) {
|
||||
localVarQueryParameters['includeFiles'] = ObjectSerializer.serialize(includeFiles, "boolean");
|
||||
}
|
||||
|
||||
if (includeDirectories !== undefined) {
|
||||
localVarQueryParameters['includeDirectories'] = ObjectSerializer.serialize(includeDirectories, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<FileSystemEntryInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<FileSystemEntryInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets available drives from the server\'s file system.
|
||||
*/
|
||||
public async getDrives (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<FileSystemEntryInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Environment/Drives';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<FileSystemEntryInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<FileSystemEntryInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets network paths.
|
||||
*/
|
||||
public async getNetworkShares (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<FileSystemEntryInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Environment/NetworkShares';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<FileSystemEntryInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<FileSystemEntryInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the parent path of a given path.
|
||||
* @param path The path.
|
||||
*/
|
||||
public async getParentPath (path: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> {
|
||||
const localVarPath = this.basePath + '/Environment/ParentPath';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'path' is not null or undefined
|
||||
if (path === null || path === undefined) {
|
||||
throw new Error('Required parameter path was null or undefined when calling getParentPath.');
|
||||
}
|
||||
|
||||
if (path !== undefined) {
|
||||
localVarQueryParameters['path'] = ObjectSerializer.serialize(path, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "string");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Validates path.
|
||||
* @param validatePathRequest Validate request object.
|
||||
*/
|
||||
public async validatePath (validatePathRequest: ValidatePathRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Environment/ValidatePath';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'validatePathRequest' is not null or undefined
|
||||
if (validatePathRequest === null || validatePathRequest === undefined) {
|
||||
throw new Error('Required parameter validatePathRequest was null or undefined when calling validatePath.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(validatePathRequest, "ValidatePathRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
294
jellyfin/api/filterApi.ts
Normal file
294
jellyfin/api/filterApi.ts
Normal file
@ -0,0 +1,294 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { QueryFilters } from '../model/queryFilters';
|
||||
import { QueryFiltersLegacy } from '../model/queryFiltersLegacy';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum FilterApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class FilterApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: FilterApiApiKeys, value: string) {
|
||||
(this.authentications as any)[FilterApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets query filters.
|
||||
* @param userId Optional. User id.
|
||||
* @param parentId Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
|
||||
* @param isAiring Optional. Is item airing.
|
||||
* @param isMovie Optional. Is item movie.
|
||||
* @param isSports Optional. Is item sports.
|
||||
* @param isKids Optional. Is item kids.
|
||||
* @param isNews Optional. Is item news.
|
||||
* @param isSeries Optional. Is item series.
|
||||
* @param recursive Optional. Search recursive.
|
||||
*/
|
||||
public async getQueryFilters (userId?: string, parentId?: string, includeItemTypes?: Array<BaseItemKind>, isAiring?: boolean, isMovie?: boolean, isSports?: boolean, isKids?: boolean, isNews?: boolean, isSeries?: boolean, recursive?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QueryFilters; }> {
|
||||
const localVarPath = this.basePath + '/Items/Filters2';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (isAiring !== undefined) {
|
||||
localVarQueryParameters['isAiring'] = ObjectSerializer.serialize(isAiring, "boolean");
|
||||
}
|
||||
|
||||
if (isMovie !== undefined) {
|
||||
localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean");
|
||||
}
|
||||
|
||||
if (isSports !== undefined) {
|
||||
localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean");
|
||||
}
|
||||
|
||||
if (isKids !== undefined) {
|
||||
localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean");
|
||||
}
|
||||
|
||||
if (isNews !== undefined) {
|
||||
localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean");
|
||||
}
|
||||
|
||||
if (isSeries !== undefined) {
|
||||
localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean");
|
||||
}
|
||||
|
||||
if (recursive !== undefined) {
|
||||
localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: QueryFilters; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "QueryFilters");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets legacy query filters.
|
||||
* @param userId Optional. User id.
|
||||
* @param parentId Optional. Parent id.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
|
||||
* @param mediaTypes Optional. Filter by MediaType. Allows multiple, comma delimited.
|
||||
*/
|
||||
public async getQueryFiltersLegacy (userId?: string, parentId?: string, includeItemTypes?: Array<BaseItemKind>, mediaTypes?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QueryFiltersLegacy; }> {
|
||||
const localVarPath = this.basePath + '/Items/Filters';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (mediaTypes !== undefined) {
|
||||
localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: QueryFiltersLegacy; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "QueryFiltersLegacy");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
329
jellyfin/api/genresApi.ts
Normal file
329
jellyfin/api/genresApi.ts
Normal file
@ -0,0 +1,329 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDto } from '../model/baseItemDto';
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { SortOrder } from '../model/sortOrder';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum GenresApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class GenresApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: GenresApiApiKeys, value: string) {
|
||||
(this.authentications as any)[GenresApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets a genre, by name.
|
||||
* @param genreName The genre name.
|
||||
* @param userId The user id.
|
||||
*/
|
||||
public async getGenre (genreName: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/Genres/{genreName}'
|
||||
.replace('{' + 'genreName' + '}', encodeURIComponent(String(genreName)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'genreName' is not null or undefined
|
||||
if (genreName === null || genreName === undefined) {
|
||||
throw new Error('Required parameter genreName was null or undefined when calling getGenre.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets all genres from a given item, folder, or the entire library.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param searchTerm The search term.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited.
|
||||
* @param isFavorite Optional filter by items that are marked as favorite, or not.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param userId User id.
|
||||
* @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string.
|
||||
* @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string.
|
||||
* @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited.
|
||||
* @param sortOrder Sort Order - Ascending,Descending.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
* @param enableTotalRecordCount Optional. Include total record count.
|
||||
*/
|
||||
public async getGenres (startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array<ItemFields>, excludeItemTypes?: Array<BaseItemKind>, includeItemTypes?: Array<BaseItemKind>, isFavorite?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array<string>, sortOrder?: Array<SortOrder>, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Genres';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWithOrGreater !== undefined) {
|
||||
localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWith !== undefined) {
|
||||
localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string");
|
||||
}
|
||||
|
||||
if (nameLessThan !== undefined) {
|
||||
localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array<string>");
|
||||
}
|
||||
|
||||
if (sortOrder !== undefined) {
|
||||
localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array<SortOrder>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
490
jellyfin/api/hlsSegmentApi.ts
Normal file
490
jellyfin/api/hlsSegmentApi.ts
Normal file
@ -0,0 +1,490 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum HlsSegmentApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class HlsSegmentApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: HlsSegmentApiApiKeys, value: string) {
|
||||
(this.authentications as any)[HlsSegmentApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets the specified audio segment for an audio item.
|
||||
* @param itemId The item id.
|
||||
* @param segmentId The segment id.
|
||||
*/
|
||||
public async getHlsAudioSegmentLegacyAac (itemId: string, segmentId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Audio/{itemId}/hls/{segmentId}/stream.aac'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['audio/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getHlsAudioSegmentLegacyAac.');
|
||||
}
|
||||
|
||||
// verify required parameter 'segmentId' is not null or undefined
|
||||
if (segmentId === null || segmentId === undefined) {
|
||||
throw new Error('Required parameter segmentId was null or undefined when calling getHlsAudioSegmentLegacyAac.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the specified audio segment for an audio item.
|
||||
* @param itemId The item id.
|
||||
* @param segmentId The segment id.
|
||||
*/
|
||||
public async getHlsAudioSegmentLegacyMp3 (itemId: string, segmentId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Audio/{itemId}/hls/{segmentId}/stream.mp3'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['audio/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getHlsAudioSegmentLegacyMp3.');
|
||||
}
|
||||
|
||||
// verify required parameter 'segmentId' is not null or undefined
|
||||
if (segmentId === null || segmentId === undefined) {
|
||||
throw new Error('Required parameter segmentId was null or undefined when calling getHlsAudioSegmentLegacyMp3.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a hls video playlist.
|
||||
* @param itemId The video id.
|
||||
* @param playlistId The playlist id.
|
||||
*/
|
||||
public async getHlsPlaylistLegacy (itemId: string, playlistId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{itemId}/hls/{playlistId}/stream.m3u8'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/x-mpegURL'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getHlsPlaylistLegacy.');
|
||||
}
|
||||
|
||||
// verify required parameter 'playlistId' is not null or undefined
|
||||
if (playlistId === null || playlistId === undefined) {
|
||||
throw new Error('Required parameter playlistId was null or undefined when calling getHlsPlaylistLegacy.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a hls video segment.
|
||||
* @param itemId The item id.
|
||||
* @param playlistId The playlist id.
|
||||
* @param segmentId The segment id.
|
||||
* @param segmentContainer The segment container.
|
||||
*/
|
||||
public async getHlsVideoSegmentLegacy (itemId: string, playlistId: string, segmentId: string, segmentContainer: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{itemId}/hls/{playlistId}/{segmentId}.{segmentContainer}'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId)))
|
||||
.replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId)))
|
||||
.replace('{' + 'segmentContainer' + '}', encodeURIComponent(String(segmentContainer)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['video/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getHlsVideoSegmentLegacy.');
|
||||
}
|
||||
|
||||
// verify required parameter 'playlistId' is not null or undefined
|
||||
if (playlistId === null || playlistId === undefined) {
|
||||
throw new Error('Required parameter playlistId was null or undefined when calling getHlsVideoSegmentLegacy.');
|
||||
}
|
||||
|
||||
// verify required parameter 'segmentId' is not null or undefined
|
||||
if (segmentId === null || segmentId === undefined) {
|
||||
throw new Error('Required parameter segmentId was null or undefined when calling getHlsVideoSegmentLegacy.');
|
||||
}
|
||||
|
||||
// verify required parameter 'segmentContainer' is not null or undefined
|
||||
if (segmentContainer === null || segmentContainer === undefined) {
|
||||
throw new Error('Required parameter segmentContainer was null or undefined when calling getHlsVideoSegmentLegacy.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Stops an active encoding.
|
||||
* @param deviceId The device id of the client requesting. Used to stop encoding processes when needed.
|
||||
* @param playSessionId The play session id.
|
||||
*/
|
||||
public async stopEncodingProcess (deviceId: string, playSessionId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Videos/ActiveEncodings';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'deviceId' is not null or undefined
|
||||
if (deviceId === null || deviceId === undefined) {
|
||||
throw new Error('Required parameter deviceId was null or undefined when calling stopEncodingProcess.');
|
||||
}
|
||||
|
||||
// verify required parameter 'playSessionId' is not null or undefined
|
||||
if (playSessionId === null || playSessionId === undefined) {
|
||||
throw new Error('Required parameter playSessionId was null or undefined when calling stopEncodingProcess.');
|
||||
}
|
||||
|
||||
if (deviceId !== undefined) {
|
||||
localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string");
|
||||
}
|
||||
|
||||
if (playSessionId !== undefined) {
|
||||
localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
5746
jellyfin/api/imageApi.ts
Normal file
5746
jellyfin/api/imageApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
516
jellyfin/api/imageByNameApi.ts
Normal file
516
jellyfin/api/imageByNameApi.ts
Normal file
@ -0,0 +1,516 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ImageByNameInfo } from '../model/imageByNameInfo';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ImageByNameApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ImageByNameApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ImageByNameApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ImageByNameApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get General Image.
|
||||
* @param name The name of the image.
|
||||
* @param type Image Type (primary, backdrop, logo, etc).
|
||||
*/
|
||||
public async getGeneralImage (name: string, type: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Images/General/{name}/{type}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
|
||||
.replace('{' + 'type' + '}', encodeURIComponent(String(type)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['image/*', 'application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getGeneralImage.');
|
||||
}
|
||||
|
||||
// verify required parameter 'type' is not null or undefined
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling getGeneralImage.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get all general images.
|
||||
*/
|
||||
public async getGeneralImages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ImageByNameInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Images/General';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ImageByNameInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ImageByNameInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get media info image.
|
||||
* @param theme The theme to get the image from.
|
||||
* @param name The name of the image.
|
||||
*/
|
||||
public async getMediaInfoImage (theme: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Images/MediaInfo/{theme}/{name}'
|
||||
.replace('{' + 'theme' + '}', encodeURIComponent(String(theme)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['image/*', 'application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'theme' is not null or undefined
|
||||
if (theme === null || theme === undefined) {
|
||||
throw new Error('Required parameter theme was null or undefined when calling getMediaInfoImage.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getMediaInfoImage.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get all media info images.
|
||||
*/
|
||||
public async getMediaInfoImages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ImageByNameInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Images/MediaInfo';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ImageByNameInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ImageByNameInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get rating image.
|
||||
* @param theme The theme to get the image from.
|
||||
* @param name The name of the image.
|
||||
*/
|
||||
public async getRatingImage (theme: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Images/Ratings/{theme}/{name}'
|
||||
.replace('{' + 'theme' + '}', encodeURIComponent(String(theme)))
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['image/*', 'application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'theme' is not null or undefined
|
||||
if (theme === null || theme === undefined) {
|
||||
throw new Error('Required parameter theme was null or undefined when calling getRatingImage.');
|
||||
}
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getRatingImage.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get all general images.
|
||||
*/
|
||||
public async getRatingImages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ImageByNameInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Images/Ratings';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ImageByNameInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ImageByNameInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
956
jellyfin/api/instantMixApi.ts
Normal file
956
jellyfin/api/instantMixApi.ts
Normal file
@ -0,0 +1,956 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum InstantMixApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class InstantMixApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: InstantMixApiApiKeys, value: string) {
|
||||
(this.authentications as any)[InstantMixApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given album.
|
||||
* @param id The item id.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromAlbum (id: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Albums/{id}/InstantMix'
|
||||
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstantMixFromAlbum.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given artist.
|
||||
* @param id The item id.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromArtists (id: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Artists/{id}/InstantMix'
|
||||
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstantMixFromArtists.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given artist.
|
||||
* @param id The item id.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromArtists2 (id: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Artists/InstantMix';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstantMixFromArtists2.');
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given item.
|
||||
* @param id The item id.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromItem (id: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Items/{id}/InstantMix'
|
||||
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstantMixFromItem.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given genre.
|
||||
* @param id The item id.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromMusicGenreById (id: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/MusicGenres/InstantMix';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstantMixFromMusicGenreById.');
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given genre.
|
||||
* @param name The genre name.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromMusicGenreByName (name: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/MusicGenres/{name}/InstantMix'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getInstantMixFromMusicGenreByName.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given playlist.
|
||||
* @param id The item id.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromPlaylist (id: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Playlists/{id}/InstantMix'
|
||||
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstantMixFromPlaylist.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Creates an instant playlist based on a given song.
|
||||
* @param id The item id.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getInstantMixFromSong (id: string, userId?: string, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Songs/{id}/InstantMix'
|
||||
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstantMixFromSong.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
900
jellyfin/api/itemLookupApi.ts
Normal file
900
jellyfin/api/itemLookupApi.ts
Normal file
@ -0,0 +1,900 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ApplySearchCriteriaRequest } from '../model/applySearchCriteriaRequest';
|
||||
import { ExternalIdInfo } from '../model/externalIdInfo';
|
||||
import { GetBookRemoteSearchResultsRequest } from '../model/getBookRemoteSearchResultsRequest';
|
||||
import { GetBoxSetRemoteSearchResultsRequest } from '../model/getBoxSetRemoteSearchResultsRequest';
|
||||
import { GetMovieRemoteSearchResultsRequest } from '../model/getMovieRemoteSearchResultsRequest';
|
||||
import { GetMusicAlbumRemoteSearchResultsRequest } from '../model/getMusicAlbumRemoteSearchResultsRequest';
|
||||
import { GetMusicArtistRemoteSearchResultsRequest } from '../model/getMusicArtistRemoteSearchResultsRequest';
|
||||
import { GetMusicVideoRemoteSearchResultsRequest } from '../model/getMusicVideoRemoteSearchResultsRequest';
|
||||
import { GetPersonRemoteSearchResultsRequest } from '../model/getPersonRemoteSearchResultsRequest';
|
||||
import { GetSeriesRemoteSearchResultsRequest } from '../model/getSeriesRemoteSearchResultsRequest';
|
||||
import { GetTrailerRemoteSearchResultsRequest } from '../model/getTrailerRemoteSearchResultsRequest';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { RemoteSearchResult } from '../model/remoteSearchResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ItemLookupApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ItemLookupApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ItemLookupApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ItemLookupApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Applies search criteria to an item and refreshes metadata.
|
||||
* @param itemId Item id.
|
||||
* @param applySearchCriteriaRequest The remote search result.
|
||||
* @param replaceAllImages Optional. Whether or not to replace all images. Default: True.
|
||||
*/
|
||||
public async applySearchCriteria (itemId: string, applySearchCriteriaRequest: ApplySearchCriteriaRequest, replaceAllImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/Apply/{itemId}'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling applySearchCriteria.');
|
||||
}
|
||||
|
||||
// verify required parameter 'applySearchCriteriaRequest' is not null or undefined
|
||||
if (applySearchCriteriaRequest === null || applySearchCriteriaRequest === undefined) {
|
||||
throw new Error('Required parameter applySearchCriteriaRequest was null or undefined when calling applySearchCriteria.');
|
||||
}
|
||||
|
||||
if (replaceAllImages !== undefined) {
|
||||
localVarQueryParameters['replaceAllImages'] = ObjectSerializer.serialize(replaceAllImages, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(applySearchCriteriaRequest, "ApplySearchCriteriaRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get book remote search.
|
||||
* @param getBookRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getBookRemoteSearchResults (getBookRemoteSearchResultsRequest: GetBookRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/Book';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getBookRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getBookRemoteSearchResultsRequest === null || getBookRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getBookRemoteSearchResultsRequest was null or undefined when calling getBookRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getBookRemoteSearchResultsRequest, "GetBookRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get box set remote search.
|
||||
* @param getBoxSetRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getBoxSetRemoteSearchResults (getBoxSetRemoteSearchResultsRequest: GetBoxSetRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/BoxSet';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getBoxSetRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getBoxSetRemoteSearchResultsRequest === null || getBoxSetRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getBoxSetRemoteSearchResultsRequest was null or undefined when calling getBoxSetRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getBoxSetRemoteSearchResultsRequest, "GetBoxSetRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get the item\'s external id info.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async getExternalIdInfos (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ExternalIdInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/ExternalIdInfos'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getExternalIdInfos.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ExternalIdInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ExternalIdInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get movie remote search.
|
||||
* @param getMovieRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getMovieRemoteSearchResults (getMovieRemoteSearchResultsRequest: GetMovieRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/Movie';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getMovieRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getMovieRemoteSearchResultsRequest === null || getMovieRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getMovieRemoteSearchResultsRequest was null or undefined when calling getMovieRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getMovieRemoteSearchResultsRequest, "GetMovieRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get music album remote search.
|
||||
* @param getMusicAlbumRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getMusicAlbumRemoteSearchResults (getMusicAlbumRemoteSearchResultsRequest: GetMusicAlbumRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/MusicAlbum';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getMusicAlbumRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getMusicAlbumRemoteSearchResultsRequest === null || getMusicAlbumRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getMusicAlbumRemoteSearchResultsRequest was null or undefined when calling getMusicAlbumRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getMusicAlbumRemoteSearchResultsRequest, "GetMusicAlbumRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get music artist remote search.
|
||||
* @param getMusicArtistRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getMusicArtistRemoteSearchResults (getMusicArtistRemoteSearchResultsRequest: GetMusicArtistRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/MusicArtist';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getMusicArtistRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getMusicArtistRemoteSearchResultsRequest === null || getMusicArtistRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getMusicArtistRemoteSearchResultsRequest was null or undefined when calling getMusicArtistRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getMusicArtistRemoteSearchResultsRequest, "GetMusicArtistRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get music video remote search.
|
||||
* @param getMusicVideoRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getMusicVideoRemoteSearchResults (getMusicVideoRemoteSearchResultsRequest: GetMusicVideoRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/MusicVideo';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getMusicVideoRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getMusicVideoRemoteSearchResultsRequest === null || getMusicVideoRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getMusicVideoRemoteSearchResultsRequest was null or undefined when calling getMusicVideoRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getMusicVideoRemoteSearchResultsRequest, "GetMusicVideoRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get person remote search.
|
||||
* @param getPersonRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getPersonRemoteSearchResults (getPersonRemoteSearchResultsRequest: GetPersonRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/Person';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getPersonRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getPersonRemoteSearchResultsRequest === null || getPersonRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getPersonRemoteSearchResultsRequest was null or undefined when calling getPersonRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getPersonRemoteSearchResultsRequest, "GetPersonRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get series remote search.
|
||||
* @param getSeriesRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getSeriesRemoteSearchResults (getSeriesRemoteSearchResultsRequest: GetSeriesRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/Series';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getSeriesRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getSeriesRemoteSearchResultsRequest === null || getSeriesRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getSeriesRemoteSearchResultsRequest was null or undefined when calling getSeriesRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getSeriesRemoteSearchResultsRequest, "GetSeriesRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get trailer remote search.
|
||||
* @param getTrailerRemoteSearchResultsRequest Remote search query.
|
||||
*/
|
||||
public async getTrailerRemoteSearchResults (getTrailerRemoteSearchResultsRequest: GetTrailerRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }> {
|
||||
const localVarPath = this.basePath + '/Items/RemoteSearch/Trailer';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'getTrailerRemoteSearchResultsRequest' is not null or undefined
|
||||
if (getTrailerRemoteSearchResultsRequest === null || getTrailerRemoteSearchResultsRequest === undefined) {
|
||||
throw new Error('Required parameter getTrailerRemoteSearchResultsRequest was null or undefined when calling getTrailerRemoteSearchResults.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getTrailerRemoteSearchResultsRequest, "GetTrailerRemoteSearchResultsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSearchResult>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSearchResult>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
184
jellyfin/api/itemRefreshApi.ts
Normal file
184
jellyfin/api/itemRefreshApi.ts
Normal file
@ -0,0 +1,184 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { MetadataRefreshMode } from '../model/metadataRefreshMode';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ItemRefreshApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ItemRefreshApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ItemRefreshApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ItemRefreshApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Refreshes metadata for an item.
|
||||
* @param itemId Item id.
|
||||
* @param metadataRefreshMode (Optional) Specifies the metadata refresh mode.
|
||||
* @param imageRefreshMode (Optional) Specifies the image refresh mode.
|
||||
* @param replaceAllMetadata (Optional) Determines if metadata should be replaced. Only applicable if mode is FullRefresh.
|
||||
* @param replaceAllImages (Optional) Determines if images should be replaced. Only applicable if mode is FullRefresh.
|
||||
*/
|
||||
public async refreshItem (itemId: string, metadataRefreshMode?: MetadataRefreshMode, imageRefreshMode?: MetadataRefreshMode, replaceAllMetadata?: boolean, replaceAllImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/Refresh'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling refreshItem.');
|
||||
}
|
||||
|
||||
if (metadataRefreshMode !== undefined) {
|
||||
localVarQueryParameters['metadataRefreshMode'] = ObjectSerializer.serialize(metadataRefreshMode, "MetadataRefreshMode");
|
||||
}
|
||||
|
||||
if (imageRefreshMode !== undefined) {
|
||||
localVarQueryParameters['imageRefreshMode'] = ObjectSerializer.serialize(imageRefreshMode, "MetadataRefreshMode");
|
||||
}
|
||||
|
||||
if (replaceAllMetadata !== undefined) {
|
||||
localVarQueryParameters['replaceAllMetadata'] = ObjectSerializer.serialize(replaceAllMetadata, "boolean");
|
||||
}
|
||||
|
||||
if (replaceAllImages !== undefined) {
|
||||
localVarQueryParameters['replaceAllImages'] = ObjectSerializer.serialize(replaceAllImages, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
320
jellyfin/api/itemUpdateApi.ts
Normal file
320
jellyfin/api/itemUpdateApi.ts
Normal file
@ -0,0 +1,320 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { MetadataEditorInfo } from '../model/metadataEditorInfo';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { UpdateItemRequest } from '../model/updateItemRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ItemUpdateApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ItemUpdateApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ItemUpdateApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ItemUpdateApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets metadata editor info for an item.
|
||||
* @param itemId The item id.
|
||||
*/
|
||||
public async getMetadataEditorInfo (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MetadataEditorInfo; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/MetadataEditor'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getMetadataEditorInfo.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: MetadataEditorInfo; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "MetadataEditorInfo");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates an item.
|
||||
* @param itemId The item id.
|
||||
* @param updateItemRequest The new item properties.
|
||||
*/
|
||||
public async updateItem (itemId: string, updateItemRequest: UpdateItemRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling updateItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'updateItemRequest' is not null or undefined
|
||||
if (updateItemRequest === null || updateItemRequest === undefined) {
|
||||
throw new Error('Required parameter updateItemRequest was null or undefined when calling updateItem.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateItemRequest, "UpdateItemRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates an item\'s content type.
|
||||
* @param itemId The item id.
|
||||
* @param contentType The content type of the item.
|
||||
*/
|
||||
public async updateItemContentType (itemId: string, contentType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/ContentType'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling updateItemContentType.');
|
||||
}
|
||||
|
||||
if (contentType !== undefined) {
|
||||
localVarQueryParameters['contentType'] = ObjectSerializer.serialize(contentType, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1224
jellyfin/api/itemsApi.ts
Normal file
1224
jellyfin/api/itemsApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
1995
jellyfin/api/libraryApi.ts
Normal file
1995
jellyfin/api/libraryApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
652
jellyfin/api/libraryStructureApi.ts
Normal file
652
jellyfin/api/libraryStructureApi.ts
Normal file
@ -0,0 +1,652 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { AddMediaPathRequest } from '../model/addMediaPathRequest';
|
||||
import { AddVirtualFolderRequest } from '../model/addVirtualFolderRequest';
|
||||
import { CollectionTypeOptions } from '../model/collectionTypeOptions';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { UpdateLibraryOptionsRequest } from '../model/updateLibraryOptionsRequest';
|
||||
import { UpdateMediaPathRequest } from '../model/updateMediaPathRequest';
|
||||
import { VirtualFolderInfo } from '../model/virtualFolderInfo';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum LibraryStructureApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class LibraryStructureApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: LibraryStructureApiApiKeys, value: string) {
|
||||
(this.authentications as any)[LibraryStructureApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Add a media path to a library.
|
||||
* @param addMediaPathRequest The media path dto.
|
||||
* @param refreshLibrary Whether to refresh the library.
|
||||
*/
|
||||
public async addMediaPath (addMediaPathRequest: AddMediaPathRequest, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders/Paths';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'addMediaPathRequest' is not null or undefined
|
||||
if (addMediaPathRequest === null || addMediaPathRequest === undefined) {
|
||||
throw new Error('Required parameter addMediaPathRequest was null or undefined when calling addMediaPath.');
|
||||
}
|
||||
|
||||
if (refreshLibrary !== undefined) {
|
||||
localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(addMediaPathRequest, "AddMediaPathRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Adds a virtual folder.
|
||||
* @param name The name of the virtual folder.
|
||||
* @param collectionType The type of the collection.
|
||||
* @param paths The paths of the virtual folder.
|
||||
* @param refreshLibrary Whether to refresh the library.
|
||||
* @param addVirtualFolderRequest The library options.
|
||||
*/
|
||||
public async addVirtualFolder (name?: string, collectionType?: CollectionTypeOptions, paths?: Array<string>, refreshLibrary?: boolean, addVirtualFolderRequest?: AddVirtualFolderRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (collectionType !== undefined) {
|
||||
localVarQueryParameters['collectionType'] = ObjectSerializer.serialize(collectionType, "CollectionTypeOptions");
|
||||
}
|
||||
|
||||
if (paths !== undefined) {
|
||||
localVarQueryParameters['paths'] = ObjectSerializer.serialize(paths, "Array<string>");
|
||||
}
|
||||
|
||||
if (refreshLibrary !== undefined) {
|
||||
localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(addVirtualFolderRequest, "AddVirtualFolderRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets all virtual folders.
|
||||
*/
|
||||
public async getVirtualFolders (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<VirtualFolderInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<VirtualFolderInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<VirtualFolderInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Remove a media path.
|
||||
* @param name The name of the library.
|
||||
* @param path The path to remove.
|
||||
* @param refreshLibrary Whether to refresh the library.
|
||||
*/
|
||||
public async removeMediaPath (name?: string, path?: string, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders/Paths';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (path !== undefined) {
|
||||
localVarQueryParameters['path'] = ObjectSerializer.serialize(path, "string");
|
||||
}
|
||||
|
||||
if (refreshLibrary !== undefined) {
|
||||
localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Removes a virtual folder.
|
||||
* @param name The name of the folder.
|
||||
* @param refreshLibrary Whether to refresh the library.
|
||||
*/
|
||||
public async removeVirtualFolder (name?: string, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (refreshLibrary !== undefined) {
|
||||
localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Renames a virtual folder.
|
||||
* @param name The name of the virtual folder.
|
||||
* @param newName The new name.
|
||||
* @param refreshLibrary Whether to refresh the library.
|
||||
*/
|
||||
public async renameVirtualFolder (name?: string, newName?: string, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders/Name';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (newName !== undefined) {
|
||||
localVarQueryParameters['newName'] = ObjectSerializer.serialize(newName, "string");
|
||||
}
|
||||
|
||||
if (refreshLibrary !== undefined) {
|
||||
localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Update library options.
|
||||
* @param updateLibraryOptionsRequest The library name and options.
|
||||
*/
|
||||
public async updateLibraryOptions (updateLibraryOptionsRequest?: UpdateLibraryOptionsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders/LibraryOptions';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateLibraryOptionsRequest, "UpdateLibraryOptionsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates a media path.
|
||||
* @param updateMediaPathRequest The name of the library and path infos.
|
||||
*/
|
||||
public async updateMediaPath (updateMediaPathRequest: UpdateMediaPathRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Library/VirtualFolders/Paths/Update';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'updateMediaPathRequest' is not null or undefined
|
||||
if (updateMediaPathRequest === null || updateMediaPathRequest === undefined) {
|
||||
throw new Error('Required parameter updateMediaPathRequest was null or undefined when calling updateMediaPath.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateMediaPathRequest, "UpdateMediaPathRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
3432
jellyfin/api/liveTvApi.ts
Normal file
3432
jellyfin/api/liveTvApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
355
jellyfin/api/localizationApi.ts
Normal file
355
jellyfin/api/localizationApi.ts
Normal file
@ -0,0 +1,355 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CountryInfo } from '../model/countryInfo';
|
||||
import { CultureDto } from '../model/cultureDto';
|
||||
import { LocalizationOption } from '../model/localizationOption';
|
||||
import { ParentalRating } from '../model/parentalRating';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum LocalizationApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class LocalizationApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: LocalizationApiApiKeys, value: string) {
|
||||
(this.authentications as any)[LocalizationApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets known countries.
|
||||
*/
|
||||
public async getCountries (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<CountryInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Localization/Countries';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<CountryInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<CountryInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets known cultures.
|
||||
*/
|
||||
public async getCultures (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<CultureDto>; }> {
|
||||
const localVarPath = this.basePath + '/Localization/Cultures';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<CultureDto>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<CultureDto>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets localization options.
|
||||
*/
|
||||
public async getLocalizationOptions (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<LocalizationOption>; }> {
|
||||
const localVarPath = this.basePath + '/Localization/Options';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<LocalizationOption>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<LocalizationOption>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets known parental ratings.
|
||||
*/
|
||||
public async getParentalRatings (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ParentalRating>; }> {
|
||||
const localVarPath = this.basePath + '/Localization/ParentalRatings';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ParentalRating>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ParentalRating>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
580
jellyfin/api/mediaInfoApi.ts
Normal file
580
jellyfin/api/mediaInfoApi.ts
Normal file
@ -0,0 +1,580 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GetPostedPlaybackInfoRequest } from '../model/getPostedPlaybackInfoRequest';
|
||||
import { LiveStreamResponse } from '../model/liveStreamResponse';
|
||||
import { OpenLiveStreamRequest } from '../model/openLiveStreamRequest';
|
||||
import { PlaybackInfoResponse } from '../model/playbackInfoResponse';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum MediaInfoApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class MediaInfoApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: MediaInfoApiApiKeys, value: string) {
|
||||
(this.authentications as any)[MediaInfoApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Closes a media source.
|
||||
* @param liveStreamId The livestream id.
|
||||
*/
|
||||
public async closeLiveStream (liveStreamId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/LiveStreams/Close';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'liveStreamId' is not null or undefined
|
||||
if (liveStreamId === null || liveStreamId === undefined) {
|
||||
throw new Error('Required parameter liveStreamId was null or undefined when calling closeLiveStream.');
|
||||
}
|
||||
|
||||
if (liveStreamId !== undefined) {
|
||||
localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Tests the network with a request with the size of the bitrate.
|
||||
* @param size The bitrate. Defaults to 102400.
|
||||
*/
|
||||
public async getBitrateTestBytes (size?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Playback/BitrateTest';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/octet-stream'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameters['size'] = ObjectSerializer.serialize(size, "number");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets live playback media info for an item.
|
||||
* @param itemId The item id.
|
||||
* @param userId The user id.
|
||||
*/
|
||||
public async getPlaybackInfo (itemId: string, userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/PlaybackInfo'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getPlaybackInfo.');
|
||||
}
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getPlaybackInfo.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "PlaybackInfoResponse");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. Query parameters are obsolete.
|
||||
* @summary Gets live playback media info for an item.
|
||||
* @param itemId The item id.
|
||||
* @param userId The user id.
|
||||
* @param maxStreamingBitrate The maximum streaming bitrate.
|
||||
* @param startTimeTicks The start time in ticks.
|
||||
* @param audioStreamIndex The audio stream index.
|
||||
* @param subtitleStreamIndex The subtitle stream index.
|
||||
* @param maxAudioChannels The maximum number of audio channels.
|
||||
* @param mediaSourceId The media source id.
|
||||
* @param liveStreamId The livestream id.
|
||||
* @param autoOpenLiveStream Whether to auto open the livestream.
|
||||
* @param enableDirectPlay Whether to enable direct play. Default: true.
|
||||
* @param enableDirectStream Whether to enable direct stream. Default: true.
|
||||
* @param enableTranscoding Whether to enable transcoding. Default: true.
|
||||
* @param allowVideoStreamCopy Whether to allow to copy the video stream. Default: true.
|
||||
* @param allowAudioStreamCopy Whether to allow to copy the audio stream. Default: true.
|
||||
* @param getPostedPlaybackInfoRequest The playback info.
|
||||
*/
|
||||
public async getPostedPlaybackInfo (itemId: string, userId?: string, maxStreamingBitrate?: number, startTimeTicks?: number, audioStreamIndex?: number, subtitleStreamIndex?: number, maxAudioChannels?: number, mediaSourceId?: string, liveStreamId?: string, autoOpenLiveStream?: boolean, enableDirectPlay?: boolean, enableDirectStream?: boolean, enableTranscoding?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, getPostedPlaybackInfoRequest?: GetPostedPlaybackInfoRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/PlaybackInfo'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getPostedPlaybackInfo.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (maxStreamingBitrate !== undefined) {
|
||||
localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number");
|
||||
}
|
||||
|
||||
if (startTimeTicks !== undefined) {
|
||||
localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number");
|
||||
}
|
||||
|
||||
if (audioStreamIndex !== undefined) {
|
||||
localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (subtitleStreamIndex !== undefined) {
|
||||
localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (maxAudioChannels !== undefined) {
|
||||
localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number");
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (liveStreamId !== undefined) {
|
||||
localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string");
|
||||
}
|
||||
|
||||
if (autoOpenLiveStream !== undefined) {
|
||||
localVarQueryParameters['autoOpenLiveStream'] = ObjectSerializer.serialize(autoOpenLiveStream, "boolean");
|
||||
}
|
||||
|
||||
if (enableDirectPlay !== undefined) {
|
||||
localVarQueryParameters['enableDirectPlay'] = ObjectSerializer.serialize(enableDirectPlay, "boolean");
|
||||
}
|
||||
|
||||
if (enableDirectStream !== undefined) {
|
||||
localVarQueryParameters['enableDirectStream'] = ObjectSerializer.serialize(enableDirectStream, "boolean");
|
||||
}
|
||||
|
||||
if (enableTranscoding !== undefined) {
|
||||
localVarQueryParameters['enableTranscoding'] = ObjectSerializer.serialize(enableTranscoding, "boolean");
|
||||
}
|
||||
|
||||
if (allowVideoStreamCopy !== undefined) {
|
||||
localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean");
|
||||
}
|
||||
|
||||
if (allowAudioStreamCopy !== undefined) {
|
||||
localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(getPostedPlaybackInfoRequest, "GetPostedPlaybackInfoRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "PlaybackInfoResponse");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Opens a media source.
|
||||
* @param openToken The open token.
|
||||
* @param userId The user id.
|
||||
* @param playSessionId The play session id.
|
||||
* @param maxStreamingBitrate The maximum streaming bitrate.
|
||||
* @param startTimeTicks The start time in ticks.
|
||||
* @param audioStreamIndex The audio stream index.
|
||||
* @param subtitleStreamIndex The subtitle stream index.
|
||||
* @param maxAudioChannels The maximum number of audio channels.
|
||||
* @param itemId The item id.
|
||||
* @param enableDirectPlay Whether to enable direct play. Default: true.
|
||||
* @param enableDirectStream Whether to enable direct stream. Default: true.
|
||||
* @param openLiveStreamRequest The open live stream dto.
|
||||
*/
|
||||
public async openLiveStream (openToken?: string, userId?: string, playSessionId?: string, maxStreamingBitrate?: number, startTimeTicks?: number, audioStreamIndex?: number, subtitleStreamIndex?: number, maxAudioChannels?: number, itemId?: string, enableDirectPlay?: boolean, enableDirectStream?: boolean, openLiveStreamRequest?: OpenLiveStreamRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LiveStreamResponse; }> {
|
||||
const localVarPath = this.basePath + '/LiveStreams/Open';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (openToken !== undefined) {
|
||||
localVarQueryParameters['openToken'] = ObjectSerializer.serialize(openToken, "string");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (playSessionId !== undefined) {
|
||||
localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string");
|
||||
}
|
||||
|
||||
if (maxStreamingBitrate !== undefined) {
|
||||
localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number");
|
||||
}
|
||||
|
||||
if (startTimeTicks !== undefined) {
|
||||
localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number");
|
||||
}
|
||||
|
||||
if (audioStreamIndex !== undefined) {
|
||||
localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (subtitleStreamIndex !== undefined) {
|
||||
localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (maxAudioChannels !== undefined) {
|
||||
localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number");
|
||||
}
|
||||
|
||||
if (itemId !== undefined) {
|
||||
localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string");
|
||||
}
|
||||
|
||||
if (enableDirectPlay !== undefined) {
|
||||
localVarQueryParameters['enableDirectPlay'] = ObjectSerializer.serialize(enableDirectPlay, "boolean");
|
||||
}
|
||||
|
||||
if (enableDirectStream !== undefined) {
|
||||
localVarQueryParameters['enableDirectStream'] = ObjectSerializer.serialize(enableDirectStream, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(openLiveStreamRequest, "OpenLiveStreamRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: LiveStreamResponse; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "LiveStreamResponse");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
183
jellyfin/api/moviesApi.ts
Normal file
183
jellyfin/api/moviesApi.ts
Normal file
@ -0,0 +1,183 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { RecommendationDto } from '../model/recommendationDto';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum MoviesApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class MoviesApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: MoviesApiApiKeys, value: string) {
|
||||
(this.authentications as any)[MoviesApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets movie recommendations.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. The fields to return.
|
||||
* @param categoryLimit The max number of categories to return.
|
||||
* @param itemLimit The max number of items to return per category.
|
||||
*/
|
||||
public async getMovieRecommendations (userId?: string, parentId?: string, fields?: Array<ItemFields>, categoryLimit?: number, itemLimit?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RecommendationDto>; }> {
|
||||
const localVarPath = this.basePath + '/Movies/Recommendations';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (categoryLimit !== undefined) {
|
||||
localVarQueryParameters['categoryLimit'] = ObjectSerializer.serialize(categoryLimit, "number");
|
||||
}
|
||||
|
||||
if (itemLimit !== undefined) {
|
||||
localVarQueryParameters['itemLimit'] = ObjectSerializer.serialize(itemLimit, "number");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RecommendationDto>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RecommendationDto>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
329
jellyfin/api/musicGenresApi.ts
Normal file
329
jellyfin/api/musicGenresApi.ts
Normal file
@ -0,0 +1,329 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDto } from '../model/baseItemDto';
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { SortOrder } from '../model/sortOrder';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum MusicGenresApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class MusicGenresApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: MusicGenresApiApiKeys, value: string) {
|
||||
(this.authentications as any)[MusicGenresApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets a music genre, by name.
|
||||
* @param genreName The genre name.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
*/
|
||||
public async getMusicGenre (genreName: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/MusicGenres/{genreName}'
|
||||
.replace('{' + 'genreName' + '}', encodeURIComponent(String(genreName)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'genreName' is not null or undefined
|
||||
if (genreName === null || genreName === undefined) {
|
||||
throw new Error('Required parameter genreName was null or undefined when calling getMusicGenre.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets all music genres from a given item, folder, or the entire library.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param searchTerm The search term.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited.
|
||||
* @param isFavorite Optional filter by items that are marked as favorite, or not.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param userId User id.
|
||||
* @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string.
|
||||
* @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string.
|
||||
* @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited.
|
||||
* @param sortOrder Sort Order - Ascending,Descending.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
* @param enableTotalRecordCount Optional. Include total record count.
|
||||
*/
|
||||
public async getMusicGenres (startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array<ItemFields>, excludeItemTypes?: Array<BaseItemKind>, includeItemTypes?: Array<BaseItemKind>, isFavorite?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array<string>, sortOrder?: Array<SortOrder>, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/MusicGenres';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWithOrGreater !== undefined) {
|
||||
localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWith !== undefined) {
|
||||
localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string");
|
||||
}
|
||||
|
||||
if (nameLessThan !== undefined) {
|
||||
localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array<string>");
|
||||
}
|
||||
|
||||
if (sortOrder !== undefined) {
|
||||
localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array<SortOrder>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
562
jellyfin/api/notificationsApi.ts
Normal file
562
jellyfin/api/notificationsApi.ts
Normal file
@ -0,0 +1,562 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CreateAdminNotificationRequest } from '../model/createAdminNotificationRequest';
|
||||
import { NameIdPair } from '../model/nameIdPair';
|
||||
import { NotificationResultDto } from '../model/notificationResultDto';
|
||||
import { NotificationTypeInfo } from '../model/notificationTypeInfo';
|
||||
import { NotificationsSummaryDto } from '../model/notificationsSummaryDto';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum NotificationsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class NotificationsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: NotificationsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[NotificationsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Sends a notification to all admins.
|
||||
* @param createAdminNotificationRequest The notification request.
|
||||
*/
|
||||
public async createAdminNotification (createAdminNotificationRequest: CreateAdminNotificationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Notifications/Admin';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'createAdminNotificationRequest' is not null or undefined
|
||||
if (createAdminNotificationRequest === null || createAdminNotificationRequest === undefined) {
|
||||
throw new Error('Required parameter createAdminNotificationRequest was null or undefined when calling createAdminNotification.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(createAdminNotificationRequest, "CreateAdminNotificationRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets notification services.
|
||||
*/
|
||||
public async getNotificationServices (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<NameIdPair>; }> {
|
||||
const localVarPath = this.basePath + '/Notifications/Services';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<NameIdPair>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<NameIdPair>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets notification types.
|
||||
*/
|
||||
public async getNotificationTypes (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<NotificationTypeInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Notifications/Types';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<NotificationTypeInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<NotificationTypeInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a user\'s notifications.
|
||||
* @param userId
|
||||
*/
|
||||
public async getNotifications (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NotificationResultDto; }> {
|
||||
const localVarPath = this.basePath + '/Notifications/{userId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getNotifications.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: NotificationResultDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "NotificationResultDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a user\'s notification summary.
|
||||
* @param userId
|
||||
*/
|
||||
public async getNotificationsSummary (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NotificationsSummaryDto; }> {
|
||||
const localVarPath = this.basePath + '/Notifications/{userId}/Summary'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getNotificationsSummary.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: NotificationsSummaryDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "NotificationsSummaryDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Sets notifications as read.
|
||||
* @param userId
|
||||
*/
|
||||
public async setRead (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Notifications/{userId}/Read'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling setRead.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Sets notifications as unread.
|
||||
* @param userId
|
||||
*/
|
||||
public async setUnread (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Notifications/{userId}/Unread'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling setUnread.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
515
jellyfin/api/packageApi.ts
Normal file
515
jellyfin/api/packageApi.ts
Normal file
@ -0,0 +1,515 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { PackageInfo } from '../model/packageInfo';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { RepositoryInfo } from '../model/repositoryInfo';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum PackageApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class PackageApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: PackageApiApiKeys, value: string) {
|
||||
(this.authentications as any)[PackageApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Cancels a package installation.
|
||||
* @param packageId Installation Id.
|
||||
*/
|
||||
public async cancelPackageInstallation (packageId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Packages/Installing/{packageId}'
|
||||
.replace('{' + 'packageId' + '}', encodeURIComponent(String(packageId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'packageId' is not null or undefined
|
||||
if (packageId === null || packageId === undefined) {
|
||||
throw new Error('Required parameter packageId was null or undefined when calling cancelPackageInstallation.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a package by name or assembly GUID.
|
||||
* @param name The name of the package.
|
||||
* @param assemblyGuid The GUID of the associated assembly.
|
||||
*/
|
||||
public async getPackageInfo (name: string, assemblyGuid?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PackageInfo; }> {
|
||||
const localVarPath = this.basePath + '/Packages/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getPackageInfo.');
|
||||
}
|
||||
|
||||
if (assemblyGuid !== undefined) {
|
||||
localVarQueryParameters['assemblyGuid'] = ObjectSerializer.serialize(assemblyGuid, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: PackageInfo; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "PackageInfo");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets available packages.
|
||||
*/
|
||||
public async getPackages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<PackageInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Packages';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<PackageInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<PackageInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets all package repositories.
|
||||
*/
|
||||
public async getRepositories (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RepositoryInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Repositories';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RepositoryInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RepositoryInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Installs a package.
|
||||
* @param name Package name.
|
||||
* @param assemblyGuid GUID of the associated assembly.
|
||||
* @param version Optional version. Defaults to latest version.
|
||||
* @param repositoryUrl Optional. Specify the repository to install from.
|
||||
*/
|
||||
public async installPackage (name: string, assemblyGuid?: string, version?: string, repositoryUrl?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Packages/Installed/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling installPackage.');
|
||||
}
|
||||
|
||||
if (assemblyGuid !== undefined) {
|
||||
localVarQueryParameters['assemblyGuid'] = ObjectSerializer.serialize(assemblyGuid, "string");
|
||||
}
|
||||
|
||||
if (version !== undefined) {
|
||||
localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "string");
|
||||
}
|
||||
|
||||
if (repositoryUrl !== undefined) {
|
||||
localVarQueryParameters['repositoryUrl'] = ObjectSerializer.serialize(repositoryUrl, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Sets the enabled and existing package repositories.
|
||||
* @param repositoryInfo The list of package repositories.
|
||||
*/
|
||||
public async setRepositories (repositoryInfo: Array<RepositoryInfo>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Repositories';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'repositoryInfo' is not null or undefined
|
||||
if (repositoryInfo === null || repositoryInfo === undefined) {
|
||||
throw new Error('Required parameter repositoryInfo was null or undefined when calling setRepositories.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(repositoryInfo, "Array<RepositoryInfo>")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
304
jellyfin/api/personsApi.ts
Normal file
304
jellyfin/api/personsApi.ts
Normal file
@ -0,0 +1,304 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDto } from '../model/baseItemDto';
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { ItemFilter } from '../model/itemFilter';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum PersonsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class PersonsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: PersonsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[PersonsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get person by name.
|
||||
* @param name Person name.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
*/
|
||||
public async getPerson (name: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/Persons/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getPerson.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets all persons.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param searchTerm The search term.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param filters Optional. Specify additional filters to apply.
|
||||
* @param isFavorite Optional filter by items that are marked as favorite, or not. userId is required.
|
||||
* @param enableUserData Optional, include user data.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param excludePersonTypes Optional. If specified results will be filtered to exclude those containing the specified PersonType. Allows multiple, comma-delimited.
|
||||
* @param personTypes Optional. If specified results will be filtered to include only those containing the specified PersonType. Allows multiple, comma-delimited.
|
||||
* @param appearsInItemId Optional. If specified, person results will be filtered on items related to said persons.
|
||||
* @param userId User id.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
*/
|
||||
public async getPersons (limit?: number, searchTerm?: string, fields?: Array<ItemFields>, filters?: Array<ItemFilter>, isFavorite?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, excludePersonTypes?: Array<string>, personTypes?: Array<string>, appearsInItemId?: string, userId?: string, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Persons';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (filters !== undefined) {
|
||||
localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array<ItemFilter>");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (excludePersonTypes !== undefined) {
|
||||
localVarQueryParameters['excludePersonTypes'] = ObjectSerializer.serialize(excludePersonTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (personTypes !== undefined) {
|
||||
localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (appearsInItemId !== undefined) {
|
||||
localVarQueryParameters['appearsInItemId'] = ObjectSerializer.serialize(appearsInItemId, "string");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
521
jellyfin/api/playlistsApi.ts
Normal file
521
jellyfin/api/playlistsApi.ts
Normal file
@ -0,0 +1,521 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { CreatePlaylistRequest } from '../model/createPlaylistRequest';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { PlaylistCreationResult } from '../model/playlistCreationResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum PlaylistsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class PlaylistsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: PlaylistsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[PlaylistsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Adds items to a playlist.
|
||||
* @param playlistId The playlist id.
|
||||
* @param ids Item id, comma delimited.
|
||||
* @param userId The userId.
|
||||
*/
|
||||
public async addToPlaylist (playlistId: string, ids?: Array<string>, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Playlists/{playlistId}/Items'
|
||||
.replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'playlistId' is not null or undefined
|
||||
if (playlistId === null || playlistId === undefined) {
|
||||
throw new Error('Required parameter playlistId was null or undefined when calling addToPlaylist.');
|
||||
}
|
||||
|
||||
if (ids !== undefined) {
|
||||
localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array<string>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. Query parameters are obsolete.
|
||||
* @summary Creates a new playlist.
|
||||
* @param name The playlist name.
|
||||
* @param ids The item ids.
|
||||
* @param userId The user id.
|
||||
* @param mediaType The media type.
|
||||
* @param createPlaylistRequest The create playlist payload.
|
||||
*/
|
||||
public async createPlaylist (name?: string, ids?: Array<string>, userId?: string, mediaType?: string, createPlaylistRequest?: CreatePlaylistRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PlaylistCreationResult; }> {
|
||||
const localVarPath = this.basePath + '/Playlists';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
if (ids !== undefined) {
|
||||
localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array<string>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (mediaType !== undefined) {
|
||||
localVarQueryParameters['mediaType'] = ObjectSerializer.serialize(mediaType, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(createPlaylistRequest, "CreatePlaylistRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: PlaylistCreationResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "PlaylistCreationResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the original items of a playlist.
|
||||
* @param playlistId The playlist id.
|
||||
* @param userId User id.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
*/
|
||||
public async getPlaylistItems (playlistId: string, userId: string, startIndex?: number, limit?: number, fields?: Array<ItemFields>, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Playlists/{playlistId}/Items'
|
||||
.replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'playlistId' is not null or undefined
|
||||
if (playlistId === null || playlistId === undefined) {
|
||||
throw new Error('Required parameter playlistId was null or undefined when calling getPlaylistItems.');
|
||||
}
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getPlaylistItems.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Moves a playlist item.
|
||||
* @param playlistId The playlist id.
|
||||
* @param itemId The item id.
|
||||
* @param newIndex The new index.
|
||||
*/
|
||||
public async moveItem (playlistId: string, itemId: string, newIndex: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Playlists/{playlistId}/Items/{itemId}/Move/{newIndex}'
|
||||
.replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'newIndex' + '}', encodeURIComponent(String(newIndex)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'playlistId' is not null or undefined
|
||||
if (playlistId === null || playlistId === undefined) {
|
||||
throw new Error('Required parameter playlistId was null or undefined when calling moveItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling moveItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'newIndex' is not null or undefined
|
||||
if (newIndex === null || newIndex === undefined) {
|
||||
throw new Error('Required parameter newIndex was null or undefined when calling moveItem.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Removes items from a playlist.
|
||||
* @param playlistId The playlist id.
|
||||
* @param entryIds The item ids, comma delimited.
|
||||
*/
|
||||
public async removeFromPlaylist (playlistId: string, entryIds?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Playlists/{playlistId}/Items'
|
||||
.replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'playlistId' is not null or undefined
|
||||
if (playlistId === null || playlistId === undefined) {
|
||||
throw new Error('Required parameter playlistId was null or undefined when calling removeFromPlaylist.');
|
||||
}
|
||||
|
||||
if (entryIds !== undefined) {
|
||||
localVarQueryParameters['entryIds'] = ObjectSerializer.serialize(entryIds, "Array<string>");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
832
jellyfin/api/playstateApi.ts
Normal file
832
jellyfin/api/playstateApi.ts
Normal file
@ -0,0 +1,832 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { PlayMethod } from '../model/playMethod';
|
||||
import { RepeatMode } from '../model/repeatMode';
|
||||
import { ReportPlaybackProgressRequest } from '../model/reportPlaybackProgressRequest';
|
||||
import { ReportPlaybackStartRequest } from '../model/reportPlaybackStartRequest';
|
||||
import { ReportPlaybackStoppedRequest } from '../model/reportPlaybackStoppedRequest';
|
||||
import { UserItemDataDto } from '../model/userItemDataDto';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum PlaystateApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class PlaystateApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: PlaystateApiApiKeys, value: string) {
|
||||
(this.authentications as any)[PlaystateApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Marks an item as played for user.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
* @param datePlayed Optional. The date the item was played.
|
||||
*/
|
||||
public async markPlayedItem (userId: string, itemId: string, datePlayed?: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/PlayedItems/{itemId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling markPlayedItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling markPlayedItem.');
|
||||
}
|
||||
|
||||
if (datePlayed !== undefined) {
|
||||
localVarQueryParameters['datePlayed'] = ObjectSerializer.serialize(datePlayed, "Date");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "UserItemDataDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Marks an item as unplayed for user.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async markUnplayedItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/PlayedItems/{itemId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling markUnplayedItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling markUnplayedItem.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "UserItemDataDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Reports a user\'s playback progress.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
* @param mediaSourceId The id of the MediaSource.
|
||||
* @param positionTicks Optional. The current position, in ticks. 1 tick = 10000 ms.
|
||||
* @param audioStreamIndex The audio stream index.
|
||||
* @param subtitleStreamIndex The subtitle stream index.
|
||||
* @param volumeLevel Scale of 0-100.
|
||||
* @param playMethod The play method.
|
||||
* @param liveStreamId The live stream id.
|
||||
* @param playSessionId The play session id.
|
||||
* @param repeatMode The repeat mode.
|
||||
* @param isPaused Indicates if the player is paused.
|
||||
* @param isMuted Indicates if the player is muted.
|
||||
*/
|
||||
public async onPlaybackProgress (userId: string, itemId: string, mediaSourceId?: string, positionTicks?: number, audioStreamIndex?: number, subtitleStreamIndex?: number, volumeLevel?: number, playMethod?: PlayMethod, liveStreamId?: string, playSessionId?: string, repeatMode?: RepeatMode, isPaused?: boolean, isMuted?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/PlayingItems/{itemId}/Progress'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling onPlaybackProgress.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling onPlaybackProgress.');
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (positionTicks !== undefined) {
|
||||
localVarQueryParameters['positionTicks'] = ObjectSerializer.serialize(positionTicks, "number");
|
||||
}
|
||||
|
||||
if (audioStreamIndex !== undefined) {
|
||||
localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (subtitleStreamIndex !== undefined) {
|
||||
localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (volumeLevel !== undefined) {
|
||||
localVarQueryParameters['volumeLevel'] = ObjectSerializer.serialize(volumeLevel, "number");
|
||||
}
|
||||
|
||||
if (playMethod !== undefined) {
|
||||
localVarQueryParameters['playMethod'] = ObjectSerializer.serialize(playMethod, "PlayMethod");
|
||||
}
|
||||
|
||||
if (liveStreamId !== undefined) {
|
||||
localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string");
|
||||
}
|
||||
|
||||
if (playSessionId !== undefined) {
|
||||
localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string");
|
||||
}
|
||||
|
||||
if (repeatMode !== undefined) {
|
||||
localVarQueryParameters['repeatMode'] = ObjectSerializer.serialize(repeatMode, "RepeatMode");
|
||||
}
|
||||
|
||||
if (isPaused !== undefined) {
|
||||
localVarQueryParameters['isPaused'] = ObjectSerializer.serialize(isPaused, "boolean");
|
||||
}
|
||||
|
||||
if (isMuted !== undefined) {
|
||||
localVarQueryParameters['isMuted'] = ObjectSerializer.serialize(isMuted, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Reports that a user has begun playing an item.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
* @param mediaSourceId The id of the MediaSource.
|
||||
* @param audioStreamIndex The audio stream index.
|
||||
* @param subtitleStreamIndex The subtitle stream index.
|
||||
* @param playMethod The play method.
|
||||
* @param liveStreamId The live stream id.
|
||||
* @param playSessionId The play session id.
|
||||
* @param canSeek Indicates if the client can seek.
|
||||
*/
|
||||
public async onPlaybackStart (userId: string, itemId: string, mediaSourceId?: string, audioStreamIndex?: number, subtitleStreamIndex?: number, playMethod?: PlayMethod, liveStreamId?: string, playSessionId?: string, canSeek?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/PlayingItems/{itemId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling onPlaybackStart.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling onPlaybackStart.');
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (audioStreamIndex !== undefined) {
|
||||
localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (subtitleStreamIndex !== undefined) {
|
||||
localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number");
|
||||
}
|
||||
|
||||
if (playMethod !== undefined) {
|
||||
localVarQueryParameters['playMethod'] = ObjectSerializer.serialize(playMethod, "PlayMethod");
|
||||
}
|
||||
|
||||
if (liveStreamId !== undefined) {
|
||||
localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string");
|
||||
}
|
||||
|
||||
if (playSessionId !== undefined) {
|
||||
localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string");
|
||||
}
|
||||
|
||||
if (canSeek !== undefined) {
|
||||
localVarQueryParameters['canSeek'] = ObjectSerializer.serialize(canSeek, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Reports that a user has stopped playing an item.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
* @param mediaSourceId The id of the MediaSource.
|
||||
* @param nextMediaType The next media type that will play.
|
||||
* @param positionTicks Optional. The position, in ticks, where playback stopped. 1 tick = 10000 ms.
|
||||
* @param liveStreamId The live stream id.
|
||||
* @param playSessionId The play session id.
|
||||
*/
|
||||
public async onPlaybackStopped (userId: string, itemId: string, mediaSourceId?: string, nextMediaType?: string, positionTicks?: number, liveStreamId?: string, playSessionId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/PlayingItems/{itemId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling onPlaybackStopped.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling onPlaybackStopped.');
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (nextMediaType !== undefined) {
|
||||
localVarQueryParameters['nextMediaType'] = ObjectSerializer.serialize(nextMediaType, "string");
|
||||
}
|
||||
|
||||
if (positionTicks !== undefined) {
|
||||
localVarQueryParameters['positionTicks'] = ObjectSerializer.serialize(positionTicks, "number");
|
||||
}
|
||||
|
||||
if (liveStreamId !== undefined) {
|
||||
localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string");
|
||||
}
|
||||
|
||||
if (playSessionId !== undefined) {
|
||||
localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Pings a playback session.
|
||||
* @param playSessionId Playback session id.
|
||||
*/
|
||||
public async pingPlaybackSession (playSessionId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Sessions/Playing/Ping';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'playSessionId' is not null or undefined
|
||||
if (playSessionId === null || playSessionId === undefined) {
|
||||
throw new Error('Required parameter playSessionId was null or undefined when calling pingPlaybackSession.');
|
||||
}
|
||||
|
||||
if (playSessionId !== undefined) {
|
||||
localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Reports playback progress within a session.
|
||||
* @param reportPlaybackProgressRequest The playback progress info.
|
||||
*/
|
||||
public async reportPlaybackProgress (reportPlaybackProgressRequest?: ReportPlaybackProgressRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Sessions/Playing/Progress';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(reportPlaybackProgressRequest, "ReportPlaybackProgressRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Reports playback has started within a session.
|
||||
* @param reportPlaybackStartRequest The playback start info.
|
||||
*/
|
||||
public async reportPlaybackStart (reportPlaybackStartRequest?: ReportPlaybackStartRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Sessions/Playing';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(reportPlaybackStartRequest, "ReportPlaybackStartRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Reports playback has stopped within a session.
|
||||
* @param reportPlaybackStoppedRequest The playback stop info.
|
||||
*/
|
||||
public async reportPlaybackStopped (reportPlaybackStoppedRequest?: ReportPlaybackStoppedRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Sessions/Playing/Stopped';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(reportPlaybackStoppedRequest, "ReportPlaybackStoppedRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
756
jellyfin/api/pluginsApi.ts
Normal file
756
jellyfin/api/pluginsApi.ts
Normal file
@ -0,0 +1,756 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { PluginInfo } from '../model/pluginInfo';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum PluginsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class PluginsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: PluginsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[PluginsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Disable a plugin.
|
||||
* @param pluginId Plugin id.
|
||||
* @param version Plugin version.
|
||||
*/
|
||||
public async disablePlugin (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}/Disable'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)))
|
||||
.replace('{' + 'version' + '}', encodeURIComponent(String(version)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling disablePlugin.');
|
||||
}
|
||||
|
||||
// verify required parameter 'version' is not null or undefined
|
||||
if (version === null || version === undefined) {
|
||||
throw new Error('Required parameter version was null or undefined when calling disablePlugin.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Enables a disabled plugin.
|
||||
* @param pluginId Plugin id.
|
||||
* @param version Plugin version.
|
||||
*/
|
||||
public async enablePlugin (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}/Enable'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)))
|
||||
.replace('{' + 'version' + '}', encodeURIComponent(String(version)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling enablePlugin.');
|
||||
}
|
||||
|
||||
// verify required parameter 'version' is not null or undefined
|
||||
if (version === null || version === undefined) {
|
||||
throw new Error('Required parameter version was null or undefined when calling enablePlugin.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets plugin configuration.
|
||||
* @param pluginId Plugin id.
|
||||
*/
|
||||
public async getPluginConfiguration (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}/Configuration'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling getPluginConfiguration.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "object");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a plugin\'s image.
|
||||
* @param pluginId Plugin id.
|
||||
* @param version Plugin version.
|
||||
*/
|
||||
public async getPluginImage (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}/Image'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)))
|
||||
.replace('{' + 'version' + '}', encodeURIComponent(String(version)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling getPluginImage.');
|
||||
}
|
||||
|
||||
// verify required parameter 'version' is not null or undefined
|
||||
if (version === null || version === undefined) {
|
||||
throw new Error('Required parameter version was null or undefined when calling getPluginImage.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a plugin\'s manifest.
|
||||
* @param pluginId Plugin id.
|
||||
*/
|
||||
public async getPluginManifest (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}/Manifest'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling getPluginManifest.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a list of currently installed plugins.
|
||||
*/
|
||||
public async getPlugins (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<PluginInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Plugins';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<PluginInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<PluginInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Uninstalls a plugin.
|
||||
* @param pluginId Plugin id.
|
||||
*/
|
||||
public async uninstallPlugin (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling uninstallPlugin.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Uninstalls a plugin by version.
|
||||
* @param pluginId Plugin id.
|
||||
* @param version Plugin version.
|
||||
*/
|
||||
public async uninstallPluginByVersion (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)))
|
||||
.replace('{' + 'version' + '}', encodeURIComponent(String(version)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling uninstallPluginByVersion.');
|
||||
}
|
||||
|
||||
// verify required parameter 'version' is not null or undefined
|
||||
if (version === null || version === undefined) {
|
||||
throw new Error('Required parameter version was null or undefined when calling uninstallPluginByVersion.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Accepts plugin configuration as JSON body.
|
||||
* @summary Updates plugin configuration.
|
||||
* @param pluginId Plugin id.
|
||||
*/
|
||||
public async updatePluginConfiguration (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Plugins/{pluginId}/Configuration'
|
||||
.replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'pluginId' is not null or undefined
|
||||
if (pluginId === null || pluginId === undefined) {
|
||||
throw new Error('Required parameter pluginId was null or undefined when calling updatePluginConfiguration.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
364
jellyfin/api/quickConnectApi.ts
Normal file
364
jellyfin/api/quickConnectApi.ts
Normal file
@ -0,0 +1,364 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { QuickConnectResult } from '../model/quickConnectResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum QuickConnectApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class QuickConnectApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: QuickConnectApiApiKeys, value: string) {
|
||||
(this.authentications as any)[QuickConnectApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Authorizes a pending quick connect request.
|
||||
* @param code Quick connect code to authorize.
|
||||
*/
|
||||
public async authorize (code: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: boolean; }> {
|
||||
const localVarPath = this.basePath + '/QuickConnect/Authorize';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'code' is not null or undefined
|
||||
if (code === null || code === undefined) {
|
||||
throw new Error('Required parameter code was null or undefined when calling authorize.');
|
||||
}
|
||||
|
||||
if (code !== undefined) {
|
||||
localVarQueryParameters['code'] = ObjectSerializer.serialize(code, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: boolean; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "boolean");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Attempts to retrieve authentication information.
|
||||
* @param secret Secret previously returned from the Initiate endpoint.
|
||||
*/
|
||||
public async connect (secret: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }> {
|
||||
const localVarPath = this.basePath + '/QuickConnect/Connect';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'secret' is not null or undefined
|
||||
if (secret === null || secret === undefined) {
|
||||
throw new Error('Required parameter secret was null or undefined when calling connect.');
|
||||
}
|
||||
|
||||
if (secret !== undefined) {
|
||||
localVarQueryParameters['secret'] = ObjectSerializer.serialize(secret, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "QuickConnectResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the current quick connect state.
|
||||
*/
|
||||
public async getEnabled (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: boolean; }> {
|
||||
const localVarPath = this.basePath + '/QuickConnect/Enabled';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: boolean; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "boolean");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Initiate a new quick connect request.
|
||||
*/
|
||||
public async initiate (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }> {
|
||||
const localVarPath = this.basePath + '/QuickConnect/Initiate';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "QuickConnectResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
350
jellyfin/api/remoteImageApi.ts
Normal file
350
jellyfin/api/remoteImageApi.ts
Normal file
@ -0,0 +1,350 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ImageProviderInfo } from '../model/imageProviderInfo';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { RemoteImageResult } from '../model/remoteImageResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum RemoteImageApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class RemoteImageApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: RemoteImageApiApiKeys, value: string) {
|
||||
(this.authentications as any)[RemoteImageApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Downloads a remote image for an item.
|
||||
* @param itemId Item Id.
|
||||
* @param type The image type.
|
||||
* @param imageUrl The image url.
|
||||
*/
|
||||
public async downloadRemoteImage (itemId: string, type: ImageType, imageUrl?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/RemoteImages/Download'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling downloadRemoteImage.');
|
||||
}
|
||||
|
||||
// verify required parameter 'type' is not null or undefined
|
||||
if (type === null || type === undefined) {
|
||||
throw new Error('Required parameter type was null or undefined when calling downloadRemoteImage.');
|
||||
}
|
||||
|
||||
if (type !== undefined) {
|
||||
localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "ImageType");
|
||||
}
|
||||
|
||||
if (imageUrl !== undefined) {
|
||||
localVarQueryParameters['imageUrl'] = ObjectSerializer.serialize(imageUrl, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets available remote image providers for an item.
|
||||
* @param itemId Item Id.
|
||||
*/
|
||||
public async getRemoteImageProviders (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ImageProviderInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/RemoteImages/Providers'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getRemoteImageProviders.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<ImageProviderInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<ImageProviderInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets available remote images for an item.
|
||||
* @param itemId Item Id.
|
||||
* @param type The image type.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param providerName Optional. The image provider to use.
|
||||
* @param includeAllLanguages Optional. Include all languages.
|
||||
*/
|
||||
public async getRemoteImages (itemId: string, type?: ImageType, startIndex?: number, limit?: number, providerName?: string, includeAllLanguages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RemoteImageResult; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/RemoteImages'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getRemoteImages.');
|
||||
}
|
||||
|
||||
if (type !== undefined) {
|
||||
localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "ImageType");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (providerName !== undefined) {
|
||||
localVarQueryParameters['providerName'] = ObjectSerializer.serialize(providerName, "string");
|
||||
}
|
||||
|
||||
if (includeAllLanguages !== undefined) {
|
||||
localVarQueryParameters['includeAllLanguages'] = ObjectSerializer.serialize(includeAllLanguages, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: RemoteImageResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "RemoteImageResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
461
jellyfin/api/scheduledTasksApi.ts
Normal file
461
jellyfin/api/scheduledTasksApi.ts
Normal file
@ -0,0 +1,461 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { TaskInfo } from '../model/taskInfo';
|
||||
import { TaskTriggerInfo } from '../model/taskTriggerInfo';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum ScheduledTasksApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class ScheduledTasksApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: ScheduledTasksApiApiKeys, value: string) {
|
||||
(this.authentications as any)[ScheduledTasksApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get task by id.
|
||||
* @param taskId Task Id.
|
||||
*/
|
||||
public async getTask (taskId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TaskInfo; }> {
|
||||
const localVarPath = this.basePath + '/ScheduledTasks/{taskId}'
|
||||
.replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'taskId' is not null or undefined
|
||||
if (taskId === null || taskId === undefined) {
|
||||
throw new Error('Required parameter taskId was null or undefined when calling getTask.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: TaskInfo; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "TaskInfo");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get tasks.
|
||||
* @param isHidden Optional filter tasks that are hidden, or not.
|
||||
* @param isEnabled Optional filter tasks that are enabled, or not.
|
||||
*/
|
||||
public async getTasks (isHidden?: boolean, isEnabled?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<TaskInfo>; }> {
|
||||
const localVarPath = this.basePath + '/ScheduledTasks';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (isHidden !== undefined) {
|
||||
localVarQueryParameters['isHidden'] = ObjectSerializer.serialize(isHidden, "boolean");
|
||||
}
|
||||
|
||||
if (isEnabled !== undefined) {
|
||||
localVarQueryParameters['isEnabled'] = ObjectSerializer.serialize(isEnabled, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<TaskInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<TaskInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Start specified task.
|
||||
* @param taskId Task Id.
|
||||
*/
|
||||
public async startTask (taskId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/ScheduledTasks/Running/{taskId}'
|
||||
.replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'taskId' is not null or undefined
|
||||
if (taskId === null || taskId === undefined) {
|
||||
throw new Error('Required parameter taskId was null or undefined when calling startTask.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Stop specified task.
|
||||
* @param taskId Task Id.
|
||||
*/
|
||||
public async stopTask (taskId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/ScheduledTasks/Running/{taskId}'
|
||||
.replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'taskId' is not null or undefined
|
||||
if (taskId === null || taskId === undefined) {
|
||||
throw new Error('Required parameter taskId was null or undefined when calling stopTask.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Update specified task triggers.
|
||||
* @param taskId Task Id.
|
||||
* @param taskTriggerInfo Triggers.
|
||||
*/
|
||||
public async updateTask (taskId: string, taskTriggerInfo: Array<TaskTriggerInfo>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/ScheduledTasks/{taskId}/Triggers'
|
||||
.replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'taskId' is not null or undefined
|
||||
if (taskId === null || taskId === undefined) {
|
||||
throw new Error('Required parameter taskId was null or undefined when calling updateTask.');
|
||||
}
|
||||
|
||||
// verify required parameter 'taskTriggerInfo' is not null or undefined
|
||||
if (taskTriggerInfo === null || taskTriggerInfo === undefined) {
|
||||
throw new Error('Required parameter taskTriggerInfo was null or undefined when calling updateTask.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(taskTriggerInfo, "Array<TaskTriggerInfo>")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
253
jellyfin/api/searchApi.ts
Normal file
253
jellyfin/api/searchApi.ts
Normal file
@ -0,0 +1,253 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { SearchHintResult } from '../model/searchHintResult';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum SearchApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class SearchApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: SearchApiApiKeys, value: string) {
|
||||
(this.authentications as any)[SearchApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets the search hint result.
|
||||
* @param searchTerm The search term to filter on.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param userId Optional. Supply a user id to search within a user\'s library or omit to search all.
|
||||
* @param includeItemTypes If specified, only results with the specified item types are returned. This allows multiple, comma delimeted.
|
||||
* @param excludeItemTypes If specified, results with these item types are filtered out. This allows multiple, comma delimeted.
|
||||
* @param mediaTypes If specified, only results with the specified media types are returned. This allows multiple, comma delimeted.
|
||||
* @param parentId If specified, only children of the parent are returned.
|
||||
* @param isMovie Optional filter for movies.
|
||||
* @param isSeries Optional filter for series.
|
||||
* @param isNews Optional filter for news.
|
||||
* @param isKids Optional filter for kids.
|
||||
* @param isSports Optional filter for sports.
|
||||
* @param includePeople Optional filter whether to include people.
|
||||
* @param includeMedia Optional filter whether to include media.
|
||||
* @param includeGenres Optional filter whether to include genres.
|
||||
* @param includeStudios Optional filter whether to include studios.
|
||||
* @param includeArtists Optional filter whether to include artists.
|
||||
*/
|
||||
public async get (searchTerm: string, startIndex?: number, limit?: number, userId?: string, includeItemTypes?: Array<BaseItemKind>, excludeItemTypes?: Array<BaseItemKind>, mediaTypes?: Array<string>, parentId?: string, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, includePeople?: boolean, includeMedia?: boolean, includeGenres?: boolean, includeStudios?: boolean, includeArtists?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SearchHintResult; }> {
|
||||
const localVarPath = this.basePath + '/Search/Hints';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'searchTerm' is not null or undefined
|
||||
if (searchTerm === null || searchTerm === undefined) {
|
||||
throw new Error('Required parameter searchTerm was null or undefined when calling get.');
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (mediaTypes !== undefined) {
|
||||
localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (isMovie !== undefined) {
|
||||
localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean");
|
||||
}
|
||||
|
||||
if (isSeries !== undefined) {
|
||||
localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean");
|
||||
}
|
||||
|
||||
if (isNews !== undefined) {
|
||||
localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean");
|
||||
}
|
||||
|
||||
if (isKids !== undefined) {
|
||||
localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean");
|
||||
}
|
||||
|
||||
if (isSports !== undefined) {
|
||||
localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean");
|
||||
}
|
||||
|
||||
if (includePeople !== undefined) {
|
||||
localVarQueryParameters['includePeople'] = ObjectSerializer.serialize(includePeople, "boolean");
|
||||
}
|
||||
|
||||
if (includeMedia !== undefined) {
|
||||
localVarQueryParameters['includeMedia'] = ObjectSerializer.serialize(includeMedia, "boolean");
|
||||
}
|
||||
|
||||
if (includeGenres !== undefined) {
|
||||
localVarQueryParameters['includeGenres'] = ObjectSerializer.serialize(includeGenres, "boolean");
|
||||
}
|
||||
|
||||
if (includeStudios !== undefined) {
|
||||
localVarQueryParameters['includeStudios'] = ObjectSerializer.serialize(includeStudios, "boolean");
|
||||
}
|
||||
|
||||
if (includeArtists !== undefined) {
|
||||
localVarQueryParameters['includeArtists'] = ObjectSerializer.serialize(includeArtists, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: SearchHintResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "SearchHintResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1305
jellyfin/api/sessionApi.ts
Normal file
1305
jellyfin/api/sessionApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
535
jellyfin/api/startupApi.ts
Normal file
535
jellyfin/api/startupApi.ts
Normal file
@ -0,0 +1,535 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { SetRemoteAccessRequest } from '../model/setRemoteAccessRequest';
|
||||
import { StartupConfigurationDto } from '../model/startupConfigurationDto';
|
||||
import { StartupUserDto } from '../model/startupUserDto';
|
||||
import { UpdateInitialConfigurationRequest } from '../model/updateInitialConfigurationRequest';
|
||||
import { UpdateStartupUserRequest } from '../model/updateStartupUserRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum StartupApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class StartupApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: StartupApiApiKeys, value: string) {
|
||||
(this.authentications as any)[StartupApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Completes the startup wizard.
|
||||
*/
|
||||
public async completeWizard (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Startup/Complete';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the first user.
|
||||
*/
|
||||
public async getFirstUser (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StartupUserDto; }> {
|
||||
const localVarPath = this.basePath + '/Startup/User';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: StartupUserDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "StartupUserDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the first user.
|
||||
*/
|
||||
public async getFirstUser2 (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StartupUserDto; }> {
|
||||
const localVarPath = this.basePath + '/Startup/FirstUser';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: StartupUserDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "StartupUserDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the initial startup wizard configuration.
|
||||
*/
|
||||
public async getStartupConfiguration (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StartupConfigurationDto; }> {
|
||||
const localVarPath = this.basePath + '/Startup/Configuration';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: StartupConfigurationDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "StartupConfigurationDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Sets remote access and UPnP.
|
||||
* @param setRemoteAccessRequest The startup remote access dto.
|
||||
*/
|
||||
public async setRemoteAccess (setRemoteAccessRequest: SetRemoteAccessRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Startup/RemoteAccess';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'setRemoteAccessRequest' is not null or undefined
|
||||
if (setRemoteAccessRequest === null || setRemoteAccessRequest === undefined) {
|
||||
throw new Error('Required parameter setRemoteAccessRequest was null or undefined when calling setRemoteAccess.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(setRemoteAccessRequest, "SetRemoteAccessRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Sets the initial startup wizard configuration.
|
||||
* @param updateInitialConfigurationRequest The updated startup configuration.
|
||||
*/
|
||||
public async updateInitialConfiguration (updateInitialConfigurationRequest: UpdateInitialConfigurationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Startup/Configuration';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'updateInitialConfigurationRequest' is not null or undefined
|
||||
if (updateInitialConfigurationRequest === null || updateInitialConfigurationRequest === undefined) {
|
||||
throw new Error('Required parameter updateInitialConfigurationRequest was null or undefined when calling updateInitialConfiguration.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateInitialConfigurationRequest, "UpdateInitialConfigurationRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Sets the user name and password.
|
||||
* @param updateStartupUserRequest The DTO containing username and password.
|
||||
*/
|
||||
public async updateStartupUser (updateStartupUserRequest?: UpdateStartupUserRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Startup/User';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(updateStartupUserRequest, "UpdateStartupUserRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
323
jellyfin/api/studiosApi.ts
Normal file
323
jellyfin/api/studiosApi.ts
Normal file
@ -0,0 +1,323 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDto } from '../model/baseItemDto';
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum StudiosApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class StudiosApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: StudiosApiApiKeys, value: string) {
|
||||
(this.authentications as any)[StudiosApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets a studio by name.
|
||||
* @param name Studio name.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
*/
|
||||
public async getStudio (name: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/Studios/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getStudio.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets all studios from a given item, folder, or the entire library.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param searchTerm Optional. Search term.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
|
||||
* @param isFavorite Optional filter by items that are marked as favorite, or not.
|
||||
* @param enableUserData Optional, include user data.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param userId User id.
|
||||
* @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string.
|
||||
* @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string.
|
||||
* @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
* @param enableTotalRecordCount Total record count.
|
||||
*/
|
||||
public async getStudios (startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array<ItemFields>, excludeItemTypes?: Array<BaseItemKind>, includeItemTypes?: Array<BaseItemKind>, isFavorite?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Studios';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWithOrGreater !== undefined) {
|
||||
localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWith !== undefined) {
|
||||
localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string");
|
||||
}
|
||||
|
||||
if (nameLessThan !== undefined) {
|
||||
localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
971
jellyfin/api/subtitleApi.ts
Normal file
971
jellyfin/api/subtitleApi.ts
Normal file
@ -0,0 +1,971 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { FontFile } from '../model/fontFile';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { RemoteSubtitleInfo } from '../model/remoteSubtitleInfo';
|
||||
import { UploadSubtitleRequest } from '../model/uploadSubtitleRequest';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum SubtitleApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class SubtitleApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: SubtitleApiApiKeys, value: string) {
|
||||
(this.authentications as any)[SubtitleApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Deletes an external subtitle file.
|
||||
* @param itemId The item id.
|
||||
* @param index The index of the subtitle file.
|
||||
*/
|
||||
public async deleteSubtitle (itemId: string, index: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{itemId}/Subtitles/{index}'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'index' + '}', encodeURIComponent(String(index)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling deleteSubtitle.');
|
||||
}
|
||||
|
||||
// verify required parameter 'index' is not null or undefined
|
||||
if (index === null || index === undefined) {
|
||||
throw new Error('Required parameter index was null or undefined when calling deleteSubtitle.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Downloads a remote subtitle.
|
||||
* @param itemId The item id.
|
||||
* @param subtitleId The subtitle id.
|
||||
*/
|
||||
public async downloadRemoteSubtitles (itemId: string, subtitleId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/RemoteSearch/Subtitles/{subtitleId}'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'subtitleId' + '}', encodeURIComponent(String(subtitleId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling downloadRemoteSubtitles.');
|
||||
}
|
||||
|
||||
// verify required parameter 'subtitleId' is not null or undefined
|
||||
if (subtitleId === null || subtitleId === undefined) {
|
||||
throw new Error('Required parameter subtitleId was null or undefined when calling downloadRemoteSubtitles.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a fallback font file.
|
||||
* @param name The name of the fallback font file to get.
|
||||
*/
|
||||
public async getFallbackFont (name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/FallbackFont/Fonts/{name}'
|
||||
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['font/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getFallbackFont.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a list of available fallback font files.
|
||||
*/
|
||||
public async getFallbackFontList (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<FontFile>; }> {
|
||||
const localVarPath = this.basePath + '/FallbackFont/Fonts';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<FontFile>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<FontFile>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the remote subtitles.
|
||||
* @param id The item id.
|
||||
*/
|
||||
public async getRemoteSubtitles (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Providers/Subtitles/Subtitles/{id}'
|
||||
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['text/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getRemoteSubtitles.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets subtitles in a specified format.
|
||||
* @param routeItemId The (route) item id.
|
||||
* @param routeMediaSourceId The (route) media source id.
|
||||
* @param routeIndex The (route) subtitle stream index.
|
||||
* @param routeFormat The (route) format of the returned subtitle.
|
||||
* @param itemId The item id.
|
||||
* @param mediaSourceId The media source id.
|
||||
* @param index The subtitle stream index.
|
||||
* @param format The format of the returned subtitle.
|
||||
* @param endPositionTicks Optional. The end position of the subtitle in ticks.
|
||||
* @param copyTimestamps Optional. Whether to copy the timestamps.
|
||||
* @param addVttTimeMap Optional. Whether to add a VTT time map.
|
||||
* @param startPositionTicks The start position of the subtitle in ticks.
|
||||
*/
|
||||
public async getSubtitle (routeItemId: string, routeMediaSourceId: string, routeIndex: number, routeFormat: string, itemId?: string, mediaSourceId?: string, index?: number, format?: string, endPositionTicks?: number, copyTimestamps?: boolean, addVttTimeMap?: boolean, startPositionTicks?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/Stream.{routeFormat}'
|
||||
.replace('{' + 'routeItemId' + '}', encodeURIComponent(String(routeItemId)))
|
||||
.replace('{' + 'routeMediaSourceId' + '}', encodeURIComponent(String(routeMediaSourceId)))
|
||||
.replace('{' + 'routeIndex' + '}', encodeURIComponent(String(routeIndex)))
|
||||
.replace('{' + 'routeFormat' + '}', encodeURIComponent(String(routeFormat)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['text/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'routeItemId' is not null or undefined
|
||||
if (routeItemId === null || routeItemId === undefined) {
|
||||
throw new Error('Required parameter routeItemId was null or undefined when calling getSubtitle.');
|
||||
}
|
||||
|
||||
// verify required parameter 'routeMediaSourceId' is not null or undefined
|
||||
if (routeMediaSourceId === null || routeMediaSourceId === undefined) {
|
||||
throw new Error('Required parameter routeMediaSourceId was null or undefined when calling getSubtitle.');
|
||||
}
|
||||
|
||||
// verify required parameter 'routeIndex' is not null or undefined
|
||||
if (routeIndex === null || routeIndex === undefined) {
|
||||
throw new Error('Required parameter routeIndex was null or undefined when calling getSubtitle.');
|
||||
}
|
||||
|
||||
// verify required parameter 'routeFormat' is not null or undefined
|
||||
if (routeFormat === null || routeFormat === undefined) {
|
||||
throw new Error('Required parameter routeFormat was null or undefined when calling getSubtitle.');
|
||||
}
|
||||
|
||||
if (itemId !== undefined) {
|
||||
localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string");
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (index !== undefined) {
|
||||
localVarQueryParameters['index'] = ObjectSerializer.serialize(index, "number");
|
||||
}
|
||||
|
||||
if (format !== undefined) {
|
||||
localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string");
|
||||
}
|
||||
|
||||
if (endPositionTicks !== undefined) {
|
||||
localVarQueryParameters['endPositionTicks'] = ObjectSerializer.serialize(endPositionTicks, "number");
|
||||
}
|
||||
|
||||
if (copyTimestamps !== undefined) {
|
||||
localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean");
|
||||
}
|
||||
|
||||
if (addVttTimeMap !== undefined) {
|
||||
localVarQueryParameters['addVttTimeMap'] = ObjectSerializer.serialize(addVttTimeMap, "boolean");
|
||||
}
|
||||
|
||||
if (startPositionTicks !== undefined) {
|
||||
localVarQueryParameters['startPositionTicks'] = ObjectSerializer.serialize(startPositionTicks, "number");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets an HLS subtitle playlist.
|
||||
* @param itemId The item id.
|
||||
* @param index The subtitle stream index.
|
||||
* @param mediaSourceId The media source id.
|
||||
* @param segmentLength The subtitle segment length.
|
||||
*/
|
||||
public async getSubtitlePlaylist (itemId: string, index: number, mediaSourceId: string, segmentLength: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{itemId}/{mediaSourceId}/Subtitles/{index}/subtitles.m3u8'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'index' + '}', encodeURIComponent(String(index)))
|
||||
.replace('{' + 'mediaSourceId' + '}', encodeURIComponent(String(mediaSourceId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/x-mpegURL'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getSubtitlePlaylist.');
|
||||
}
|
||||
|
||||
// verify required parameter 'index' is not null or undefined
|
||||
if (index === null || index === undefined) {
|
||||
throw new Error('Required parameter index was null or undefined when calling getSubtitlePlaylist.');
|
||||
}
|
||||
|
||||
// verify required parameter 'mediaSourceId' is not null or undefined
|
||||
if (mediaSourceId === null || mediaSourceId === undefined) {
|
||||
throw new Error('Required parameter mediaSourceId was null or undefined when calling getSubtitlePlaylist.');
|
||||
}
|
||||
|
||||
// verify required parameter 'segmentLength' is not null or undefined
|
||||
if (segmentLength === null || segmentLength === undefined) {
|
||||
throw new Error('Required parameter segmentLength was null or undefined when calling getSubtitlePlaylist.');
|
||||
}
|
||||
|
||||
if (segmentLength !== undefined) {
|
||||
localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets subtitles in a specified format.
|
||||
* @param routeItemId The (route) item id.
|
||||
* @param routeMediaSourceId The (route) media source id.
|
||||
* @param routeIndex The (route) subtitle stream index.
|
||||
* @param routeStartPositionTicks The (route) start position of the subtitle in ticks.
|
||||
* @param routeFormat The (route) format of the returned subtitle.
|
||||
* @param itemId The item id.
|
||||
* @param mediaSourceId The media source id.
|
||||
* @param index The subtitle stream index.
|
||||
* @param startPositionTicks The start position of the subtitle in ticks.
|
||||
* @param format The format of the returned subtitle.
|
||||
* @param endPositionTicks Optional. The end position of the subtitle in ticks.
|
||||
* @param copyTimestamps Optional. Whether to copy the timestamps.
|
||||
* @param addVttTimeMap Optional. Whether to add a VTT time map.
|
||||
*/
|
||||
public async getSubtitleWithTicks (routeItemId: string, routeMediaSourceId: string, routeIndex: number, routeStartPositionTicks: number, routeFormat: string, itemId?: string, mediaSourceId?: string, index?: number, startPositionTicks?: number, format?: string, endPositionTicks?: number, copyTimestamps?: boolean, addVttTimeMap?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/{routeStartPositionTicks}/Stream.{routeFormat}'
|
||||
.replace('{' + 'routeItemId' + '}', encodeURIComponent(String(routeItemId)))
|
||||
.replace('{' + 'routeMediaSourceId' + '}', encodeURIComponent(String(routeMediaSourceId)))
|
||||
.replace('{' + 'routeIndex' + '}', encodeURIComponent(String(routeIndex)))
|
||||
.replace('{' + 'routeStartPositionTicks' + '}', encodeURIComponent(String(routeStartPositionTicks)))
|
||||
.replace('{' + 'routeFormat' + '}', encodeURIComponent(String(routeFormat)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['text/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'routeItemId' is not null or undefined
|
||||
if (routeItemId === null || routeItemId === undefined) {
|
||||
throw new Error('Required parameter routeItemId was null or undefined when calling getSubtitleWithTicks.');
|
||||
}
|
||||
|
||||
// verify required parameter 'routeMediaSourceId' is not null or undefined
|
||||
if (routeMediaSourceId === null || routeMediaSourceId === undefined) {
|
||||
throw new Error('Required parameter routeMediaSourceId was null or undefined when calling getSubtitleWithTicks.');
|
||||
}
|
||||
|
||||
// verify required parameter 'routeIndex' is not null or undefined
|
||||
if (routeIndex === null || routeIndex === undefined) {
|
||||
throw new Error('Required parameter routeIndex was null or undefined when calling getSubtitleWithTicks.');
|
||||
}
|
||||
|
||||
// verify required parameter 'routeStartPositionTicks' is not null or undefined
|
||||
if (routeStartPositionTicks === null || routeStartPositionTicks === undefined) {
|
||||
throw new Error('Required parameter routeStartPositionTicks was null or undefined when calling getSubtitleWithTicks.');
|
||||
}
|
||||
|
||||
// verify required parameter 'routeFormat' is not null or undefined
|
||||
if (routeFormat === null || routeFormat === undefined) {
|
||||
throw new Error('Required parameter routeFormat was null or undefined when calling getSubtitleWithTicks.');
|
||||
}
|
||||
|
||||
if (itemId !== undefined) {
|
||||
localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string");
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (index !== undefined) {
|
||||
localVarQueryParameters['index'] = ObjectSerializer.serialize(index, "number");
|
||||
}
|
||||
|
||||
if (startPositionTicks !== undefined) {
|
||||
localVarQueryParameters['startPositionTicks'] = ObjectSerializer.serialize(startPositionTicks, "number");
|
||||
}
|
||||
|
||||
if (format !== undefined) {
|
||||
localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string");
|
||||
}
|
||||
|
||||
if (endPositionTicks !== undefined) {
|
||||
localVarQueryParameters['endPositionTicks'] = ObjectSerializer.serialize(endPositionTicks, "number");
|
||||
}
|
||||
|
||||
if (copyTimestamps !== undefined) {
|
||||
localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean");
|
||||
}
|
||||
|
||||
if (addVttTimeMap !== undefined) {
|
||||
localVarQueryParameters['addVttTimeMap'] = ObjectSerializer.serialize(addVttTimeMap, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Search remote subtitles.
|
||||
* @param itemId The item id.
|
||||
* @param language The language of the subtitles.
|
||||
* @param isPerfectMatch Optional. Only show subtitles which are a perfect match.
|
||||
*/
|
||||
public async searchRemoteSubtitles (itemId: string, language: string, isPerfectMatch?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RemoteSubtitleInfo>; }> {
|
||||
const localVarPath = this.basePath + '/Items/{itemId}/RemoteSearch/Subtitles/{language}'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)))
|
||||
.replace('{' + 'language' + '}', encodeURIComponent(String(language)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling searchRemoteSubtitles.');
|
||||
}
|
||||
|
||||
// verify required parameter 'language' is not null or undefined
|
||||
if (language === null || language === undefined) {
|
||||
throw new Error('Required parameter language was null or undefined when calling searchRemoteSubtitles.');
|
||||
}
|
||||
|
||||
if (isPerfectMatch !== undefined) {
|
||||
localVarQueryParameters['isPerfectMatch'] = ObjectSerializer.serialize(isPerfectMatch, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<RemoteSubtitleInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<RemoteSubtitleInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Upload an external subtitle file.
|
||||
* @param itemId The item the subtitle belongs to.
|
||||
* @param uploadSubtitleRequest The request body.
|
||||
*/
|
||||
public async uploadSubtitle (itemId: string, uploadSubtitleRequest: UploadSubtitleRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{itemId}/Subtitles'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling uploadSubtitle.');
|
||||
}
|
||||
|
||||
// verify required parameter 'uploadSubtitleRequest' is not null or undefined
|
||||
if (uploadSubtitleRequest === null || uploadSubtitleRequest === undefined) {
|
||||
throw new Error('Required parameter uploadSubtitleRequest was null or undefined when calling uploadSubtitle.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(uploadSubtitleRequest, "UploadSubtitleRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
190
jellyfin/api/suggestionsApi.ts
Normal file
190
jellyfin/api/suggestionsApi.ts
Normal file
@ -0,0 +1,190 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum SuggestionsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class SuggestionsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: SuggestionsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[SuggestionsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets suggestions.
|
||||
* @param userId The user id.
|
||||
* @param mediaType The media types.
|
||||
* @param type The type.
|
||||
* @param startIndex Optional. The start index.
|
||||
* @param limit Optional. The limit.
|
||||
* @param enableTotalRecordCount Whether to enable the total record count.
|
||||
*/
|
||||
public async getSuggestions (userId: string, mediaType?: Array<string>, type?: Array<BaseItemKind>, startIndex?: number, limit?: number, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Suggestions'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getSuggestions.');
|
||||
}
|
||||
|
||||
if (mediaType !== undefined) {
|
||||
localVarQueryParameters['mediaType'] = ObjectSerializer.serialize(mediaType, "Array<string>");
|
||||
}
|
||||
|
||||
if (type !== undefined) {
|
||||
localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1425
jellyfin/api/syncPlayApi.ts
Normal file
1425
jellyfin/api/syncPlayApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
731
jellyfin/api/systemApi.ts
Normal file
731
jellyfin/api/systemApi.ts
Normal file
@ -0,0 +1,731 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { EndPointInfo } from '../model/endPointInfo';
|
||||
import { LogFile } from '../model/logFile';
|
||||
import { PublicSystemInfo } from '../model/publicSystemInfo';
|
||||
import { SystemInfo } from '../model/systemInfo';
|
||||
import { WakeOnLanInfo } from '../model/wakeOnLanInfo';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum SystemApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class SystemApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: SystemApiApiKeys, value: string) {
|
||||
(this.authentications as any)[SystemApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets information about the request endpoint.
|
||||
*/
|
||||
public async getEndpointInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EndPointInfo; }> {
|
||||
const localVarPath = this.basePath + '/System/Endpoint';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: EndPointInfo; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "EndPointInfo");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a log file.
|
||||
* @param name The name of the log file to get.
|
||||
*/
|
||||
public async getLogFile (name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/System/Logs/Log';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['text/plain'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
if (name === null || name === undefined) {
|
||||
throw new Error('Required parameter name was null or undefined when calling getLogFile.');
|
||||
}
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Pings the system.
|
||||
*/
|
||||
public async getPingSystem (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> {
|
||||
const localVarPath = this.basePath + '/System/Ping';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "string");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets public information about the server.
|
||||
*/
|
||||
public async getPublicSystemInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PublicSystemInfo; }> {
|
||||
const localVarPath = this.basePath + '/System/Info/Public';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: PublicSystemInfo; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "PublicSystemInfo");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a list of available server log files.
|
||||
*/
|
||||
public async getServerLogs (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<LogFile>; }> {
|
||||
const localVarPath = this.basePath + '/System/Logs';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<LogFile>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<LogFile>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets information about the server.
|
||||
*/
|
||||
public async getSystemInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SystemInfo; }> {
|
||||
const localVarPath = this.basePath + '/System/Info';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: SystemInfo; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "SystemInfo");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets wake on lan information.
|
||||
*/
|
||||
public async getWakeOnLanInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<WakeOnLanInfo>; }> {
|
||||
const localVarPath = this.basePath + '/System/WakeOnLanInfo';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<WakeOnLanInfo>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<WakeOnLanInfo>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Pings the system.
|
||||
*/
|
||||
public async postPingSystem (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> {
|
||||
const localVarPath = this.basePath + '/System/Ping';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "string");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Restarts the application.
|
||||
*/
|
||||
public async restartApplication (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/System/Restart';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Shuts down the application.
|
||||
*/
|
||||
public async shutdownApplication (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/System/Shutdown';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
154
jellyfin/api/timeSyncApi.ts
Normal file
154
jellyfin/api/timeSyncApi.ts
Normal file
@ -0,0 +1,154 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { UtcTimeResponse } from '../model/utcTimeResponse';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum TimeSyncApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class TimeSyncApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: TimeSyncApiApiKeys, value: string) {
|
||||
(this.authentications as any)[TimeSyncApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets the current UTC time.
|
||||
*/
|
||||
public async getUtcTime (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UtcTimeResponse; }> {
|
||||
const localVarPath = this.basePath + '/GetUtcTime';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: UtcTimeResponse; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "UtcTimeResponse");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
157
jellyfin/api/tmdbApi.ts
Normal file
157
jellyfin/api/tmdbApi.ts
Normal file
@ -0,0 +1,157 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ConfigImageTypes } from '../model/configImageTypes';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum TmdbApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class TmdbApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: TmdbApiApiKeys, value: string) {
|
||||
(this.authentications as any)[TmdbApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets the TMDb image configuration options.
|
||||
*/
|
||||
public async tmdbClientConfiguration (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConfigImageTypes; }> {
|
||||
const localVarPath = this.basePath + '/Tmdb/ClientConfiguration';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: ConfigImageTypes; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "ConfigImageTypes");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
585
jellyfin/api/trailersApi.ts
Normal file
585
jellyfin/api/trailersApi.ts
Normal file
@ -0,0 +1,585 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { ItemFilter } from '../model/itemFilter';
|
||||
import { LocationType } from '../model/locationType';
|
||||
import { SeriesStatus } from '../model/seriesStatus';
|
||||
import { SortOrder } from '../model/sortOrder';
|
||||
import { VideoType } from '../model/videoType';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum TrailersApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class TrailersApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: TrailersApiApiKeys, value: string) {
|
||||
(this.authentications as any)[TrailersApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Finds movies and trailers similar to a given trailer.
|
||||
* @param userId The user id.
|
||||
* @param maxOfficialRating Optional filter by maximum official rating (PG, PG-13, TV-MA, etc).
|
||||
* @param hasThemeSong Optional filter by items with theme songs.
|
||||
* @param hasThemeVideo Optional filter by items with theme videos.
|
||||
* @param hasSubtitles Optional filter by items with subtitles.
|
||||
* @param hasSpecialFeature Optional filter by items with special features.
|
||||
* @param hasTrailer Optional filter by items with trailers.
|
||||
* @param adjacentTo Optional. Return items that are siblings of a supplied item.
|
||||
* @param parentIndexNumber Optional filter by parent index number.
|
||||
* @param hasParentalRating Optional filter by items that have or do not have a parental rating.
|
||||
* @param isHd Optional filter by items that are HD or not.
|
||||
* @param is4K Optional filter by items that are 4K or not.
|
||||
* @param locationTypes Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimited.
|
||||
* @param excludeLocationTypes Optional. If specified, results will be filtered based on the LocationType. This allows multiple, comma delimited.
|
||||
* @param isMissing Optional filter by items that are missing episodes or not.
|
||||
* @param isUnaired Optional filter by items that are unaired episodes or not.
|
||||
* @param minCommunityRating Optional filter by minimum community rating.
|
||||
* @param minCriticRating Optional filter by minimum critic rating.
|
||||
* @param minPremiereDate Optional. The minimum premiere date. Format = ISO.
|
||||
* @param minDateLastSaved Optional. The minimum last saved date. Format = ISO.
|
||||
* @param minDateLastSavedForUser Optional. The minimum last saved date for the current user. Format = ISO.
|
||||
* @param maxPremiereDate Optional. The maximum premiere date. Format = ISO.
|
||||
* @param hasOverview Optional filter by items that have an overview or not.
|
||||
* @param hasImdbId Optional filter by items that have an imdb id or not.
|
||||
* @param hasTmdbId Optional filter by items that have a tmdb id or not.
|
||||
* @param hasTvdbId Optional filter by items that have a tvdb id or not.
|
||||
* @param isMovie Optional filter for live tv movies.
|
||||
* @param isSeries Optional filter for live tv series.
|
||||
* @param isNews Optional filter for live tv news.
|
||||
* @param isKids Optional filter for live tv kids.
|
||||
* @param isSports Optional filter for live tv sports.
|
||||
* @param excludeItemIds Optional. If specified, results will be filtered by excluding item ids. This allows multiple, comma delimited.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param recursive When searching within folders, this determines whether or not the search will be recursive. true/false.
|
||||
* @param searchTerm Optional. Filter based on a search term.
|
||||
* @param sortOrder Sort Order - Ascending,Descending.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.
|
||||
* @param excludeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
|
||||
* @param filters Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.
|
||||
* @param isFavorite Optional filter by items that are marked as favorite, or not.
|
||||
* @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited.
|
||||
* @param imageTypes Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.
|
||||
* @param isPlayed Optional filter by items that are played, or not.
|
||||
* @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.
|
||||
* @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.
|
||||
* @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.
|
||||
* @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.
|
||||
* @param enableUserData Optional, include user data.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param person Optional. If specified, results will be filtered to include only those containing the specified person.
|
||||
* @param personIds Optional. If specified, results will be filtered to include only those containing the specified person id.
|
||||
* @param 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 studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.
|
||||
* @param artists Optional. If specified, results will be filtered based on artists. This allows multiple, pipe delimited.
|
||||
* @param excludeArtistIds Optional. If specified, results will be filtered based on artist id. This allows multiple, pipe delimited.
|
||||
* @param artistIds Optional. If specified, results will be filtered to include only those containing the specified artist id.
|
||||
* @param albumArtistIds Optional. If specified, results will be filtered to include only those containing the specified album artist id.
|
||||
* @param contributingArtistIds Optional. If specified, results will be filtered to include only those containing the specified contributing artist id.
|
||||
* @param albums Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimited.
|
||||
* @param albumIds Optional. If specified, results will be filtered based on album id. This allows multiple, pipe delimited.
|
||||
* @param ids Optional. If specific items are needed, specify a list of item id\'s to retrieve. This allows multiple, comma delimited.
|
||||
* @param videoTypes Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimited.
|
||||
* @param minOfficialRating Optional filter by minimum official rating (PG, PG-13, TV-MA, etc).
|
||||
* @param isLocked Optional filter by items that are locked.
|
||||
* @param isPlaceHolder Optional filter by items that are placeholders.
|
||||
* @param hasOfficialRating Optional filter by items that have official ratings.
|
||||
* @param collapseBoxSetItems Whether or not to hide items behind their boxsets.
|
||||
* @param minWidth Optional. Filter by the minimum width of the item.
|
||||
* @param minHeight Optional. Filter by the minimum height of the item.
|
||||
* @param maxWidth Optional. Filter by the maximum width of the item.
|
||||
* @param maxHeight Optional. Filter by the maximum height of the item.
|
||||
* @param is3D Optional filter by items that are 3D, or not.
|
||||
* @param seriesStatus Optional filter by Series Status. Allows multiple, comma delimited.
|
||||
* @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string.
|
||||
* @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string.
|
||||
* @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string.
|
||||
* @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.
|
||||
* @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.
|
||||
* @param enableTotalRecordCount Optional. Enable the total record count.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
*/
|
||||
public async getTrailers (userId?: string, maxOfficialRating?: string, hasThemeSong?: boolean, hasThemeVideo?: boolean, hasSubtitles?: boolean, hasSpecialFeature?: boolean, hasTrailer?: boolean, adjacentTo?: string, parentIndexNumber?: number, hasParentalRating?: boolean, isHd?: boolean, is4K?: boolean, locationTypes?: Array<LocationType>, excludeLocationTypes?: Array<LocationType>, isMissing?: boolean, isUnaired?: boolean, minCommunityRating?: number, minCriticRating?: number, minPremiereDate?: Date, minDateLastSaved?: Date, minDateLastSavedForUser?: Date, maxPremiereDate?: Date, hasOverview?: boolean, hasImdbId?: boolean, hasTmdbId?: boolean, hasTvdbId?: boolean, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, excludeItemIds?: Array<string>, startIndex?: number, limit?: number, recursive?: boolean, searchTerm?: string, sortOrder?: Array<SortOrder>, parentId?: string, fields?: Array<ItemFields>, excludeItemTypes?: Array<BaseItemKind>, filters?: Array<ItemFilter>, isFavorite?: boolean, mediaTypes?: Array<string>, imageTypes?: Array<ImageType>, sortBy?: Array<string>, isPlayed?: boolean, genres?: Array<string>, officialRatings?: Array<string>, tags?: Array<string>, years?: Array<number>, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, person?: string, personIds?: Array<string>, personTypes?: Array<string>, studios?: Array<string>, artists?: Array<string>, excludeArtistIds?: Array<string>, artistIds?: Array<string>, albumArtistIds?: Array<string>, contributingArtistIds?: Array<string>, albums?: Array<string>, albumIds?: Array<string>, ids?: Array<string>, videoTypes?: Array<VideoType>, minOfficialRating?: string, isLocked?: boolean, isPlaceHolder?: boolean, hasOfficialRating?: boolean, collapseBoxSetItems?: boolean, minWidth?: number, minHeight?: number, maxWidth?: number, maxHeight?: number, is3D?: boolean, seriesStatus?: Array<SeriesStatus>, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, studioIds?: Array<string>, genreIds?: Array<string>, enableTotalRecordCount?: boolean, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Trailers';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (maxOfficialRating !== undefined) {
|
||||
localVarQueryParameters['maxOfficialRating'] = ObjectSerializer.serialize(maxOfficialRating, "string");
|
||||
}
|
||||
|
||||
if (hasThemeSong !== undefined) {
|
||||
localVarQueryParameters['hasThemeSong'] = ObjectSerializer.serialize(hasThemeSong, "boolean");
|
||||
}
|
||||
|
||||
if (hasThemeVideo !== undefined) {
|
||||
localVarQueryParameters['hasThemeVideo'] = ObjectSerializer.serialize(hasThemeVideo, "boolean");
|
||||
}
|
||||
|
||||
if (hasSubtitles !== undefined) {
|
||||
localVarQueryParameters['hasSubtitles'] = ObjectSerializer.serialize(hasSubtitles, "boolean");
|
||||
}
|
||||
|
||||
if (hasSpecialFeature !== undefined) {
|
||||
localVarQueryParameters['hasSpecialFeature'] = ObjectSerializer.serialize(hasSpecialFeature, "boolean");
|
||||
}
|
||||
|
||||
if (hasTrailer !== undefined) {
|
||||
localVarQueryParameters['hasTrailer'] = ObjectSerializer.serialize(hasTrailer, "boolean");
|
||||
}
|
||||
|
||||
if (adjacentTo !== undefined) {
|
||||
localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string");
|
||||
}
|
||||
|
||||
if (parentIndexNumber !== undefined) {
|
||||
localVarQueryParameters['parentIndexNumber'] = ObjectSerializer.serialize(parentIndexNumber, "number");
|
||||
}
|
||||
|
||||
if (hasParentalRating !== undefined) {
|
||||
localVarQueryParameters['hasParentalRating'] = ObjectSerializer.serialize(hasParentalRating, "boolean");
|
||||
}
|
||||
|
||||
if (isHd !== undefined) {
|
||||
localVarQueryParameters['isHd'] = ObjectSerializer.serialize(isHd, "boolean");
|
||||
}
|
||||
|
||||
if (is4K !== undefined) {
|
||||
localVarQueryParameters['is4K'] = ObjectSerializer.serialize(is4K, "boolean");
|
||||
}
|
||||
|
||||
if (locationTypes !== undefined) {
|
||||
localVarQueryParameters['locationTypes'] = ObjectSerializer.serialize(locationTypes, "Array<LocationType>");
|
||||
}
|
||||
|
||||
if (excludeLocationTypes !== undefined) {
|
||||
localVarQueryParameters['excludeLocationTypes'] = ObjectSerializer.serialize(excludeLocationTypes, "Array<LocationType>");
|
||||
}
|
||||
|
||||
if (isMissing !== undefined) {
|
||||
localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean");
|
||||
}
|
||||
|
||||
if (isUnaired !== undefined) {
|
||||
localVarQueryParameters['isUnaired'] = ObjectSerializer.serialize(isUnaired, "boolean");
|
||||
}
|
||||
|
||||
if (minCommunityRating !== undefined) {
|
||||
localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number");
|
||||
}
|
||||
|
||||
if (minCriticRating !== undefined) {
|
||||
localVarQueryParameters['minCriticRating'] = ObjectSerializer.serialize(minCriticRating, "number");
|
||||
}
|
||||
|
||||
if (minPremiereDate !== undefined) {
|
||||
localVarQueryParameters['minPremiereDate'] = ObjectSerializer.serialize(minPremiereDate, "Date");
|
||||
}
|
||||
|
||||
if (minDateLastSaved !== undefined) {
|
||||
localVarQueryParameters['minDateLastSaved'] = ObjectSerializer.serialize(minDateLastSaved, "Date");
|
||||
}
|
||||
|
||||
if (minDateLastSavedForUser !== undefined) {
|
||||
localVarQueryParameters['minDateLastSavedForUser'] = ObjectSerializer.serialize(minDateLastSavedForUser, "Date");
|
||||
}
|
||||
|
||||
if (maxPremiereDate !== undefined) {
|
||||
localVarQueryParameters['maxPremiereDate'] = ObjectSerializer.serialize(maxPremiereDate, "Date");
|
||||
}
|
||||
|
||||
if (hasOverview !== undefined) {
|
||||
localVarQueryParameters['hasOverview'] = ObjectSerializer.serialize(hasOverview, "boolean");
|
||||
}
|
||||
|
||||
if (hasImdbId !== undefined) {
|
||||
localVarQueryParameters['hasImdbId'] = ObjectSerializer.serialize(hasImdbId, "boolean");
|
||||
}
|
||||
|
||||
if (hasTmdbId !== undefined) {
|
||||
localVarQueryParameters['hasTmdbId'] = ObjectSerializer.serialize(hasTmdbId, "boolean");
|
||||
}
|
||||
|
||||
if (hasTvdbId !== undefined) {
|
||||
localVarQueryParameters['hasTvdbId'] = ObjectSerializer.serialize(hasTvdbId, "boolean");
|
||||
}
|
||||
|
||||
if (isMovie !== undefined) {
|
||||
localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean");
|
||||
}
|
||||
|
||||
if (isSeries !== undefined) {
|
||||
localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean");
|
||||
}
|
||||
|
||||
if (isNews !== undefined) {
|
||||
localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean");
|
||||
}
|
||||
|
||||
if (isKids !== undefined) {
|
||||
localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean");
|
||||
}
|
||||
|
||||
if (isSports !== undefined) {
|
||||
localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean");
|
||||
}
|
||||
|
||||
if (excludeItemIds !== undefined) {
|
||||
localVarQueryParameters['excludeItemIds'] = ObjectSerializer.serialize(excludeItemIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (recursive !== undefined) {
|
||||
localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean");
|
||||
}
|
||||
|
||||
if (searchTerm !== undefined) {
|
||||
localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string");
|
||||
}
|
||||
|
||||
if (sortOrder !== undefined) {
|
||||
localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array<SortOrder>");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (filters !== undefined) {
|
||||
localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array<ItemFilter>");
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean");
|
||||
}
|
||||
|
||||
if (mediaTypes !== undefined) {
|
||||
localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (imageTypes !== undefined) {
|
||||
localVarQueryParameters['imageTypes'] = ObjectSerializer.serialize(imageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array<string>");
|
||||
}
|
||||
|
||||
if (isPlayed !== undefined) {
|
||||
localVarQueryParameters['isPlayed'] = ObjectSerializer.serialize(isPlayed, "boolean");
|
||||
}
|
||||
|
||||
if (genres !== undefined) {
|
||||
localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array<string>");
|
||||
}
|
||||
|
||||
if (officialRatings !== undefined) {
|
||||
localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array<string>");
|
||||
}
|
||||
|
||||
if (tags !== undefined) {
|
||||
localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array<string>");
|
||||
}
|
||||
|
||||
if (years !== undefined) {
|
||||
localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array<number>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (person !== undefined) {
|
||||
localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string");
|
||||
}
|
||||
|
||||
if (personIds !== undefined) {
|
||||
localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (personTypes !== undefined) {
|
||||
localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (studios !== undefined) {
|
||||
localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array<string>");
|
||||
}
|
||||
|
||||
if (artists !== undefined) {
|
||||
localVarQueryParameters['artists'] = ObjectSerializer.serialize(artists, "Array<string>");
|
||||
}
|
||||
|
||||
if (excludeArtistIds !== undefined) {
|
||||
localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (artistIds !== undefined) {
|
||||
localVarQueryParameters['artistIds'] = ObjectSerializer.serialize(artistIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (albumArtistIds !== undefined) {
|
||||
localVarQueryParameters['albumArtistIds'] = ObjectSerializer.serialize(albumArtistIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (contributingArtistIds !== undefined) {
|
||||
localVarQueryParameters['contributingArtistIds'] = ObjectSerializer.serialize(contributingArtistIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (albums !== undefined) {
|
||||
localVarQueryParameters['albums'] = ObjectSerializer.serialize(albums, "Array<string>");
|
||||
}
|
||||
|
||||
if (albumIds !== undefined) {
|
||||
localVarQueryParameters['albumIds'] = ObjectSerializer.serialize(albumIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (ids !== undefined) {
|
||||
localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array<string>");
|
||||
}
|
||||
|
||||
if (videoTypes !== undefined) {
|
||||
localVarQueryParameters['videoTypes'] = ObjectSerializer.serialize(videoTypes, "Array<VideoType>");
|
||||
}
|
||||
|
||||
if (minOfficialRating !== undefined) {
|
||||
localVarQueryParameters['minOfficialRating'] = ObjectSerializer.serialize(minOfficialRating, "string");
|
||||
}
|
||||
|
||||
if (isLocked !== undefined) {
|
||||
localVarQueryParameters['isLocked'] = ObjectSerializer.serialize(isLocked, "boolean");
|
||||
}
|
||||
|
||||
if (isPlaceHolder !== undefined) {
|
||||
localVarQueryParameters['isPlaceHolder'] = ObjectSerializer.serialize(isPlaceHolder, "boolean");
|
||||
}
|
||||
|
||||
if (hasOfficialRating !== undefined) {
|
||||
localVarQueryParameters['hasOfficialRating'] = ObjectSerializer.serialize(hasOfficialRating, "boolean");
|
||||
}
|
||||
|
||||
if (collapseBoxSetItems !== undefined) {
|
||||
localVarQueryParameters['collapseBoxSetItems'] = ObjectSerializer.serialize(collapseBoxSetItems, "boolean");
|
||||
}
|
||||
|
||||
if (minWidth !== undefined) {
|
||||
localVarQueryParameters['minWidth'] = ObjectSerializer.serialize(minWidth, "number");
|
||||
}
|
||||
|
||||
if (minHeight !== undefined) {
|
||||
localVarQueryParameters['minHeight'] = ObjectSerializer.serialize(minHeight, "number");
|
||||
}
|
||||
|
||||
if (maxWidth !== undefined) {
|
||||
localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number");
|
||||
}
|
||||
|
||||
if (maxHeight !== undefined) {
|
||||
localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number");
|
||||
}
|
||||
|
||||
if (is3D !== undefined) {
|
||||
localVarQueryParameters['is3D'] = ObjectSerializer.serialize(is3D, "boolean");
|
||||
}
|
||||
|
||||
if (seriesStatus !== undefined) {
|
||||
localVarQueryParameters['seriesStatus'] = ObjectSerializer.serialize(seriesStatus, "Array<SeriesStatus>");
|
||||
}
|
||||
|
||||
if (nameStartsWithOrGreater !== undefined) {
|
||||
localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string");
|
||||
}
|
||||
|
||||
if (nameStartsWith !== undefined) {
|
||||
localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string");
|
||||
}
|
||||
|
||||
if (nameLessThan !== undefined) {
|
||||
localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string");
|
||||
}
|
||||
|
||||
if (studioIds !== undefined) {
|
||||
localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (genreIds !== undefined) {
|
||||
localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array<string>");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
599
jellyfin/api/tvShowsApi.ts
Normal file
599
jellyfin/api/tvShowsApi.ts
Normal file
@ -0,0 +1,599 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum TvShowsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class TvShowsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: TvShowsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[TvShowsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets episodes for a tv season.
|
||||
* @param seriesId The series id.
|
||||
* @param userId The user id.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.
|
||||
* @param season Optional filter by season number.
|
||||
* @param seasonId Optional. Filter by season id.
|
||||
* @param isMissing Optional. Filter by items that are missing episodes or not.
|
||||
* @param adjacentTo Optional. Return items that are siblings of a supplied item.
|
||||
* @param startItemId Optional. Skip through the list until a given item is found.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param enableImages Optional, include image information in output.
|
||||
* @param imageTypeLimit Optional, the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.
|
||||
*/
|
||||
public async getEpisodes (seriesId: string, userId?: string, fields?: Array<ItemFields>, season?: number, seasonId?: string, isMissing?: boolean, adjacentTo?: string, startItemId?: string, startIndex?: number, limit?: number, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, enableUserData?: boolean, sortBy?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Shows/{seriesId}/Episodes'
|
||||
.replace('{' + 'seriesId' + '}', encodeURIComponent(String(seriesId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'seriesId' is not null or undefined
|
||||
if (seriesId === null || seriesId === undefined) {
|
||||
throw new Error('Required parameter seriesId was null or undefined when calling getEpisodes.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (season !== undefined) {
|
||||
localVarQueryParameters['season'] = ObjectSerializer.serialize(season, "number");
|
||||
}
|
||||
|
||||
if (seasonId !== undefined) {
|
||||
localVarQueryParameters['seasonId'] = ObjectSerializer.serialize(seasonId, "string");
|
||||
}
|
||||
|
||||
if (isMissing !== undefined) {
|
||||
localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean");
|
||||
}
|
||||
|
||||
if (adjacentTo !== undefined) {
|
||||
localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string");
|
||||
}
|
||||
|
||||
if (startItemId !== undefined) {
|
||||
localVarQueryParameters['startItemId'] = ObjectSerializer.serialize(startItemId, "string");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a list of next up episodes.
|
||||
* @param userId The user id of the user to get the next up episodes for.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param seriesId Optional. Filter by series id.
|
||||
* @param parentId Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param nextUpDateCutoff Optional. Starting date of shows to show in Next Up section.
|
||||
* @param enableTotalRecordCount Whether to enable the total records count. Defaults to true.
|
||||
* @param disableFirstEpisode Whether to disable sending the first episode in a series as next up.
|
||||
* @param enableRewatching Whether to include watched episode in next up results.
|
||||
*/
|
||||
public async getNextUp (userId?: string, startIndex?: number, limit?: number, fields?: Array<ItemFields>, seriesId?: string, parentId?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, enableUserData?: boolean, nextUpDateCutoff?: Date, enableTotalRecordCount?: boolean, disableFirstEpisode?: boolean, enableRewatching?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Shows/NextUp';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (seriesId !== undefined) {
|
||||
localVarQueryParameters['seriesId'] = ObjectSerializer.serialize(seriesId, "string");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (nextUpDateCutoff !== undefined) {
|
||||
localVarQueryParameters['nextUpDateCutoff'] = ObjectSerializer.serialize(nextUpDateCutoff, "Date");
|
||||
}
|
||||
|
||||
if (enableTotalRecordCount !== undefined) {
|
||||
localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean");
|
||||
}
|
||||
|
||||
if (disableFirstEpisode !== undefined) {
|
||||
localVarQueryParameters['disableFirstEpisode'] = ObjectSerializer.serialize(disableFirstEpisode, "boolean");
|
||||
}
|
||||
|
||||
if (enableRewatching !== undefined) {
|
||||
localVarQueryParameters['enableRewatching'] = ObjectSerializer.serialize(enableRewatching, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets seasons for a tv series.
|
||||
* @param seriesId The series id.
|
||||
* @param userId The user id.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.
|
||||
* @param isSpecialSeason Optional. Filter by special season.
|
||||
* @param isMissing Optional. Filter by items that are missing episodes or not.
|
||||
* @param adjacentTo Optional. Return items that are siblings of a supplied item.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
*/
|
||||
public async getSeasons (seriesId: string, userId?: string, fields?: Array<ItemFields>, isSpecialSeason?: boolean, isMissing?: boolean, adjacentTo?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, enableUserData?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Shows/{seriesId}/Seasons'
|
||||
.replace('{' + 'seriesId' + '}', encodeURIComponent(String(seriesId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'seriesId' is not null or undefined
|
||||
if (seriesId === null || seriesId === undefined) {
|
||||
throw new Error('Required parameter seriesId was null or undefined when calling getSeasons.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (isSpecialSeason !== undefined) {
|
||||
localVarQueryParameters['isSpecialSeason'] = ObjectSerializer.serialize(isSpecialSeason, "boolean");
|
||||
}
|
||||
|
||||
if (isMissing !== undefined) {
|
||||
localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean");
|
||||
}
|
||||
|
||||
if (adjacentTo !== undefined) {
|
||||
localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets a list of upcoming episodes.
|
||||
* @param userId The user id of the user to get the upcoming episodes for.
|
||||
* @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param parentId Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
*/
|
||||
public async getUpcomingEpisodes (userId?: string, startIndex?: number, limit?: number, fields?: Array<ItemFields>, parentId?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, enableUserData?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Shows/Upcoming';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
405
jellyfin/api/universalAudioApi.ts
Normal file
405
jellyfin/api/universalAudioApi.ts
Normal file
@ -0,0 +1,405 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum UniversalAudioApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class UniversalAudioApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: UniversalAudioApiApiKeys, value: string) {
|
||||
(this.authentications as any)[UniversalAudioApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets an audio stream.
|
||||
* @param itemId The item id.
|
||||
* @param container Optional. The audio container.
|
||||
* @param mediaSourceId The media version id, if playing an alternate version.
|
||||
* @param deviceId The device id of the client requesting. Used to stop encoding processes when needed.
|
||||
* @param userId Optional. The user id.
|
||||
* @param audioCodec Optional. The audio codec to transcode to.
|
||||
* @param maxAudioChannels Optional. The maximum number of audio channels.
|
||||
* @param transcodingAudioChannels Optional. The number of how many audio channels to transcode to.
|
||||
* @param maxStreamingBitrate Optional. The maximum streaming bitrate.
|
||||
* @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.
|
||||
* @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.
|
||||
* @param transcodingContainer Optional. The container to transcode to.
|
||||
* @param transcodingProtocol Optional. The transcoding protocol.
|
||||
* @param maxAudioSampleRate Optional. The maximum audio sample rate.
|
||||
* @param maxAudioBitDepth Optional. The maximum audio bit depth.
|
||||
* @param enableRemoteMedia Optional. Whether to enable remote media.
|
||||
* @param breakOnNonKeyFrames Optional. Whether to break on non key frames.
|
||||
* @param enableRedirection Whether to enable redirection. Defaults to true.
|
||||
*/
|
||||
public async getUniversalAudioStream (itemId: string, container?: Array<string>, mediaSourceId?: string, deviceId?: string, userId?: string, audioCodec?: string, maxAudioChannels?: number, transcodingAudioChannels?: number, maxStreamingBitrate?: number, audioBitRate?: number, startTimeTicks?: number, transcodingContainer?: string, transcodingProtocol?: string, maxAudioSampleRate?: number, maxAudioBitDepth?: number, enableRemoteMedia?: boolean, breakOnNonKeyFrames?: boolean, enableRedirection?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Audio/{itemId}/universal'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['audio/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getUniversalAudioStream.');
|
||||
}
|
||||
|
||||
if (container !== undefined) {
|
||||
localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "Array<string>");
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (deviceId !== undefined) {
|
||||
localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (audioCodec !== undefined) {
|
||||
localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string");
|
||||
}
|
||||
|
||||
if (maxAudioChannels !== undefined) {
|
||||
localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number");
|
||||
}
|
||||
|
||||
if (transcodingAudioChannels !== undefined) {
|
||||
localVarQueryParameters['transcodingAudioChannels'] = ObjectSerializer.serialize(transcodingAudioChannels, "number");
|
||||
}
|
||||
|
||||
if (maxStreamingBitrate !== undefined) {
|
||||
localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number");
|
||||
}
|
||||
|
||||
if (audioBitRate !== undefined) {
|
||||
localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number");
|
||||
}
|
||||
|
||||
if (startTimeTicks !== undefined) {
|
||||
localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number");
|
||||
}
|
||||
|
||||
if (transcodingContainer !== undefined) {
|
||||
localVarQueryParameters['transcodingContainer'] = ObjectSerializer.serialize(transcodingContainer, "string");
|
||||
}
|
||||
|
||||
if (transcodingProtocol !== undefined) {
|
||||
localVarQueryParameters['transcodingProtocol'] = ObjectSerializer.serialize(transcodingProtocol, "string");
|
||||
}
|
||||
|
||||
if (maxAudioSampleRate !== undefined) {
|
||||
localVarQueryParameters['maxAudioSampleRate'] = ObjectSerializer.serialize(maxAudioSampleRate, "number");
|
||||
}
|
||||
|
||||
if (maxAudioBitDepth !== undefined) {
|
||||
localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number");
|
||||
}
|
||||
|
||||
if (enableRemoteMedia !== undefined) {
|
||||
localVarQueryParameters['enableRemoteMedia'] = ObjectSerializer.serialize(enableRemoteMedia, "boolean");
|
||||
}
|
||||
|
||||
if (breakOnNonKeyFrames !== undefined) {
|
||||
localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean");
|
||||
}
|
||||
|
||||
if (enableRedirection !== undefined) {
|
||||
localVarQueryParameters['enableRedirection'] = ObjectSerializer.serialize(enableRedirection, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets an audio stream.
|
||||
* @param itemId The item id.
|
||||
* @param container Optional. The audio container.
|
||||
* @param mediaSourceId The media version id, if playing an alternate version.
|
||||
* @param deviceId The device id of the client requesting. Used to stop encoding processes when needed.
|
||||
* @param userId Optional. The user id.
|
||||
* @param audioCodec Optional. The audio codec to transcode to.
|
||||
* @param maxAudioChannels Optional. The maximum number of audio channels.
|
||||
* @param transcodingAudioChannels Optional. The number of how many audio channels to transcode to.
|
||||
* @param maxStreamingBitrate Optional. The maximum streaming bitrate.
|
||||
* @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.
|
||||
* @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.
|
||||
* @param transcodingContainer Optional. The container to transcode to.
|
||||
* @param transcodingProtocol Optional. The transcoding protocol.
|
||||
* @param maxAudioSampleRate Optional. The maximum audio sample rate.
|
||||
* @param maxAudioBitDepth Optional. The maximum audio bit depth.
|
||||
* @param enableRemoteMedia Optional. Whether to enable remote media.
|
||||
* @param breakOnNonKeyFrames Optional. Whether to break on non key frames.
|
||||
* @param enableRedirection Whether to enable redirection. Defaults to true.
|
||||
*/
|
||||
public async headUniversalAudioStream (itemId: string, container?: Array<string>, mediaSourceId?: string, deviceId?: string, userId?: string, audioCodec?: string, maxAudioChannels?: number, transcodingAudioChannels?: number, maxStreamingBitrate?: number, audioBitRate?: number, startTimeTicks?: number, transcodingContainer?: string, transcodingProtocol?: string, maxAudioSampleRate?: number, maxAudioBitDepth?: number, enableRemoteMedia?: boolean, breakOnNonKeyFrames?: boolean, enableRedirection?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Audio/{itemId}/universal'
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['audio/*'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling headUniversalAudioStream.');
|
||||
}
|
||||
|
||||
if (container !== undefined) {
|
||||
localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "Array<string>");
|
||||
}
|
||||
|
||||
if (mediaSourceId !== undefined) {
|
||||
localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string");
|
||||
}
|
||||
|
||||
if (deviceId !== undefined) {
|
||||
localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (audioCodec !== undefined) {
|
||||
localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string");
|
||||
}
|
||||
|
||||
if (maxAudioChannels !== undefined) {
|
||||
localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number");
|
||||
}
|
||||
|
||||
if (transcodingAudioChannels !== undefined) {
|
||||
localVarQueryParameters['transcodingAudioChannels'] = ObjectSerializer.serialize(transcodingAudioChannels, "number");
|
||||
}
|
||||
|
||||
if (maxStreamingBitrate !== undefined) {
|
||||
localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number");
|
||||
}
|
||||
|
||||
if (audioBitRate !== undefined) {
|
||||
localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number");
|
||||
}
|
||||
|
||||
if (startTimeTicks !== undefined) {
|
||||
localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number");
|
||||
}
|
||||
|
||||
if (transcodingContainer !== undefined) {
|
||||
localVarQueryParameters['transcodingContainer'] = ObjectSerializer.serialize(transcodingContainer, "string");
|
||||
}
|
||||
|
||||
if (transcodingProtocol !== undefined) {
|
||||
localVarQueryParameters['transcodingProtocol'] = ObjectSerializer.serialize(transcodingProtocol, "string");
|
||||
}
|
||||
|
||||
if (maxAudioSampleRate !== undefined) {
|
||||
localVarQueryParameters['maxAudioSampleRate'] = ObjectSerializer.serialize(maxAudioSampleRate, "number");
|
||||
}
|
||||
|
||||
if (maxAudioBitDepth !== undefined) {
|
||||
localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number");
|
||||
}
|
||||
|
||||
if (enableRemoteMedia !== undefined) {
|
||||
localVarQueryParameters['enableRemoteMedia'] = ObjectSerializer.serialize(enableRemoteMedia, "boolean");
|
||||
}
|
||||
|
||||
if (breakOnNonKeyFrames !== undefined) {
|
||||
localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean");
|
||||
}
|
||||
|
||||
if (enableRedirection !== undefined) {
|
||||
localVarQueryParameters['enableRedirection'] = ObjectSerializer.serialize(enableRedirection, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'HEAD',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1273
jellyfin/api/userApi.ts
Normal file
1273
jellyfin/api/userApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
928
jellyfin/api/userLibraryApi.ts
Normal file
928
jellyfin/api/userLibraryApi.ts
Normal file
@ -0,0 +1,928 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDto } from '../model/baseItemDto';
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { UserItemDataDto } from '../model/userItemDataDto';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum UserLibraryApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class UserLibraryApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: UserLibraryApiApiKeys, value: string) {
|
||||
(this.authentications as any)[UserLibraryApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Deletes a user\'s saved personal rating for an item.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async deleteUserItemRating (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/Rating'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling deleteUserItemRating.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling deleteUserItemRating.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "UserItemDataDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets intros to play before the main media item plays.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async getIntros (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/Intros'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getIntros.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getIntros.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets an item from a user\'s library.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async getItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getItem.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets latest media.
|
||||
* @param userId User id.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
|
||||
* @param isPlayed Filter by items that are played, or not.
|
||||
* @param enableImages Optional. include image information in output.
|
||||
* @param imageTypeLimit Optional. the max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param enableUserData Optional. include user data.
|
||||
* @param limit Return item limit.
|
||||
* @param groupItems Whether or not to group items into a parent container.
|
||||
*/
|
||||
public async getLatestMedia (userId: string, parentId?: string, fields?: Array<ItemFields>, includeItemTypes?: Array<BaseItemKind>, isPlayed?: boolean, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, enableUserData?: boolean, limit?: number, groupItems?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<BaseItemDto>; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/Latest'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getLatestMedia.');
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (isPlayed !== undefined) {
|
||||
localVarQueryParameters['isPlayed'] = ObjectSerializer.serialize(isPlayed, "boolean");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (groupItems !== undefined) {
|
||||
localVarQueryParameters['groupItems'] = ObjectSerializer.serialize(groupItems, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<BaseItemDto>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<BaseItemDto>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets local trailers for an item.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async getLocalTrailers (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<BaseItemDto>; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/LocalTrailers'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getLocalTrailers.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getLocalTrailers.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<BaseItemDto>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<BaseItemDto>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets the root folder from a user\'s library.
|
||||
* @param userId User id.
|
||||
*/
|
||||
public async getRootFolder (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/Root'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getRootFolder.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Gets special features for an item.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async getSpecialFeatures (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<BaseItemDto>; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/SpecialFeatures'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getSpecialFeatures.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling getSpecialFeatures.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<BaseItemDto>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<BaseItemDto>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Marks an item as a favorite.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async markFavoriteItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/FavoriteItems/{itemId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling markFavoriteItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling markFavoriteItem.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "UserItemDataDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Unmarks item as a favorite.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
*/
|
||||
public async unmarkFavoriteItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/FavoriteItems/{itemId}'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling unmarkFavoriteItem.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling unmarkFavoriteItem.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "UserItemDataDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Updates a user\'s rating for an item.
|
||||
* @param userId User id.
|
||||
* @param itemId Item id.
|
||||
* @param likes Whether this M:Jellyfin.Api.Controllers.UserLibraryController.UpdateUserItemRating(System.Guid,System.Guid,System.Nullable{System.Boolean}) is likes.
|
||||
*/
|
||||
public async updateUserItemRating (userId: string, itemId: string, likes?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/Rating'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
||||
.replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling updateUserItemRating.');
|
||||
}
|
||||
|
||||
// verify required parameter 'itemId' is not null or undefined
|
||||
if (itemId === null || itemId === undefined) {
|
||||
throw new Error('Required parameter itemId was null or undefined when calling updateUserItemRating.');
|
||||
}
|
||||
|
||||
if (likes !== undefined) {
|
||||
localVarQueryParameters['likes'] = ObjectSerializer.serialize(likes, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "UserItemDataDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
253
jellyfin/api/userViewsApi.ts
Normal file
253
jellyfin/api/userViewsApi.ts
Normal file
@ -0,0 +1,253 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { SpecialViewOptionDto } from '../model/specialViewOptionDto';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum UserViewsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class UserViewsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: UserViewsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[UserViewsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get user view grouping options.
|
||||
* @param userId User id.
|
||||
*/
|
||||
public async getGroupingOptions (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<SpecialViewOptionDto>; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/GroupingOptions'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getGroupingOptions.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Array<SpecialViewOptionDto>; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Array<SpecialViewOptionDto>");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get user views.
|
||||
* @param userId User id.
|
||||
* @param includeExternalContent Whether or not to include external views such as channels or live tv.
|
||||
* @param presetViews Preset views.
|
||||
* @param includeHidden Whether or not to include hidden content.
|
||||
*/
|
||||
public async getUserViews (userId: string, includeExternalContent?: boolean, presetViews?: Array<string>, includeHidden?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Users/{userId}/Views'
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'userId' is not null or undefined
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling getUserViews.');
|
||||
}
|
||||
|
||||
if (includeExternalContent !== undefined) {
|
||||
localVarQueryParameters['includeExternalContent'] = ObjectSerializer.serialize(includeExternalContent, "boolean");
|
||||
}
|
||||
|
||||
if (presetViews !== undefined) {
|
||||
localVarQueryParameters['presetViews'] = ObjectSerializer.serialize(presetViews, "Array<string>");
|
||||
}
|
||||
|
||||
if (includeHidden !== undefined) {
|
||||
localVarQueryParameters['includeHidden'] = ObjectSerializer.serialize(includeHidden, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
175
jellyfin/api/videoAttachmentsApi.ts
Normal file
175
jellyfin/api/videoAttachmentsApi.ts
Normal file
@ -0,0 +1,175 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum VideoAttachmentsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class VideoAttachmentsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: VideoAttachmentsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[VideoAttachmentsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get video attachment.
|
||||
* @param videoId Video ID.
|
||||
* @param mediaSourceId Media Source ID.
|
||||
* @param index Attachment Index.
|
||||
*/
|
||||
public async getAttachment (videoId: string, mediaSourceId: string, index: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
|
||||
const localVarPath = this.basePath + '/Videos/{videoId}/{mediaSourceId}/Attachments/{index}'
|
||||
.replace('{' + 'videoId' + '}', encodeURIComponent(String(videoId)))
|
||||
.replace('{' + 'mediaSourceId' + '}', encodeURIComponent(String(mediaSourceId)))
|
||||
.replace('{' + 'index' + '}', encodeURIComponent(String(index)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'videoId' is not null or undefined
|
||||
if (videoId === null || videoId === undefined) {
|
||||
throw new Error('Required parameter videoId was null or undefined when calling getAttachment.');
|
||||
}
|
||||
|
||||
// verify required parameter 'mediaSourceId' is not null or undefined
|
||||
if (mediaSourceId === null || mediaSourceId === undefined) {
|
||||
throw new Error('Required parameter mediaSourceId was null or undefined when calling getAttachment.');
|
||||
}
|
||||
|
||||
// verify required parameter 'index' is not null or undefined
|
||||
if (index === null || index === undefined) {
|
||||
throw new Error('Required parameter index was null or undefined when calling getAttachment.');
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
encoding: null,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "Buffer");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
1597
jellyfin/api/videosApi.ts
Normal file
1597
jellyfin/api/videosApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
315
jellyfin/api/yearsApi.ts
Normal file
315
jellyfin/api/yearsApi.ts
Normal file
@ -0,0 +1,315 @@
|
||||
/**
|
||||
* 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 localVarRequest from 'request';
|
||||
import http from 'http';
|
||||
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BaseItemDto } from '../model/baseItemDto';
|
||||
import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult';
|
||||
import { BaseItemKind } from '../model/baseItemKind';
|
||||
import { ImageType } from '../model/imageType';
|
||||
import { ItemFields } from '../model/itemFields';
|
||||
import { ProblemDetails } from '../model/problemDetails';
|
||||
import { SortOrder } from '../model/sortOrder';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
|
||||
import { HttpError, RequestFile } from './apis';
|
||||
|
||||
let defaultBasePath = 'http://localhost';
|
||||
|
||||
// ===============================================
|
||||
// This file is autogenerated - Please do not edit
|
||||
// ===============================================
|
||||
|
||||
export enum YearsApiApiKeys {
|
||||
CustomAuthentication,
|
||||
}
|
||||
|
||||
export class YearsApi {
|
||||
protected _basePath = defaultBasePath;
|
||||
protected _defaultHeaders : any = {};
|
||||
protected _useQuerystring : boolean = false;
|
||||
|
||||
protected authentications = {
|
||||
'default': <Authentication>new VoidAuth(),
|
||||
'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'),
|
||||
}
|
||||
|
||||
protected interceptors: Interceptor[] = [];
|
||||
|
||||
constructor(basePath?: string);
|
||||
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
||||
if (password) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
if (basePathOrUsername) {
|
||||
this.basePath = basePathOrUsername
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set useQuerystring(value: boolean) {
|
||||
this._useQuerystring = value;
|
||||
}
|
||||
|
||||
set basePath(basePath: string) {
|
||||
this._basePath = basePath;
|
||||
}
|
||||
|
||||
set defaultHeaders(defaultHeaders: any) {
|
||||
this._defaultHeaders = defaultHeaders;
|
||||
}
|
||||
|
||||
get defaultHeaders() {
|
||||
return this._defaultHeaders;
|
||||
}
|
||||
|
||||
get basePath() {
|
||||
return this._basePath;
|
||||
}
|
||||
|
||||
public setDefaultAuthentication(auth: Authentication) {
|
||||
this.authentications.default = auth;
|
||||
}
|
||||
|
||||
public setApiKey(key: YearsApiApiKeys, value: string) {
|
||||
(this.authentications as any)[YearsApiApiKeys[key]].apiKey = value;
|
||||
}
|
||||
|
||||
public addInterceptor(interceptor: Interceptor) {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Gets a year.
|
||||
* @param year The year.
|
||||
* @param userId Optional. Filter by user id, and attach user data.
|
||||
*/
|
||||
public async getYear (year: number, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> {
|
||||
const localVarPath = this.basePath + '/Years/{year}'
|
||||
.replace('{' + 'year' + '}', encodeURIComponent(String(year)));
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
// verify required parameter 'year' is not null or undefined
|
||||
if (year === null || year === undefined) {
|
||||
throw new Error('Required parameter year was null or undefined when calling getYear.');
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDto");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary Get years.
|
||||
* @param startIndex Skips over a given number of items within the results. Use for paging.
|
||||
* @param limit Optional. The maximum number of records to return.
|
||||
* @param sortOrder Sort Order - Ascending,Descending.
|
||||
* @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root.
|
||||
* @param fields Optional. Specify additional fields of information to return in the output.
|
||||
* @param excludeItemTypes Optional. If specified, results will be excluded based on item type. This allows multiple, comma delimited.
|
||||
* @param includeItemTypes Optional. If specified, results will be included based on item type. This allows multiple, comma delimited.
|
||||
* @param mediaTypes Optional. Filter by MediaType. Allows multiple, comma delimited.
|
||||
* @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.
|
||||
* @param enableUserData Optional. Include user data.
|
||||
* @param imageTypeLimit Optional. The max number of images to return, per image type.
|
||||
* @param enableImageTypes Optional. The image types to include in the output.
|
||||
* @param userId User Id.
|
||||
* @param recursive Search recursively.
|
||||
* @param enableImages Optional. Include image information in output.
|
||||
*/
|
||||
public async getYears (startIndex?: number, limit?: number, sortOrder?: Array<SortOrder>, parentId?: string, fields?: Array<ItemFields>, excludeItemTypes?: Array<BaseItemKind>, includeItemTypes?: Array<BaseItemKind>, mediaTypes?: Array<string>, sortBy?: Array<string>, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array<ImageType>, userId?: string, recursive?: boolean, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> {
|
||||
const localVarPath = this.basePath + '/Years';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
if (startIndex !== undefined) {
|
||||
localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number");
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
||||
}
|
||||
|
||||
if (sortOrder !== undefined) {
|
||||
localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array<SortOrder>");
|
||||
}
|
||||
|
||||
if (parentId !== undefined) {
|
||||
localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string");
|
||||
}
|
||||
|
||||
if (fields !== undefined) {
|
||||
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<ItemFields>");
|
||||
}
|
||||
|
||||
if (excludeItemTypes !== undefined) {
|
||||
localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (includeItemTypes !== undefined) {
|
||||
localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array<BaseItemKind>");
|
||||
}
|
||||
|
||||
if (mediaTypes !== undefined) {
|
||||
localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array<string>");
|
||||
}
|
||||
|
||||
if (sortBy !== undefined) {
|
||||
localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array<string>");
|
||||
}
|
||||
|
||||
if (enableUserData !== undefined) {
|
||||
localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean");
|
||||
}
|
||||
|
||||
if (imageTypeLimit !== undefined) {
|
||||
localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number");
|
||||
}
|
||||
|
||||
if (enableImageTypes !== undefined) {
|
||||
localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array<ImageType>");
|
||||
}
|
||||
|
||||
if (userId !== undefined) {
|
||||
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
||||
}
|
||||
|
||||
if (recursive !== undefined) {
|
||||
localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean");
|
||||
}
|
||||
|
||||
if (enableImages !== undefined) {
|
||||
localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean");
|
||||
}
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'GET',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.CustomAuthentication.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
57
jellyfin/git_push.sh
Normal file
57
jellyfin/git_push.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
73
jellyfin/model/accessSchedule.ts
Normal file
73
jellyfin/model/accessSchedule.ts
Normal file
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { DynamicDayOfWeek } from './dynamicDayOfWeek';
|
||||
|
||||
/**
|
||||
* An entity representing a user\'s access schedule.
|
||||
*/
|
||||
export class AccessSchedule {
|
||||
/**
|
||||
* Gets the id of this instance.
|
||||
*/
|
||||
'id'?: number;
|
||||
/**
|
||||
* Gets the id of the associated user.
|
||||
*/
|
||||
'userId'?: string;
|
||||
'dayOfWeek'?: DynamicDayOfWeek;
|
||||
/**
|
||||
* Gets or sets the start hour.
|
||||
*/
|
||||
'startHour'?: number;
|
||||
/**
|
||||
* Gets or sets the end hour.
|
||||
*/
|
||||
'endHour'?: number;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "Id",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "userId",
|
||||
"baseName": "UserId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "dayOfWeek",
|
||||
"baseName": "DayOfWeek",
|
||||
"type": "DynamicDayOfWeek"
|
||||
},
|
||||
{
|
||||
"name": "startHour",
|
||||
"baseName": "StartHour",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "endHour",
|
||||
"baseName": "EndHour",
|
||||
"type": "number"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AccessSchedule.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AccessSchedule {
|
||||
}
|
118
jellyfin/model/activityLogEntry.ts
Normal file
118
jellyfin/model/activityLogEntry.ts
Normal file
@ -0,0 +1,118 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { LogLevel } from './logLevel';
|
||||
|
||||
/**
|
||||
* An activity log entry.
|
||||
*/
|
||||
export class ActivityLogEntry {
|
||||
/**
|
||||
* Gets or sets the identifier.
|
||||
*/
|
||||
'id'?: number;
|
||||
/**
|
||||
* Gets or sets the name.
|
||||
*/
|
||||
'name'?: string;
|
||||
/**
|
||||
* Gets or sets the overview.
|
||||
*/
|
||||
'overview'?: string | null;
|
||||
/**
|
||||
* Gets or sets the short overview.
|
||||
*/
|
||||
'shortOverview'?: string | null;
|
||||
/**
|
||||
* Gets or sets the type.
|
||||
*/
|
||||
'type'?: string;
|
||||
/**
|
||||
* Gets or sets the item identifier.
|
||||
*/
|
||||
'itemId'?: string | null;
|
||||
/**
|
||||
* Gets or sets the date.
|
||||
*/
|
||||
'date'?: Date;
|
||||
/**
|
||||
* Gets or sets the user identifier.
|
||||
*/
|
||||
'userId'?: string;
|
||||
/**
|
||||
* Gets or sets the user primary image tag.
|
||||
*/
|
||||
'userPrimaryImageTag'?: string | null;
|
||||
'severity'?: LogLevel;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "Id",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "overview",
|
||||
"baseName": "Overview",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "shortOverview",
|
||||
"baseName": "ShortOverview",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "Type",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "itemId",
|
||||
"baseName": "ItemId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"baseName": "Date",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "userId",
|
||||
"baseName": "UserId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "userPrimaryImageTag",
|
||||
"baseName": "UserPrimaryImageTag",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "severity",
|
||||
"baseName": "Severity",
|
||||
"type": "LogLevel"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ActivityLogEntry.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace ActivityLogEntry {
|
||||
}
|
53
jellyfin/model/activityLogEntryQueryResult.ts
Normal file
53
jellyfin/model/activityLogEntryQueryResult.ts
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { ActivityLogEntry } from './activityLogEntry';
|
||||
|
||||
export class ActivityLogEntryQueryResult {
|
||||
/**
|
||||
* Gets or sets the items.
|
||||
*/
|
||||
'items'?: Array<ActivityLogEntry> | null;
|
||||
/**
|
||||
* Gets or sets the total number of records available.
|
||||
*/
|
||||
'totalRecordCount'?: number;
|
||||
/**
|
||||
* Gets or sets the index of the first record in Items.
|
||||
*/
|
||||
'startIndex'?: number;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "items",
|
||||
"baseName": "Items",
|
||||
"type": "Array<ActivityLogEntry>"
|
||||
},
|
||||
{
|
||||
"name": "totalRecordCount",
|
||||
"baseName": "TotalRecordCount",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "startIndex",
|
||||
"baseName": "StartIndex",
|
||||
"type": "number"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ActivityLogEntryQueryResult.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
134
jellyfin/model/addListingProviderRequest.ts
Normal file
134
jellyfin/model/addListingProviderRequest.ts
Normal file
@ -0,0 +1,134 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { NameValuePair } from './nameValuePair';
|
||||
|
||||
export class AddListingProviderRequest {
|
||||
'id'?: string | null;
|
||||
'type'?: string | null;
|
||||
'username'?: string | null;
|
||||
'password'?: string | null;
|
||||
'listingsId'?: string | null;
|
||||
'zipCode'?: string | null;
|
||||
'country'?: string | null;
|
||||
'path'?: string | null;
|
||||
'enabledTuners'?: Array<string> | null;
|
||||
'enableAllTuners'?: boolean;
|
||||
'newsCategories'?: Array<string> | null;
|
||||
'sportsCategories'?: Array<string> | null;
|
||||
'kidsCategories'?: Array<string> | null;
|
||||
'movieCategories'?: Array<string> | null;
|
||||
'channelMappings'?: Array<NameValuePair> | null;
|
||||
'moviePrefix'?: string | null;
|
||||
'preferredLanguage'?: string | null;
|
||||
'userAgent'?: string | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "Id",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "Type",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "username",
|
||||
"baseName": "Username",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"baseName": "Password",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "listingsId",
|
||||
"baseName": "ListingsId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "zipCode",
|
||||
"baseName": "ZipCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "country",
|
||||
"baseName": "Country",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"baseName": "Path",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enabledTuners",
|
||||
"baseName": "EnabledTuners",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "enableAllTuners",
|
||||
"baseName": "EnableAllTuners",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "newsCategories",
|
||||
"baseName": "NewsCategories",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "sportsCategories",
|
||||
"baseName": "SportsCategories",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "kidsCategories",
|
||||
"baseName": "KidsCategories",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "movieCategories",
|
||||
"baseName": "MovieCategories",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "channelMappings",
|
||||
"baseName": "ChannelMappings",
|
||||
"type": "Array<NameValuePair>"
|
||||
},
|
||||
{
|
||||
"name": "moviePrefix",
|
||||
"baseName": "MoviePrefix",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "preferredLanguage",
|
||||
"baseName": "PreferredLanguage",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "userAgent",
|
||||
"baseName": "UserAgent",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AddListingProviderRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
53
jellyfin/model/addMediaPathRequest.ts
Normal file
53
jellyfin/model/addMediaPathRequest.ts
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { MediaPathDtoPathInfo } from './mediaPathDtoPathInfo';
|
||||
|
||||
/**
|
||||
* Media Path dto.
|
||||
*/
|
||||
export class AddMediaPathRequest {
|
||||
/**
|
||||
* Gets or sets the name of the library.
|
||||
*/
|
||||
'name': string;
|
||||
/**
|
||||
* Gets or sets the path to add.
|
||||
*/
|
||||
'path'?: string | null;
|
||||
'pathInfo'?: MediaPathDtoPathInfo | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"baseName": "Path",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "pathInfo",
|
||||
"baseName": "PathInfo",
|
||||
"type": "MediaPathDtoPathInfo"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AddMediaPathRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
91
jellyfin/model/addTunerHostRequest.ts
Normal file
91
jellyfin/model/addTunerHostRequest.ts
Normal file
@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
export class AddTunerHostRequest {
|
||||
'id'?: string | null;
|
||||
'url'?: string | null;
|
||||
'type'?: string | null;
|
||||
'deviceId'?: string | null;
|
||||
'friendlyName'?: string | null;
|
||||
'importFavoritesOnly'?: boolean;
|
||||
'allowHWTranscoding'?: boolean;
|
||||
'enableStreamLooping'?: boolean;
|
||||
'source'?: string | null;
|
||||
'tunerCount'?: number;
|
||||
'userAgent'?: string | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "Id",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"baseName": "Url",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "Type",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "deviceId",
|
||||
"baseName": "DeviceId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "friendlyName",
|
||||
"baseName": "FriendlyName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "importFavoritesOnly",
|
||||
"baseName": "ImportFavoritesOnly",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "allowHWTranscoding",
|
||||
"baseName": "AllowHWTranscoding",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableStreamLooping",
|
||||
"baseName": "EnableStreamLooping",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "source",
|
||||
"baseName": "Source",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "tunerCount",
|
||||
"baseName": "TunerCount",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "userAgent",
|
||||
"baseName": "UserAgent",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AddTunerHostRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
35
jellyfin/model/addVirtualFolderDto.ts
Normal file
35
jellyfin/model/addVirtualFolderDto.ts
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { AddVirtualFolderDtoLibraryOptions } from './addVirtualFolderDtoLibraryOptions';
|
||||
|
||||
/**
|
||||
* Add virtual folder dto.
|
||||
*/
|
||||
export class AddVirtualFolderDto {
|
||||
'libraryOptions'?: AddVirtualFolderDtoLibraryOptions | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "libraryOptions",
|
||||
"baseName": "LibraryOptions",
|
||||
"type": "AddVirtualFolderDtoLibraryOptions"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AddVirtualFolderDto.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
201
jellyfin/model/addVirtualFolderDtoLibraryOptions.ts
Normal file
201
jellyfin/model/addVirtualFolderDtoLibraryOptions.ts
Normal file
@ -0,0 +1,201 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { EmbeddedSubtitleOptions } from './embeddedSubtitleOptions';
|
||||
import { MediaPathInfo } from './mediaPathInfo';
|
||||
import { TypeOptions } from './typeOptions';
|
||||
|
||||
/**
|
||||
* Gets or sets library options.
|
||||
*/
|
||||
export class AddVirtualFolderDtoLibraryOptions {
|
||||
'enablePhotos'?: boolean;
|
||||
'enableRealtimeMonitor'?: boolean;
|
||||
'enableChapterImageExtraction'?: boolean;
|
||||
'extractChapterImagesDuringLibraryScan'?: boolean;
|
||||
'pathInfos'?: Array<MediaPathInfo>;
|
||||
'saveLocalMetadata'?: boolean;
|
||||
'enableInternetProviders'?: boolean;
|
||||
'enableAutomaticSeriesGrouping'?: boolean;
|
||||
'enableEmbeddedTitles'?: boolean;
|
||||
'enableEmbeddedEpisodeInfos'?: boolean;
|
||||
'automaticRefreshIntervalDays'?: number;
|
||||
/**
|
||||
* Gets or sets the preferred metadata language.
|
||||
*/
|
||||
'preferredMetadataLanguage'?: string | null;
|
||||
/**
|
||||
* Gets or sets the metadata country code.
|
||||
*/
|
||||
'metadataCountryCode'?: string | null;
|
||||
'seasonZeroDisplayName'?: string;
|
||||
'metadataSavers'?: Array<string> | null;
|
||||
'disabledLocalMetadataReaders'?: Array<string>;
|
||||
'localMetadataReaderOrder'?: Array<string> | null;
|
||||
'disabledSubtitleFetchers'?: Array<string>;
|
||||
'subtitleFetcherOrder'?: Array<string>;
|
||||
'skipSubtitlesIfEmbeddedSubtitlesPresent'?: boolean;
|
||||
'skipSubtitlesIfAudioTrackMatches'?: boolean;
|
||||
'subtitleDownloadLanguages'?: Array<string> | null;
|
||||
'requirePerfectSubtitleMatch'?: boolean;
|
||||
'saveSubtitlesWithMedia'?: boolean;
|
||||
'automaticallyAddToCollection'?: boolean;
|
||||
'allowEmbeddedSubtitles'?: EmbeddedSubtitleOptions;
|
||||
'typeOptions'?: Array<TypeOptions>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "enablePhotos",
|
||||
"baseName": "EnablePhotos",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableRealtimeMonitor",
|
||||
"baseName": "EnableRealtimeMonitor",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableChapterImageExtraction",
|
||||
"baseName": "EnableChapterImageExtraction",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "extractChapterImagesDuringLibraryScan",
|
||||
"baseName": "ExtractChapterImagesDuringLibraryScan",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "pathInfos",
|
||||
"baseName": "PathInfos",
|
||||
"type": "Array<MediaPathInfo>"
|
||||
},
|
||||
{
|
||||
"name": "saveLocalMetadata",
|
||||
"baseName": "SaveLocalMetadata",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableInternetProviders",
|
||||
"baseName": "EnableInternetProviders",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableAutomaticSeriesGrouping",
|
||||
"baseName": "EnableAutomaticSeriesGrouping",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableEmbeddedTitles",
|
||||
"baseName": "EnableEmbeddedTitles",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableEmbeddedEpisodeInfos",
|
||||
"baseName": "EnableEmbeddedEpisodeInfos",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "automaticRefreshIntervalDays",
|
||||
"baseName": "AutomaticRefreshIntervalDays",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "preferredMetadataLanguage",
|
||||
"baseName": "PreferredMetadataLanguage",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadataCountryCode",
|
||||
"baseName": "MetadataCountryCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "seasonZeroDisplayName",
|
||||
"baseName": "SeasonZeroDisplayName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadataSavers",
|
||||
"baseName": "MetadataSavers",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "disabledLocalMetadataReaders",
|
||||
"baseName": "DisabledLocalMetadataReaders",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "localMetadataReaderOrder",
|
||||
"baseName": "LocalMetadataReaderOrder",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "disabledSubtitleFetchers",
|
||||
"baseName": "DisabledSubtitleFetchers",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "subtitleFetcherOrder",
|
||||
"baseName": "SubtitleFetcherOrder",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "skipSubtitlesIfEmbeddedSubtitlesPresent",
|
||||
"baseName": "SkipSubtitlesIfEmbeddedSubtitlesPresent",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "skipSubtitlesIfAudioTrackMatches",
|
||||
"baseName": "SkipSubtitlesIfAudioTrackMatches",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "subtitleDownloadLanguages",
|
||||
"baseName": "SubtitleDownloadLanguages",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "requirePerfectSubtitleMatch",
|
||||
"baseName": "RequirePerfectSubtitleMatch",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "saveSubtitlesWithMedia",
|
||||
"baseName": "SaveSubtitlesWithMedia",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "automaticallyAddToCollection",
|
||||
"baseName": "AutomaticallyAddToCollection",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "allowEmbeddedSubtitles",
|
||||
"baseName": "AllowEmbeddedSubtitles",
|
||||
"type": "EmbeddedSubtitleOptions"
|
||||
},
|
||||
{
|
||||
"name": "typeOptions",
|
||||
"baseName": "TypeOptions",
|
||||
"type": "Array<TypeOptions>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AddVirtualFolderDtoLibraryOptions.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AddVirtualFolderDtoLibraryOptions {
|
||||
}
|
35
jellyfin/model/addVirtualFolderRequest.ts
Normal file
35
jellyfin/model/addVirtualFolderRequest.ts
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { AddVirtualFolderDtoLibraryOptions } from './addVirtualFolderDtoLibraryOptions';
|
||||
|
||||
/**
|
||||
* Add virtual folder dto.
|
||||
*/
|
||||
export class AddVirtualFolderRequest {
|
||||
'libraryOptions'?: AddVirtualFolderDtoLibraryOptions | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "libraryOptions",
|
||||
"baseName": "LibraryOptions",
|
||||
"type": "AddVirtualFolderDtoLibraryOptions"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AddVirtualFolderRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
64
jellyfin/model/adminNotificationDto.ts
Normal file
64
jellyfin/model/adminNotificationDto.ts
Normal file
@ -0,0 +1,64 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { NotificationLevel } from './notificationLevel';
|
||||
|
||||
/**
|
||||
* The admin notification dto.
|
||||
*/
|
||||
export class AdminNotificationDto {
|
||||
/**
|
||||
* Gets or sets the notification name.
|
||||
*/
|
||||
'name'?: string | null;
|
||||
/**
|
||||
* Gets or sets the notification description.
|
||||
*/
|
||||
'description'?: string | null;
|
||||
'notificationLevel'?: NotificationLevel | null;
|
||||
/**
|
||||
* Gets or sets the notification url.
|
||||
*/
|
||||
'url'?: string | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"baseName": "Description",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "notificationLevel",
|
||||
"baseName": "NotificationLevel",
|
||||
"type": "NotificationLevel"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"baseName": "Url",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdminNotificationDto.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AdminNotificationDto {
|
||||
}
|
137
jellyfin/model/albumInfo.ts
Normal file
137
jellyfin/model/albumInfo.ts
Normal file
@ -0,0 +1,137 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { SongInfo } from './songInfo';
|
||||
|
||||
export class AlbumInfo {
|
||||
/**
|
||||
* Gets or sets the name.
|
||||
*/
|
||||
'name'?: string | null;
|
||||
/**
|
||||
* Gets or sets the original title.
|
||||
*/
|
||||
'originalTitle'?: string | null;
|
||||
/**
|
||||
* Gets or sets the path.
|
||||
*/
|
||||
'path'?: string | null;
|
||||
/**
|
||||
* Gets or sets the metadata language.
|
||||
*/
|
||||
'metadataLanguage'?: string | null;
|
||||
/**
|
||||
* Gets or sets the metadata country code.
|
||||
*/
|
||||
'metadataCountryCode'?: string | null;
|
||||
/**
|
||||
* Gets or sets the provider ids.
|
||||
*/
|
||||
'providerIds'?: { [key: string]: string; } | null;
|
||||
/**
|
||||
* Gets or sets the year.
|
||||
*/
|
||||
'year'?: number | null;
|
||||
'indexNumber'?: number | null;
|
||||
'parentIndexNumber'?: number | null;
|
||||
'premiereDate'?: Date | null;
|
||||
'isAutomated'?: boolean;
|
||||
/**
|
||||
* Gets or sets the album artist.
|
||||
*/
|
||||
'albumArtists'?: Array<string>;
|
||||
/**
|
||||
* Gets or sets the artist provider ids.
|
||||
*/
|
||||
'artistProviderIds'?: { [key: string]: string; };
|
||||
'songInfos'?: Array<SongInfo>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "originalTitle",
|
||||
"baseName": "OriginalTitle",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"baseName": "Path",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadataLanguage",
|
||||
"baseName": "MetadataLanguage",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadataCountryCode",
|
||||
"baseName": "MetadataCountryCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "providerIds",
|
||||
"baseName": "ProviderIds",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "year",
|
||||
"baseName": "Year",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "indexNumber",
|
||||
"baseName": "IndexNumber",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "parentIndexNumber",
|
||||
"baseName": "ParentIndexNumber",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "premiereDate",
|
||||
"baseName": "PremiereDate",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "isAutomated",
|
||||
"baseName": "IsAutomated",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "albumArtists",
|
||||
"baseName": "AlbumArtists",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "artistProviderIds",
|
||||
"baseName": "ArtistProviderIds",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "songInfos",
|
||||
"baseName": "SongInfos",
|
||||
"type": "Array<SongInfo>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AlbumInfo.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
56
jellyfin/model/albumInfoRemoteSearchQuery.ts
Normal file
56
jellyfin/model/albumInfoRemoteSearchQuery.ts
Normal file
@ -0,0 +1,56 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { AlbumInfo } from './albumInfo';
|
||||
|
||||
export class AlbumInfoRemoteSearchQuery {
|
||||
'searchInfo'?: AlbumInfo | null;
|
||||
'itemId'?: string;
|
||||
/**
|
||||
* Gets or sets the provider name to search within if set.
|
||||
*/
|
||||
'searchProviderName'?: string | null;
|
||||
/**
|
||||
* Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
'includeDisabledProviders'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "searchInfo",
|
||||
"baseName": "SearchInfo",
|
||||
"type": "AlbumInfo"
|
||||
},
|
||||
{
|
||||
"name": "itemId",
|
||||
"baseName": "ItemId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "searchProviderName",
|
||||
"baseName": "SearchProviderName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "includeDisabledProviders",
|
||||
"baseName": "IncludeDisabledProviders",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AlbumInfoRemoteSearchQuery.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
44
jellyfin/model/allThemeMediaResult.ts
Normal file
44
jellyfin/model/allThemeMediaResult.ts
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { AllThemeMediaResultThemeVideosResult } from './allThemeMediaResultThemeVideosResult';
|
||||
|
||||
export class AllThemeMediaResult {
|
||||
'themeVideosResult'?: AllThemeMediaResultThemeVideosResult | null;
|
||||
'themeSongsResult'?: AllThemeMediaResultThemeVideosResult | null;
|
||||
'soundtrackSongsResult'?: AllThemeMediaResultThemeVideosResult | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "themeVideosResult",
|
||||
"baseName": "ThemeVideosResult",
|
||||
"type": "AllThemeMediaResultThemeVideosResult"
|
||||
},
|
||||
{
|
||||
"name": "themeSongsResult",
|
||||
"baseName": "ThemeSongsResult",
|
||||
"type": "AllThemeMediaResultThemeVideosResult"
|
||||
},
|
||||
{
|
||||
"name": "soundtrackSongsResult",
|
||||
"baseName": "SoundtrackSongsResult",
|
||||
"type": "AllThemeMediaResultThemeVideosResult"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AllThemeMediaResult.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
65
jellyfin/model/allThemeMediaResultThemeVideosResult.ts
Normal file
65
jellyfin/model/allThemeMediaResultThemeVideosResult.ts
Normal file
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { BaseItemDto } from './baseItemDto';
|
||||
|
||||
/**
|
||||
* Class ThemeMediaResult.
|
||||
*/
|
||||
export class AllThemeMediaResultThemeVideosResult {
|
||||
/**
|
||||
* Gets or sets the items.
|
||||
*/
|
||||
'items'?: Array<BaseItemDto> | null;
|
||||
/**
|
||||
* Gets or sets the total number of records available.
|
||||
*/
|
||||
'totalRecordCount'?: number;
|
||||
/**
|
||||
* Gets or sets the index of the first record in Items.
|
||||
*/
|
||||
'startIndex'?: number;
|
||||
/**
|
||||
* Gets or sets the owner id.
|
||||
*/
|
||||
'ownerId'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "items",
|
||||
"baseName": "Items",
|
||||
"type": "Array<BaseItemDto>"
|
||||
},
|
||||
{
|
||||
"name": "totalRecordCount",
|
||||
"baseName": "TotalRecordCount",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "startIndex",
|
||||
"baseName": "StartIndex",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "ownerId",
|
||||
"baseName": "OwnerId",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AllThemeMediaResultThemeVideosResult.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
107
jellyfin/model/applySearchCriteriaRequest.ts
Normal file
107
jellyfin/model/applySearchCriteriaRequest.ts
Normal file
@ -0,0 +1,107 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { RemoteSearchResult } from './remoteSearchResult';
|
||||
|
||||
export class ApplySearchCriteriaRequest {
|
||||
/**
|
||||
* Gets or sets the name.
|
||||
*/
|
||||
'name'?: string | null;
|
||||
/**
|
||||
* Gets or sets the provider ids.
|
||||
*/
|
||||
'providerIds'?: { [key: string]: string; } | null;
|
||||
/**
|
||||
* Gets or sets the year.
|
||||
*/
|
||||
'productionYear'?: number | null;
|
||||
'indexNumber'?: number | null;
|
||||
'indexNumberEnd'?: number | null;
|
||||
'parentIndexNumber'?: number | null;
|
||||
'premiereDate'?: Date | null;
|
||||
'imageUrl'?: string | null;
|
||||
'searchProviderName'?: string | null;
|
||||
'overview'?: string | null;
|
||||
'albumArtist'?: RemoteSearchResult | null;
|
||||
'artists'?: Array<RemoteSearchResult> | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "providerIds",
|
||||
"baseName": "ProviderIds",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "productionYear",
|
||||
"baseName": "ProductionYear",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "indexNumber",
|
||||
"baseName": "IndexNumber",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "indexNumberEnd",
|
||||
"baseName": "IndexNumberEnd",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "parentIndexNumber",
|
||||
"baseName": "ParentIndexNumber",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "premiereDate",
|
||||
"baseName": "PremiereDate",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "imageUrl",
|
||||
"baseName": "ImageUrl",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "searchProviderName",
|
||||
"baseName": "SearchProviderName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "overview",
|
||||
"baseName": "Overview",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "albumArtist",
|
||||
"baseName": "AlbumArtist",
|
||||
"type": "RemoteSearchResult"
|
||||
},
|
||||
{
|
||||
"name": "artists",
|
||||
"baseName": "Artists",
|
||||
"type": "Array<RemoteSearchResult>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ApplySearchCriteriaRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
22
jellyfin/model/architecture.ts
Normal file
22
jellyfin/model/architecture.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
export enum Architecture {
|
||||
X86 = <any> 'X86',
|
||||
X64 = <any> 'X64',
|
||||
Arm = <any> 'Arm',
|
||||
Arm64 = <any> 'Arm64',
|
||||
Wasm = <any> 'Wasm',
|
||||
S390x = <any> 'S390x'
|
||||
}
|
119
jellyfin/model/artistInfo.ts
Normal file
119
jellyfin/model/artistInfo.ts
Normal file
@ -0,0 +1,119 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { SongInfo } from './songInfo';
|
||||
|
||||
export class ArtistInfo {
|
||||
/**
|
||||
* Gets or sets the name.
|
||||
*/
|
||||
'name'?: string | null;
|
||||
/**
|
||||
* Gets or sets the original title.
|
||||
*/
|
||||
'originalTitle'?: string | null;
|
||||
/**
|
||||
* Gets or sets the path.
|
||||
*/
|
||||
'path'?: string | null;
|
||||
/**
|
||||
* Gets or sets the metadata language.
|
||||
*/
|
||||
'metadataLanguage'?: string | null;
|
||||
/**
|
||||
* Gets or sets the metadata country code.
|
||||
*/
|
||||
'metadataCountryCode'?: string | null;
|
||||
/**
|
||||
* Gets or sets the provider ids.
|
||||
*/
|
||||
'providerIds'?: { [key: string]: string; } | null;
|
||||
/**
|
||||
* Gets or sets the year.
|
||||
*/
|
||||
'year'?: number | null;
|
||||
'indexNumber'?: number | null;
|
||||
'parentIndexNumber'?: number | null;
|
||||
'premiereDate'?: Date | null;
|
||||
'isAutomated'?: boolean;
|
||||
'songInfos'?: Array<SongInfo>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "originalTitle",
|
||||
"baseName": "OriginalTitle",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"baseName": "Path",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadataLanguage",
|
||||
"baseName": "MetadataLanguage",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadataCountryCode",
|
||||
"baseName": "MetadataCountryCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "providerIds",
|
||||
"baseName": "ProviderIds",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "year",
|
||||
"baseName": "Year",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "indexNumber",
|
||||
"baseName": "IndexNumber",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "parentIndexNumber",
|
||||
"baseName": "ParentIndexNumber",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "premiereDate",
|
||||
"baseName": "PremiereDate",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "isAutomated",
|
||||
"baseName": "IsAutomated",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "songInfos",
|
||||
"baseName": "SongInfos",
|
||||
"type": "Array<SongInfo>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ArtistInfo.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
56
jellyfin/model/artistInfoRemoteSearchQuery.ts
Normal file
56
jellyfin/model/artistInfoRemoteSearchQuery.ts
Normal file
@ -0,0 +1,56 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { ArtistInfo } from './artistInfo';
|
||||
|
||||
export class ArtistInfoRemoteSearchQuery {
|
||||
'searchInfo'?: ArtistInfo | null;
|
||||
'itemId'?: string;
|
||||
/**
|
||||
* Gets or sets the provider name to search within if set.
|
||||
*/
|
||||
'searchProviderName'?: string | null;
|
||||
/**
|
||||
* Gets or sets a value indicating whether disabled providers should be included.
|
||||
*/
|
||||
'includeDisabledProviders'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "searchInfo",
|
||||
"baseName": "SearchInfo",
|
||||
"type": "ArtistInfo"
|
||||
},
|
||||
{
|
||||
"name": "itemId",
|
||||
"baseName": "ItemId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "searchProviderName",
|
||||
"baseName": "SearchProviderName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "includeDisabledProviders",
|
||||
"baseName": "IncludeDisabledProviders",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ArtistInfoRemoteSearchQuery.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
55
jellyfin/model/authenticateUserByName.ts
Normal file
55
jellyfin/model/authenticateUserByName.ts
Normal file
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
/**
|
||||
* The authenticate user by name request body.
|
||||
*/
|
||||
export class AuthenticateUserByName {
|
||||
/**
|
||||
* Gets or sets the username.
|
||||
*/
|
||||
'username'?: string | null;
|
||||
/**
|
||||
* Gets or sets the plain text password.
|
||||
*/
|
||||
'pw'?: string | null;
|
||||
/**
|
||||
* Gets or sets the sha1-hashed password.
|
||||
*/
|
||||
'password'?: string | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "username",
|
||||
"baseName": "Username",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "pw",
|
||||
"baseName": "Pw",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"baseName": "Password",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticateUserByName.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
55
jellyfin/model/authenticateUserByNameRequest.ts
Normal file
55
jellyfin/model/authenticateUserByNameRequest.ts
Normal file
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
/**
|
||||
* The authenticate user by name request body.
|
||||
*/
|
||||
export class AuthenticateUserByNameRequest {
|
||||
/**
|
||||
* Gets or sets the username.
|
||||
*/
|
||||
'username'?: string | null;
|
||||
/**
|
||||
* Gets or sets the plain text password.
|
||||
*/
|
||||
'pw'?: string | null;
|
||||
/**
|
||||
* Gets or sets the sha1-hashed password.
|
||||
*/
|
||||
'password'?: string | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "username",
|
||||
"baseName": "Username",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "pw",
|
||||
"baseName": "Pw",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"baseName": "Password",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticateUserByNameRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
37
jellyfin/model/authenticateWithQuickConnectRequest.ts
Normal file
37
jellyfin/model/authenticateWithQuickConnectRequest.ts
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
/**
|
||||
* The quick connect request body.
|
||||
*/
|
||||
export class AuthenticateWithQuickConnectRequest {
|
||||
/**
|
||||
* Gets or sets the quick connect secret.
|
||||
*/
|
||||
'secret': string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "secret",
|
||||
"baseName": "Secret",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticateWithQuickConnectRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
127
jellyfin/model/authenticationInfo.ts
Normal file
127
jellyfin/model/authenticationInfo.ts
Normal file
@ -0,0 +1,127 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
export class AuthenticationInfo {
|
||||
/**
|
||||
* Gets or sets the identifier.
|
||||
*/
|
||||
'id'?: number;
|
||||
/**
|
||||
* Gets or sets the access token.
|
||||
*/
|
||||
'accessToken'?: string | null;
|
||||
/**
|
||||
* Gets or sets the device identifier.
|
||||
*/
|
||||
'deviceId'?: string | null;
|
||||
/**
|
||||
* Gets or sets the name of the application.
|
||||
*/
|
||||
'appName'?: string | null;
|
||||
/**
|
||||
* Gets or sets the application version.
|
||||
*/
|
||||
'appVersion'?: string | null;
|
||||
/**
|
||||
* Gets or sets the name of the device.
|
||||
*/
|
||||
'deviceName'?: string | null;
|
||||
/**
|
||||
* Gets or sets the user identifier.
|
||||
*/
|
||||
'userId'?: string;
|
||||
/**
|
||||
* Gets or sets a value indicating whether this instance is active.
|
||||
*/
|
||||
'isActive'?: boolean;
|
||||
/**
|
||||
* Gets or sets the date created.
|
||||
*/
|
||||
'dateCreated'?: Date;
|
||||
/**
|
||||
* Gets or sets the date revoked.
|
||||
*/
|
||||
'dateRevoked'?: Date | null;
|
||||
'dateLastActivity'?: Date;
|
||||
'userName'?: string | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "Id",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "accessToken",
|
||||
"baseName": "AccessToken",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "deviceId",
|
||||
"baseName": "DeviceId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "appName",
|
||||
"baseName": "AppName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "appVersion",
|
||||
"baseName": "AppVersion",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "deviceName",
|
||||
"baseName": "DeviceName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "userId",
|
||||
"baseName": "UserId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "isActive",
|
||||
"baseName": "IsActive",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "dateCreated",
|
||||
"baseName": "DateCreated",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "dateRevoked",
|
||||
"baseName": "DateRevoked",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "dateLastActivity",
|
||||
"baseName": "DateLastActivity",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "userName",
|
||||
"baseName": "UserName",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticationInfo.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
53
jellyfin/model/authenticationInfoQueryResult.ts
Normal file
53
jellyfin/model/authenticationInfoQueryResult.ts
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { AuthenticationInfo } from './authenticationInfo';
|
||||
|
||||
export class AuthenticationInfoQueryResult {
|
||||
/**
|
||||
* Gets or sets the items.
|
||||
*/
|
||||
'items'?: Array<AuthenticationInfo> | null;
|
||||
/**
|
||||
* Gets or sets the total number of records available.
|
||||
*/
|
||||
'totalRecordCount'?: number;
|
||||
/**
|
||||
* Gets or sets the index of the first record in Items.
|
||||
*/
|
||||
'startIndex'?: number;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "items",
|
||||
"baseName": "Items",
|
||||
"type": "Array<AuthenticationInfo>"
|
||||
},
|
||||
{
|
||||
"name": "totalRecordCount",
|
||||
"baseName": "TotalRecordCount",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "startIndex",
|
||||
"baseName": "StartIndex",
|
||||
"type": "number"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticationInfoQueryResult.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
51
jellyfin/model/authenticationResult.ts
Normal file
51
jellyfin/model/authenticationResult.ts
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { AuthenticationResultSessionInfo } from './authenticationResultSessionInfo';
|
||||
import { AuthenticationResultUser } from './authenticationResultUser';
|
||||
|
||||
export class AuthenticationResult {
|
||||
'user'?: AuthenticationResultUser | null;
|
||||
'sessionInfo'?: AuthenticationResultSessionInfo | null;
|
||||
'accessToken'?: string | null;
|
||||
'serverId'?: string | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "user",
|
||||
"baseName": "User",
|
||||
"type": "AuthenticationResultUser"
|
||||
},
|
||||
{
|
||||
"name": "sessionInfo",
|
||||
"baseName": "SessionInfo",
|
||||
"type": "AuthenticationResultSessionInfo"
|
||||
},
|
||||
{
|
||||
"name": "accessToken",
|
||||
"baseName": "AccessToken",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "serverId",
|
||||
"baseName": "ServerId",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticationResult.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
253
jellyfin/model/authenticationResultSessionInfo.ts
Normal file
253
jellyfin/model/authenticationResultSessionInfo.ts
Normal file
@ -0,0 +1,253 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { BaseItemDto } from './baseItemDto';
|
||||
import { ClientCapabilities } from './clientCapabilities';
|
||||
import { GeneralCommandType } from './generalCommandType';
|
||||
import { PlayerStateInfo } from './playerStateInfo';
|
||||
import { QueueItem } from './queueItem';
|
||||
import { SessionInfoFullNowPlayingItem } from './sessionInfoFullNowPlayingItem';
|
||||
import { SessionInfoNowPlayingItem } from './sessionInfoNowPlayingItem';
|
||||
import { SessionUserInfo } from './sessionUserInfo';
|
||||
import { TranscodingInfo } from './transcodingInfo';
|
||||
|
||||
/**
|
||||
* Class SessionInfo.
|
||||
*/
|
||||
export class AuthenticationResultSessionInfo {
|
||||
'playState'?: PlayerStateInfo | null;
|
||||
'additionalUsers'?: Array<SessionUserInfo> | null;
|
||||
'capabilities'?: ClientCapabilities | null;
|
||||
/**
|
||||
* Gets or sets the remote end point.
|
||||
*/
|
||||
'remoteEndPoint'?: string | null;
|
||||
/**
|
||||
* Gets the playable media types.
|
||||
*/
|
||||
'playableMediaTypes'?: Array<string> | null;
|
||||
/**
|
||||
* Gets or sets the id.
|
||||
*/
|
||||
'id'?: string | null;
|
||||
/**
|
||||
* Gets or sets the user id.
|
||||
*/
|
||||
'userId'?: string;
|
||||
/**
|
||||
* Gets or sets the username.
|
||||
*/
|
||||
'userName'?: string | null;
|
||||
/**
|
||||
* Gets or sets the type of the client.
|
||||
*/
|
||||
'client'?: string | null;
|
||||
/**
|
||||
* Gets or sets the last activity date.
|
||||
*/
|
||||
'lastActivityDate'?: Date;
|
||||
/**
|
||||
* Gets or sets the last playback check in.
|
||||
*/
|
||||
'lastPlaybackCheckIn'?: Date;
|
||||
/**
|
||||
* Gets or sets the name of the device.
|
||||
*/
|
||||
'deviceName'?: string | null;
|
||||
/**
|
||||
* Gets or sets the type of the device.
|
||||
*/
|
||||
'deviceType'?: string | null;
|
||||
'nowPlayingItem'?: SessionInfoNowPlayingItem | null;
|
||||
'fullNowPlayingItem'?: SessionInfoFullNowPlayingItem | null;
|
||||
'nowViewingItem'?: SessionInfoNowPlayingItem | null;
|
||||
/**
|
||||
* Gets or sets the device id.
|
||||
*/
|
||||
'deviceId'?: string | null;
|
||||
/**
|
||||
* Gets or sets the application version.
|
||||
*/
|
||||
'applicationVersion'?: string | null;
|
||||
'transcodingInfo'?: TranscodingInfo | null;
|
||||
/**
|
||||
* Gets a value indicating whether this instance is active.
|
||||
*/
|
||||
'isActive'?: boolean;
|
||||
'supportsMediaControl'?: boolean;
|
||||
'supportsRemoteControl'?: boolean;
|
||||
'nowPlayingQueue'?: Array<QueueItem> | null;
|
||||
'nowPlayingQueueFullItems'?: Array<BaseItemDto> | null;
|
||||
'hasCustomDeviceName'?: boolean;
|
||||
'playlistItemId'?: string | null;
|
||||
'serverId'?: string | null;
|
||||
'userPrimaryImageTag'?: string | null;
|
||||
/**
|
||||
* Gets the supported commands.
|
||||
*/
|
||||
'supportedCommands'?: Array<GeneralCommandType> | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "playState",
|
||||
"baseName": "PlayState",
|
||||
"type": "PlayerStateInfo"
|
||||
},
|
||||
{
|
||||
"name": "additionalUsers",
|
||||
"baseName": "AdditionalUsers",
|
||||
"type": "Array<SessionUserInfo>"
|
||||
},
|
||||
{
|
||||
"name": "capabilities",
|
||||
"baseName": "Capabilities",
|
||||
"type": "ClientCapabilities"
|
||||
},
|
||||
{
|
||||
"name": "remoteEndPoint",
|
||||
"baseName": "RemoteEndPoint",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "playableMediaTypes",
|
||||
"baseName": "PlayableMediaTypes",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "Id",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "userId",
|
||||
"baseName": "UserId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "userName",
|
||||
"baseName": "UserName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "client",
|
||||
"baseName": "Client",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lastActivityDate",
|
||||
"baseName": "LastActivityDate",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "lastPlaybackCheckIn",
|
||||
"baseName": "LastPlaybackCheckIn",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "deviceName",
|
||||
"baseName": "DeviceName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "deviceType",
|
||||
"baseName": "DeviceType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "nowPlayingItem",
|
||||
"baseName": "NowPlayingItem",
|
||||
"type": "SessionInfoNowPlayingItem"
|
||||
},
|
||||
{
|
||||
"name": "fullNowPlayingItem",
|
||||
"baseName": "FullNowPlayingItem",
|
||||
"type": "SessionInfoFullNowPlayingItem"
|
||||
},
|
||||
{
|
||||
"name": "nowViewingItem",
|
||||
"baseName": "NowViewingItem",
|
||||
"type": "SessionInfoNowPlayingItem"
|
||||
},
|
||||
{
|
||||
"name": "deviceId",
|
||||
"baseName": "DeviceId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "applicationVersion",
|
||||
"baseName": "ApplicationVersion",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "transcodingInfo",
|
||||
"baseName": "TranscodingInfo",
|
||||
"type": "TranscodingInfo"
|
||||
},
|
||||
{
|
||||
"name": "isActive",
|
||||
"baseName": "IsActive",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "supportsMediaControl",
|
||||
"baseName": "SupportsMediaControl",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "supportsRemoteControl",
|
||||
"baseName": "SupportsRemoteControl",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "nowPlayingQueue",
|
||||
"baseName": "NowPlayingQueue",
|
||||
"type": "Array<QueueItem>"
|
||||
},
|
||||
{
|
||||
"name": "nowPlayingQueueFullItems",
|
||||
"baseName": "NowPlayingQueueFullItems",
|
||||
"type": "Array<BaseItemDto>"
|
||||
},
|
||||
{
|
||||
"name": "hasCustomDeviceName",
|
||||
"baseName": "HasCustomDeviceName",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "playlistItemId",
|
||||
"baseName": "PlaylistItemId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "serverId",
|
||||
"baseName": "ServerId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "userPrimaryImageTag",
|
||||
"baseName": "UserPrimaryImageTag",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "supportedCommands",
|
||||
"baseName": "SupportedCommands",
|
||||
"type": "Array<GeneralCommandType>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticationResultSessionInfo.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
150
jellyfin/model/authenticationResultUser.ts
Normal file
150
jellyfin/model/authenticationResultUser.ts
Normal file
@ -0,0 +1,150 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { UserDtoConfiguration } from './userDtoConfiguration';
|
||||
import { UserDtoPolicy } from './userDtoPolicy';
|
||||
|
||||
/**
|
||||
* Class UserDto.
|
||||
*/
|
||||
export class AuthenticationResultUser {
|
||||
/**
|
||||
* Gets or sets the name.
|
||||
*/
|
||||
'name'?: string | null;
|
||||
/**
|
||||
* Gets or sets the server identifier.
|
||||
*/
|
||||
'serverId'?: string | null;
|
||||
/**
|
||||
* Gets or sets the name of the server. This is not used by the server and is for client-side usage only.
|
||||
*/
|
||||
'serverName'?: string | null;
|
||||
/**
|
||||
* Gets or sets the id.
|
||||
*/
|
||||
'id'?: string;
|
||||
/**
|
||||
* Gets or sets the primary image tag.
|
||||
*/
|
||||
'primaryImageTag'?: string | null;
|
||||
/**
|
||||
* Gets or sets a value indicating whether this instance has password.
|
||||
*/
|
||||
'hasPassword'?: boolean;
|
||||
/**
|
||||
* Gets or sets a value indicating whether this instance has configured password.
|
||||
*/
|
||||
'hasConfiguredPassword'?: boolean;
|
||||
/**
|
||||
* Gets or sets a value indicating whether this instance has configured easy password.
|
||||
*/
|
||||
'hasConfiguredEasyPassword'?: boolean;
|
||||
/**
|
||||
* Gets or sets whether async login is enabled or not.
|
||||
*/
|
||||
'enableAutoLogin'?: boolean | null;
|
||||
/**
|
||||
* Gets or sets the last login date.
|
||||
*/
|
||||
'lastLoginDate'?: Date | null;
|
||||
/**
|
||||
* Gets or sets the last activity date.
|
||||
*/
|
||||
'lastActivityDate'?: Date | null;
|
||||
'configuration'?: UserDtoConfiguration | null;
|
||||
'policy'?: UserDtoPolicy | null;
|
||||
/**
|
||||
* Gets or sets the primary image aspect ratio.
|
||||
*/
|
||||
'primaryImageAspectRatio'?: number | null;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "name",
|
||||
"baseName": "Name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "serverId",
|
||||
"baseName": "ServerId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "serverName",
|
||||
"baseName": "ServerName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "Id",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "primaryImageTag",
|
||||
"baseName": "PrimaryImageTag",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "hasPassword",
|
||||
"baseName": "HasPassword",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "hasConfiguredPassword",
|
||||
"baseName": "HasConfiguredPassword",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "hasConfiguredEasyPassword",
|
||||
"baseName": "HasConfiguredEasyPassword",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enableAutoLogin",
|
||||
"baseName": "EnableAutoLogin",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "lastLoginDate",
|
||||
"baseName": "LastLoginDate",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "lastActivityDate",
|
||||
"baseName": "LastActivityDate",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "configuration",
|
||||
"baseName": "Configuration",
|
||||
"type": "UserDtoConfiguration"
|
||||
},
|
||||
{
|
||||
"name": "policy",
|
||||
"baseName": "Policy",
|
||||
"type": "UserDtoPolicy"
|
||||
},
|
||||
{
|
||||
"name": "primaryImageAspectRatio",
|
||||
"baseName": "PrimaryImageAspectRatio",
|
||||
"type": "number"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AuthenticationResultUser.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
98
jellyfin/model/baseItem.ts
Normal file
98
jellyfin/model/baseItem.ts
Normal file
@ -0,0 +1,98 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { MediaUrl } from './mediaUrl';
|
||||
|
||||
/**
|
||||
* Class BaseItem.
|
||||
*/
|
||||
export class BaseItem {
|
||||
'size'?: number | null;
|
||||
'container'?: string | null;
|
||||
'isHD'?: boolean;
|
||||
'isShortcut'?: boolean;
|
||||
'shortcutPath'?: string | null;
|
||||
'width'?: number;
|
||||
'height'?: number;
|
||||
'extraIds'?: Array<string> | null;
|
||||
'dateLastSaved'?: Date;
|
||||
/**
|
||||
* Gets or sets the remote trailers.
|
||||
*/
|
||||
'remoteTrailers'?: Array<MediaUrl> | null;
|
||||
'supportsExternalTransfer'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "size",
|
||||
"baseName": "Size",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "container",
|
||||
"baseName": "Container",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "isHD",
|
||||
"baseName": "IsHD",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "isShortcut",
|
||||
"baseName": "IsShortcut",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "shortcutPath",
|
||||
"baseName": "ShortcutPath",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "width",
|
||||
"baseName": "Width",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "height",
|
||||
"baseName": "Height",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "extraIds",
|
||||
"baseName": "ExtraIds",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "dateLastSaved",
|
||||
"baseName": "DateLastSaved",
|
||||
"type": "Date"
|
||||
},
|
||||
{
|
||||
"name": "remoteTrailers",
|
||||
"baseName": "RemoteTrailers",
|
||||
"type": "Array<MediaUrl>"
|
||||
},
|
||||
{
|
||||
"name": "supportsExternalTransfer",
|
||||
"baseName": "SupportsExternalTransfer",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return BaseItem.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
1272
jellyfin/model/baseItemDto.ts
Normal file
1272
jellyfin/model/baseItemDto.ts
Normal file
File diff suppressed because it is too large
Load Diff
1271
jellyfin/model/baseItemDtoCurrentProgram.ts
Normal file
1271
jellyfin/model/baseItemDtoCurrentProgram.ts
Normal file
File diff suppressed because it is too large
Load Diff
106
jellyfin/model/baseItemDtoImageBlurHashes.ts
Normal file
106
jellyfin/model/baseItemDtoImageBlurHashes.ts
Normal file
@ -0,0 +1,106 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
|
||||
/**
|
||||
* Gets or sets the blurhashes for the image tags. Maps image type to dictionary mapping image tag to blurhash value.
|
||||
*/
|
||||
export class BaseItemDtoImageBlurHashes {
|
||||
'primary'?: { [key: string]: string; };
|
||||
'art'?: { [key: string]: string; };
|
||||
'backdrop'?: { [key: string]: string; };
|
||||
'banner'?: { [key: string]: string; };
|
||||
'logo'?: { [key: string]: string; };
|
||||
'thumb'?: { [key: string]: string; };
|
||||
'disc'?: { [key: string]: string; };
|
||||
'box'?: { [key: string]: string; };
|
||||
'screenshot'?: { [key: string]: string; };
|
||||
'menu'?: { [key: string]: string; };
|
||||
'chapter'?: { [key: string]: string; };
|
||||
'boxRear'?: { [key: string]: string; };
|
||||
'profile'?: { [key: string]: string; };
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "primary",
|
||||
"baseName": "Primary",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "art",
|
||||
"baseName": "Art",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "backdrop",
|
||||
"baseName": "Backdrop",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "banner",
|
||||
"baseName": "Banner",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "logo",
|
||||
"baseName": "Logo",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "thumb",
|
||||
"baseName": "Thumb",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "disc",
|
||||
"baseName": "Disc",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "box",
|
||||
"baseName": "Box",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "screenshot",
|
||||
"baseName": "Screenshot",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "menu",
|
||||
"baseName": "Menu",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "chapter",
|
||||
"baseName": "Chapter",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "boxRear",
|
||||
"baseName": "BoxRear",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "profile",
|
||||
"baseName": "Profile",
|
||||
"type": "{ [key: string]: string; }"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return BaseItemDtoImageBlurHashes.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
53
jellyfin/model/baseItemDtoQueryResult.ts
Normal file
53
jellyfin/model/baseItemDtoQueryResult.ts
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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 { RequestFile } from './models';
|
||||
import { BaseItemDto } from './baseItemDto';
|
||||
|
||||
export class BaseItemDtoQueryResult {
|
||||
/**
|
||||
* Gets or sets the items.
|
||||
*/
|
||||
'items'?: Array<BaseItemDto> | null;
|
||||
/**
|
||||
* Gets or sets the total number of records available.
|
||||
*/
|
||||
'totalRecordCount'?: number;
|
||||
/**
|
||||
* Gets or sets the index of the first record in Items.
|
||||
*/
|
||||
'startIndex'?: number;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "items",
|
||||
"baseName": "Items",
|
||||
"type": "Array<BaseItemDto>"
|
||||
},
|
||||
{
|
||||
"name": "totalRecordCount",
|
||||
"baseName": "TotalRecordCount",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "startIndex",
|
||||
"baseName": "StartIndex",
|
||||
"type": "number"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return BaseItemDtoQueryResult.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user