jellyfin-discord-bot/server/jellyfin/apis/LiveTvApi.ts

2138 lines
78 KiB
TypeScript
Raw Normal View History

2023-05-04 23:34:53 +02:00
/* tslint:disable */
/* eslint-disable */
/**
* Jellyfin API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 10.8.9
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type {
AddListingProviderRequest,
AddTunerHostRequest,
BaseItemDto,
BaseItemDtoQueryResult,
ChannelMappingOptionsDto,
ChannelType,
CreateSeriesTimerRequest,
CreateTimerRequest,
GetProgramsRequest,
GuideInfo,
ImageType,
ItemFields,
ListingsProviderInfo,
LiveTvInfo,
NameIdPair,
ProblemDetails,
RecordingStatus,
SeriesTimerInfoDto,
SeriesTimerInfoDtoQueryResult,
SetChannelMappingRequest,
SortOrder,
TimerInfoDto,
TimerInfoDtoQueryResult,
TunerChannelMapping,
TunerHostInfo,
} from '../models';
import {
AddListingProviderRequestFromJSON,
AddListingProviderRequestToJSON,
AddTunerHostRequestFromJSON,
AddTunerHostRequestToJSON,
BaseItemDtoFromJSON,
BaseItemDtoToJSON,
BaseItemDtoQueryResultFromJSON,
BaseItemDtoQueryResultToJSON,
ChannelMappingOptionsDtoFromJSON,
ChannelMappingOptionsDtoToJSON,
ChannelTypeFromJSON,
ChannelTypeToJSON,
CreateSeriesTimerRequestFromJSON,
CreateSeriesTimerRequestToJSON,
CreateTimerRequestFromJSON,
CreateTimerRequestToJSON,
GetProgramsRequestFromJSON,
GetProgramsRequestToJSON,
GuideInfoFromJSON,
GuideInfoToJSON,
ImageTypeFromJSON,
ImageTypeToJSON,
ItemFieldsFromJSON,
ItemFieldsToJSON,
ListingsProviderInfoFromJSON,
ListingsProviderInfoToJSON,
LiveTvInfoFromJSON,
LiveTvInfoToJSON,
NameIdPairFromJSON,
NameIdPairToJSON,
ProblemDetailsFromJSON,
ProblemDetailsToJSON,
RecordingStatusFromJSON,
RecordingStatusToJSON,
SeriesTimerInfoDtoFromJSON,
SeriesTimerInfoDtoToJSON,
SeriesTimerInfoDtoQueryResultFromJSON,
SeriesTimerInfoDtoQueryResultToJSON,
SetChannelMappingRequestFromJSON,
SetChannelMappingRequestToJSON,
SortOrderFromJSON,
SortOrderToJSON,
TimerInfoDtoFromJSON,
TimerInfoDtoToJSON,
TimerInfoDtoQueryResultFromJSON,
TimerInfoDtoQueryResultToJSON,
TunerChannelMappingFromJSON,
TunerChannelMappingToJSON,
TunerHostInfoFromJSON,
TunerHostInfoToJSON,
} from '../models';
export interface AddListingProviderOperationRequest {
pw?: string;
validateListings?: boolean;
validateLogin?: boolean;
addListingProviderRequest?: AddListingProviderRequest;
}
export interface AddTunerHostOperationRequest {
addTunerHostRequest?: AddTunerHostRequest;
}
export interface CancelSeriesTimerRequest {
timerId: string;
}
export interface CancelTimerRequest {
timerId: string;
}
export interface CreateSeriesTimerOperationRequest {
createSeriesTimerRequest?: CreateSeriesTimerRequest;
}
export interface CreateTimerOperationRequest {
createTimerRequest?: CreateTimerRequest;
}
export interface DeleteListingProviderRequest {
id?: string;
}
export interface DeleteRecordingRequest {
recordingId: string;
}
export interface DeleteTunerHostRequest {
id?: string;
}
export interface DiscoverTunersRequest {
newDevicesOnly?: boolean;
}
export interface DiscvoverTunersRequest {
newDevicesOnly?: boolean;
}
export interface GetChannelRequest {
channelId: string;
userId?: string;
}
export interface GetChannelMappingOptionsRequest {
providerId?: string;
}
export interface GetDefaultTimerRequest {
programId?: string;
}
export interface GetLineupsRequest {
id?: string;
type?: string;
location?: string;
country?: string;
}
export interface GetLiveRecordingFileRequest {
recordingId: string;
}
export interface GetLiveStreamFileRequest {
streamId: string;
container: string;
}
export interface GetLiveTvChannelsRequest {
type?: ChannelType;
userId?: string;
startIndex?: number;
isMovie?: boolean;
isSeries?: boolean;
isNews?: boolean;
isKids?: boolean;
isSports?: boolean;
limit?: number;
isFavorite?: boolean;
isLiked?: boolean;
isDisliked?: boolean;
enableImages?: boolean;
imageTypeLimit?: number;
enableImageTypes?: Array<ImageType>;
fields?: Array<ItemFields>;
enableUserData?: boolean;
sortBy?: Array<string>;
sortOrder?: SortOrder;
enableFavoriteSorting?: boolean;
addCurrentProgram?: boolean;
}
export interface GetLiveTvProgramsRequest {
channelIds?: Array<string>;
userId?: string;
minStartDate?: Date;
hasAired?: boolean;
isAiring?: boolean;
maxStartDate?: Date;
minEndDate?: Date;
maxEndDate?: Date;
isMovie?: boolean;
isSeries?: boolean;
isNews?: boolean;
isKids?: boolean;
isSports?: boolean;
startIndex?: number;
limit?: number;
sortBy?: Array<string>;
sortOrder?: Array<SortOrder>;
genres?: Array<string>;
genreIds?: Array<string>;
enableImages?: boolean;
imageTypeLimit?: number;
enableImageTypes?: Array<ImageType>;
enableUserData?: boolean;
seriesTimerId?: string;
librarySeriesId?: string;
fields?: Array<ItemFields>;
enableTotalRecordCount?: boolean;
}
export interface GetProgramRequest {
programId: string;
userId?: string;
}
export interface GetProgramsOperationRequest {
getProgramsRequest?: GetProgramsRequest;
}
export interface GetRecommendedProgramsRequest {
userId?: string;
limit?: number;
isAiring?: boolean;
hasAired?: boolean;
isSeries?: boolean;
isMovie?: boolean;
isNews?: boolean;
isKids?: boolean;
isSports?: boolean;
enableImages?: boolean;
imageTypeLimit?: number;
enableImageTypes?: Array<ImageType>;
genreIds?: Array<string>;
fields?: Array<ItemFields>;
enableUserData?: boolean;
enableTotalRecordCount?: boolean;
}
export interface GetRecordingRequest {
recordingId: string;
userId?: string;
}
export interface GetRecordingFoldersRequest {
userId?: string;
}
export interface GetRecordingGroupRequest {
groupId: string;
}
export interface GetRecordingGroupsRequest {
userId?: string;
}
export interface GetRecordingsRequest {
channelId?: string;
userId?: string;
startIndex?: number;
limit?: number;
status?: RecordingStatus;
isInProgress?: boolean;
seriesTimerId?: string;
enableImages?: boolean;
imageTypeLimit?: number;
enableImageTypes?: Array<ImageType>;
fields?: Array<ItemFields>;
enableUserData?: boolean;
isMovie?: boolean;
isSeries?: boolean;
isKids?: boolean;
isSports?: boolean;
isNews?: boolean;
isLibraryItem?: boolean;
enableTotalRecordCount?: boolean;
}
export interface GetRecordingsSeriesRequest {
channelId?: string;
userId?: string;
groupId?: string;
startIndex?: number;
limit?: number;
status?: RecordingStatus;
isInProgress?: boolean;
seriesTimerId?: string;
enableImages?: boolean;
imageTypeLimit?: number;
enableImageTypes?: Array<ImageType>;
fields?: Array<ItemFields>;
enableUserData?: boolean;
enableTotalRecordCount?: boolean;
}
export interface GetSeriesTimerRequest {
timerId: string;
}
export interface GetSeriesTimersRequest {
sortBy?: string;
sortOrder?: SortOrder;
}
export interface GetTimerRequest {
timerId: string;
}
export interface GetTimersRequest {
channelId?: string;
seriesTimerId?: string;
isActive?: boolean;
isScheduled?: boolean;
}
export interface ResetTunerRequest {
tunerId: string;
}
export interface SetChannelMappingOperationRequest {
setChannelMappingRequest: SetChannelMappingRequest;
}
export interface UpdateSeriesTimerRequest {
timerId: string;
createSeriesTimerRequest?: CreateSeriesTimerRequest;
}
export interface UpdateTimerRequest {
timerId: string;
createTimerRequest?: CreateTimerRequest;
}
/**
*
*/
export class LiveTvApi extends runtime.BaseAPI {
/**
* Adds a listings provider.
*/
async addListingProviderRaw(requestParameters: AddListingProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListingsProviderInfo>> {
const queryParameters: any = {};
if (requestParameters.pw !== undefined) {
queryParameters['pw'] = requestParameters.pw;
}
if (requestParameters.validateListings !== undefined) {
queryParameters['validateListings'] = requestParameters.validateListings;
}
if (requestParameters.validateLogin !== undefined) {
queryParameters['validateLogin'] = requestParameters.validateLogin;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/ListingProviders`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: AddListingProviderRequestToJSON(requestParameters.addListingProviderRequest),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => ListingsProviderInfoFromJSON(jsonValue));
}
/**
* Adds a listings provider.
*/
async addListingProvider(requestParameters: AddListingProviderOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListingsProviderInfo> {
const response = await this.addListingProviderRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Adds a tuner host.
*/
async addTunerHostRaw(requestParameters: AddTunerHostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TunerHostInfo>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/TunerHosts`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: AddTunerHostRequestToJSON(requestParameters.addTunerHostRequest),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => TunerHostInfoFromJSON(jsonValue));
}
/**
* Adds a tuner host.
*/
async addTunerHost(requestParameters: AddTunerHostOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TunerHostInfo> {
const response = await this.addTunerHostRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Cancels a live tv series timer.
*/
async cancelSeriesTimerRaw(requestParameters: CancelSeriesTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.timerId === null || requestParameters.timerId === undefined) {
throw new runtime.RequiredError('timerId','Required parameter requestParameters.timerId was null or undefined when calling cancelSeriesTimer.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/SeriesTimers/{timerId}`.replace(`{${"timerId"}}`, encodeURIComponent(String(requestParameters.timerId))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Cancels a live tv series timer.
*/
async cancelSeriesTimer(requestParameters: CancelSeriesTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.cancelSeriesTimerRaw(requestParameters, initOverrides);
}
/**
* Cancels a live tv timer.
*/
async cancelTimerRaw(requestParameters: CancelTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.timerId === null || requestParameters.timerId === undefined) {
throw new runtime.RequiredError('timerId','Required parameter requestParameters.timerId was null or undefined when calling cancelTimer.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Timers/{timerId}`.replace(`{${"timerId"}}`, encodeURIComponent(String(requestParameters.timerId))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Cancels a live tv timer.
*/
async cancelTimer(requestParameters: CancelTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.cancelTimerRaw(requestParameters, initOverrides);
}
/**
* Creates a live tv series timer.
*/
async createSeriesTimerRaw(requestParameters: CreateSeriesTimerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/SeriesTimers`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateSeriesTimerRequestToJSON(requestParameters.createSeriesTimerRequest),
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Creates a live tv series timer.
*/
async createSeriesTimer(requestParameters: CreateSeriesTimerOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.createSeriesTimerRaw(requestParameters, initOverrides);
}
/**
* Creates a live tv timer.
*/
async createTimerRaw(requestParameters: CreateTimerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Timers`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateTimerRequestToJSON(requestParameters.createTimerRequest),
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Creates a live tv timer.
*/
async createTimer(requestParameters: CreateTimerOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.createTimerRaw(requestParameters, initOverrides);
}
/**
* Delete listing provider.
*/
async deleteListingProviderRaw(requestParameters: DeleteListingProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.id !== undefined) {
queryParameters['id'] = requestParameters.id;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/ListingProviders`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Delete listing provider.
*/
async deleteListingProvider(requestParameters: DeleteListingProviderRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.deleteListingProviderRaw(requestParameters, initOverrides);
}
/**
* Deletes a live tv recording.
*/
async deleteRecordingRaw(requestParameters: DeleteRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.recordingId === null || requestParameters.recordingId === undefined) {
throw new runtime.RequiredError('recordingId','Required parameter requestParameters.recordingId was null or undefined when calling deleteRecording.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Recordings/{recordingId}`.replace(`{${"recordingId"}}`, encodeURIComponent(String(requestParameters.recordingId))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Deletes a live tv recording.
*/
async deleteRecording(requestParameters: DeleteRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.deleteRecordingRaw(requestParameters, initOverrides);
}
/**
* Deletes a tuner host.
*/
async deleteTunerHostRaw(requestParameters: DeleteTunerHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.id !== undefined) {
queryParameters['id'] = requestParameters.id;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/TunerHosts`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Deletes a tuner host.
*/
async deleteTunerHost(requestParameters: DeleteTunerHostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.deleteTunerHostRaw(requestParameters, initOverrides);
}
/**
* Discover tuners.
*/
async discoverTunersRaw(requestParameters: DiscoverTunersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TunerHostInfo>>> {
const queryParameters: any = {};
if (requestParameters.newDevicesOnly !== undefined) {
queryParameters['newDevicesOnly'] = requestParameters.newDevicesOnly;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Tuners/Discover`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TunerHostInfoFromJSON));
}
/**
* Discover tuners.
*/
async discoverTuners(requestParameters: DiscoverTunersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TunerHostInfo>> {
const response = await this.discoverTunersRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Discover tuners.
*/
async discvoverTunersRaw(requestParameters: DiscvoverTunersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TunerHostInfo>>> {
const queryParameters: any = {};
if (requestParameters.newDevicesOnly !== undefined) {
queryParameters['newDevicesOnly'] = requestParameters.newDevicesOnly;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Tuners/Discvover`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TunerHostInfoFromJSON));
}
/**
* Discover tuners.
*/
async discvoverTuners(requestParameters: DiscvoverTunersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TunerHostInfo>> {
const response = await this.discvoverTunersRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a live tv channel.
*/
async getChannelRaw(requestParameters: GetChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDto>> {
if (requestParameters.channelId === null || requestParameters.channelId === undefined) {
throw new runtime.RequiredError('channelId','Required parameter requestParameters.channelId was null or undefined when calling getChannel.');
}
const queryParameters: any = {};
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Channels/{channelId}`.replace(`{${"channelId"}}`, encodeURIComponent(String(requestParameters.channelId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoFromJSON(jsonValue));
}
/**
* Gets a live tv channel.
*/
async getChannel(requestParameters: GetChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDto> {
const response = await this.getChannelRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get channel mapping options.
*/
async getChannelMappingOptionsRaw(requestParameters: GetChannelMappingOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChannelMappingOptionsDto>> {
const queryParameters: any = {};
if (requestParameters.providerId !== undefined) {
queryParameters['providerId'] = requestParameters.providerId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/ChannelMappingOptions`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => ChannelMappingOptionsDtoFromJSON(jsonValue));
}
/**
* Get channel mapping options.
*/
async getChannelMappingOptions(requestParameters: GetChannelMappingOptionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChannelMappingOptionsDto> {
const response = await this.getChannelMappingOptionsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets default listings provider info.
*/
async getDefaultListingProviderRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListingsProviderInfo>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/ListingProviders/Default`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => ListingsProviderInfoFromJSON(jsonValue));
}
/**
* Gets default listings provider info.
*/
async getDefaultListingProvider(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListingsProviderInfo> {
const response = await this.getDefaultListingProviderRaw(initOverrides);
return await response.value();
}
/**
* Gets the default values for a new timer.
*/
async getDefaultTimerRaw(requestParameters: GetDefaultTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SeriesTimerInfoDto>> {
const queryParameters: any = {};
if (requestParameters.programId !== undefined) {
queryParameters['programId'] = requestParameters.programId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Timers/Defaults`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => SeriesTimerInfoDtoFromJSON(jsonValue));
}
/**
* Gets the default values for a new timer.
*/
async getDefaultTimer(requestParameters: GetDefaultTimerRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SeriesTimerInfoDto> {
const response = await this.getDefaultTimerRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get guid info.
*/
async getGuideInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GuideInfo>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/GuideInfo`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GuideInfoFromJSON(jsonValue));
}
/**
* Get guid info.
*/
async getGuideInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GuideInfo> {
const response = await this.getGuideInfoRaw(initOverrides);
return await response.value();
}
/**
* Gets available lineups.
*/
async getLineupsRaw(requestParameters: GetLineupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<NameIdPair>>> {
const queryParameters: any = {};
if (requestParameters.id !== undefined) {
queryParameters['id'] = requestParameters.id;
}
if (requestParameters.type !== undefined) {
queryParameters['type'] = requestParameters.type;
}
if (requestParameters.location !== undefined) {
queryParameters['location'] = requestParameters.location;
}
if (requestParameters.country !== undefined) {
queryParameters['country'] = requestParameters.country;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/ListingProviders/Lineups`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NameIdPairFromJSON));
}
/**
* Gets available lineups.
*/
async getLineups(requestParameters: GetLineupsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NameIdPair>> {
const response = await this.getLineupsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a live tv recording stream.
*/
async getLiveRecordingFileRaw(requestParameters: GetLiveRecordingFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
if (requestParameters.recordingId === null || requestParameters.recordingId === undefined) {
throw new runtime.RequiredError('recordingId','Required parameter requestParameters.recordingId was null or undefined when calling getLiveRecordingFile.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
const response = await this.request({
path: `/LiveTv/LiveRecordings/{recordingId}/stream`.replace(`{${"recordingId"}}`, encodeURIComponent(String(requestParameters.recordingId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a live tv recording stream.
*/
async getLiveRecordingFile(requestParameters: GetLiveRecordingFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getLiveRecordingFileRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a live tv channel stream.
*/
async getLiveStreamFileRaw(requestParameters: GetLiveStreamFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
if (requestParameters.streamId === null || requestParameters.streamId === undefined) {
throw new runtime.RequiredError('streamId','Required parameter requestParameters.streamId was null or undefined when calling getLiveStreamFile.');
}
if (requestParameters.container === null || requestParameters.container === undefined) {
throw new runtime.RequiredError('container','Required parameter requestParameters.container was null or undefined when calling getLiveStreamFile.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
const response = await this.request({
path: `/LiveTv/LiveStreamFiles/{streamId}/stream.{container}`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters.streamId))).replace(`{${"container"}}`, encodeURIComponent(String(requestParameters.container))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a live tv channel stream.
*/
async getLiveStreamFile(requestParameters: GetLiveStreamFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getLiveStreamFileRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets available live tv channels.
*/
async getLiveTvChannelsRaw(requestParameters: GetLiveTvChannelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.type !== undefined) {
queryParameters['type'] = requestParameters.type;
}
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
if (requestParameters.startIndex !== undefined) {
queryParameters['startIndex'] = requestParameters.startIndex;
}
if (requestParameters.isMovie !== undefined) {
queryParameters['isMovie'] = requestParameters.isMovie;
}
if (requestParameters.isSeries !== undefined) {
queryParameters['isSeries'] = requestParameters.isSeries;
}
if (requestParameters.isNews !== undefined) {
queryParameters['isNews'] = requestParameters.isNews;
}
if (requestParameters.isKids !== undefined) {
queryParameters['isKids'] = requestParameters.isKids;
}
if (requestParameters.isSports !== undefined) {
queryParameters['isSports'] = requestParameters.isSports;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
if (requestParameters.isFavorite !== undefined) {
queryParameters['isFavorite'] = requestParameters.isFavorite;
}
if (requestParameters.isLiked !== undefined) {
queryParameters['isLiked'] = requestParameters.isLiked;
}
if (requestParameters.isDisliked !== undefined) {
queryParameters['isDisliked'] = requestParameters.isDisliked;
}
if (requestParameters.enableImages !== undefined) {
queryParameters['enableImages'] = requestParameters.enableImages;
}
if (requestParameters.imageTypeLimit !== undefined) {
queryParameters['imageTypeLimit'] = requestParameters.imageTypeLimit;
}
if (requestParameters.enableImageTypes) {
queryParameters['enableImageTypes'] = requestParameters.enableImageTypes;
}
if (requestParameters.fields) {
queryParameters['fields'] = requestParameters.fields;
}
if (requestParameters.enableUserData !== undefined) {
queryParameters['enableUserData'] = requestParameters.enableUserData;
}
if (requestParameters.sortBy) {
queryParameters['sortBy'] = requestParameters.sortBy;
}
if (requestParameters.sortOrder !== undefined) {
queryParameters['sortOrder'] = requestParameters.sortOrder;
}
if (requestParameters.enableFavoriteSorting !== undefined) {
queryParameters['enableFavoriteSorting'] = requestParameters.enableFavoriteSorting;
}
if (requestParameters.addCurrentProgram !== undefined) {
queryParameters['addCurrentProgram'] = requestParameters.addCurrentProgram;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Channels`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets available live tv channels.
*/
async getLiveTvChannels(requestParameters: GetLiveTvChannelsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getLiveTvChannelsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets available live tv services.
*/
async getLiveTvInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveTvInfo>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Info`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => LiveTvInfoFromJSON(jsonValue));
}
/**
* Gets available live tv services.
*/
async getLiveTvInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveTvInfo> {
const response = await this.getLiveTvInfoRaw(initOverrides);
return await response.value();
}
/**
* Gets available live tv epgs.
*/
async getLiveTvProgramsRaw(requestParameters: GetLiveTvProgramsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.channelIds) {
queryParameters['channelIds'] = requestParameters.channelIds;
}
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
if (requestParameters.minStartDate !== undefined) {
queryParameters['minStartDate'] = (requestParameters.minStartDate as any).toISOString();
}
if (requestParameters.hasAired !== undefined) {
queryParameters['hasAired'] = requestParameters.hasAired;
}
if (requestParameters.isAiring !== undefined) {
queryParameters['isAiring'] = requestParameters.isAiring;
}
if (requestParameters.maxStartDate !== undefined) {
queryParameters['maxStartDate'] = (requestParameters.maxStartDate as any).toISOString();
}
if (requestParameters.minEndDate !== undefined) {
queryParameters['minEndDate'] = (requestParameters.minEndDate as any).toISOString();
}
if (requestParameters.maxEndDate !== undefined) {
queryParameters['maxEndDate'] = (requestParameters.maxEndDate as any).toISOString();
}
if (requestParameters.isMovie !== undefined) {
queryParameters['isMovie'] = requestParameters.isMovie;
}
if (requestParameters.isSeries !== undefined) {
queryParameters['isSeries'] = requestParameters.isSeries;
}
if (requestParameters.isNews !== undefined) {
queryParameters['isNews'] = requestParameters.isNews;
}
if (requestParameters.isKids !== undefined) {
queryParameters['isKids'] = requestParameters.isKids;
}
if (requestParameters.isSports !== undefined) {
queryParameters['isSports'] = requestParameters.isSports;
}
if (requestParameters.startIndex !== undefined) {
queryParameters['startIndex'] = requestParameters.startIndex;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
if (requestParameters.sortBy) {
queryParameters['sortBy'] = requestParameters.sortBy;
}
if (requestParameters.sortOrder) {
queryParameters['sortOrder'] = requestParameters.sortOrder;
}
if (requestParameters.genres) {
queryParameters['genres'] = requestParameters.genres;
}
if (requestParameters.genreIds) {
queryParameters['genreIds'] = requestParameters.genreIds;
}
if (requestParameters.enableImages !== undefined) {
queryParameters['enableImages'] = requestParameters.enableImages;
}
if (requestParameters.imageTypeLimit !== undefined) {
queryParameters['imageTypeLimit'] = requestParameters.imageTypeLimit;
}
if (requestParameters.enableImageTypes) {
queryParameters['enableImageTypes'] = requestParameters.enableImageTypes;
}
if (requestParameters.enableUserData !== undefined) {
queryParameters['enableUserData'] = requestParameters.enableUserData;
}
if (requestParameters.seriesTimerId !== undefined) {
queryParameters['seriesTimerId'] = requestParameters.seriesTimerId;
}
if (requestParameters.librarySeriesId !== undefined) {
queryParameters['librarySeriesId'] = requestParameters.librarySeriesId;
}
if (requestParameters.fields) {
queryParameters['fields'] = requestParameters.fields;
}
if (requestParameters.enableTotalRecordCount !== undefined) {
queryParameters['enableTotalRecordCount'] = requestParameters.enableTotalRecordCount;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Programs`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets available live tv epgs.
*/
async getLiveTvPrograms(requestParameters: GetLiveTvProgramsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getLiveTvProgramsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a live tv program.
*/
async getProgramRaw(requestParameters: GetProgramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDto>> {
if (requestParameters.programId === null || requestParameters.programId === undefined) {
throw new runtime.RequiredError('programId','Required parameter requestParameters.programId was null or undefined when calling getProgram.');
}
const queryParameters: any = {};
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Programs/{programId}`.replace(`{${"programId"}}`, encodeURIComponent(String(requestParameters.programId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoFromJSON(jsonValue));
}
/**
* Gets a live tv program.
*/
async getProgram(requestParameters: GetProgramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDto> {
const response = await this.getProgramRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets available live tv epgs.
*/
async getProgramsRaw(requestParameters: GetProgramsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Programs`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: GetProgramsRequestToJSON(requestParameters.getProgramsRequest),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets available live tv epgs.
*/
async getPrograms(requestParameters: GetProgramsOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getProgramsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets recommended live tv epgs.
*/
async getRecommendedProgramsRaw(requestParameters: GetRecommendedProgramsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
if (requestParameters.isAiring !== undefined) {
queryParameters['isAiring'] = requestParameters.isAiring;
}
if (requestParameters.hasAired !== undefined) {
queryParameters['hasAired'] = requestParameters.hasAired;
}
if (requestParameters.isSeries !== undefined) {
queryParameters['isSeries'] = requestParameters.isSeries;
}
if (requestParameters.isMovie !== undefined) {
queryParameters['isMovie'] = requestParameters.isMovie;
}
if (requestParameters.isNews !== undefined) {
queryParameters['isNews'] = requestParameters.isNews;
}
if (requestParameters.isKids !== undefined) {
queryParameters['isKids'] = requestParameters.isKids;
}
if (requestParameters.isSports !== undefined) {
queryParameters['isSports'] = requestParameters.isSports;
}
if (requestParameters.enableImages !== undefined) {
queryParameters['enableImages'] = requestParameters.enableImages;
}
if (requestParameters.imageTypeLimit !== undefined) {
queryParameters['imageTypeLimit'] = requestParameters.imageTypeLimit;
}
if (requestParameters.enableImageTypes) {
queryParameters['enableImageTypes'] = requestParameters.enableImageTypes;
}
if (requestParameters.genreIds) {
queryParameters['genreIds'] = requestParameters.genreIds;
}
if (requestParameters.fields) {
queryParameters['fields'] = requestParameters.fields;
}
if (requestParameters.enableUserData !== undefined) {
queryParameters['enableUserData'] = requestParameters.enableUserData;
}
if (requestParameters.enableTotalRecordCount !== undefined) {
queryParameters['enableTotalRecordCount'] = requestParameters.enableTotalRecordCount;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Programs/Recommended`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets recommended live tv epgs.
*/
async getRecommendedPrograms(requestParameters: GetRecommendedProgramsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getRecommendedProgramsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a live tv recording.
*/
async getRecordingRaw(requestParameters: GetRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDto>> {
if (requestParameters.recordingId === null || requestParameters.recordingId === undefined) {
throw new runtime.RequiredError('recordingId','Required parameter requestParameters.recordingId was null or undefined when calling getRecording.');
}
const queryParameters: any = {};
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Recordings/{recordingId}`.replace(`{${"recordingId"}}`, encodeURIComponent(String(requestParameters.recordingId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoFromJSON(jsonValue));
}
/**
* Gets a live tv recording.
*/
async getRecording(requestParameters: GetRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDto> {
const response = await this.getRecordingRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets recording folders.
*/
async getRecordingFoldersRaw(requestParameters: GetRecordingFoldersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Recordings/Folders`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets recording folders.
*/
async getRecordingFolders(requestParameters: GetRecordingFoldersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getRecordingFoldersRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get recording group.
*/
async getRecordingGroupRaw(requestParameters: GetRecordingGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.groupId === null || requestParameters.groupId === undefined) {
throw new runtime.RequiredError('groupId','Required parameter requestParameters.groupId was null or undefined when calling getRecordingGroup.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Recordings/Groups/{groupId}`.replace(`{${"groupId"}}`, encodeURIComponent(String(requestParameters.groupId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Get recording group.
*/
async getRecordingGroup(requestParameters: GetRecordingGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.getRecordingGroupRaw(requestParameters, initOverrides);
}
/**
* Gets live tv recording groups.
*/
async getRecordingGroupsRaw(requestParameters: GetRecordingGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Recordings/Groups`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets live tv recording groups.
*/
async getRecordingGroups(requestParameters: GetRecordingGroupsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getRecordingGroupsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets live tv recordings.
*/
async getRecordingsRaw(requestParameters: GetRecordingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.channelId !== undefined) {
queryParameters['channelId'] = requestParameters.channelId;
}
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
if (requestParameters.startIndex !== undefined) {
queryParameters['startIndex'] = requestParameters.startIndex;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
if (requestParameters.status !== undefined) {
queryParameters['status'] = requestParameters.status;
}
if (requestParameters.isInProgress !== undefined) {
queryParameters['isInProgress'] = requestParameters.isInProgress;
}
if (requestParameters.seriesTimerId !== undefined) {
queryParameters['seriesTimerId'] = requestParameters.seriesTimerId;
}
if (requestParameters.enableImages !== undefined) {
queryParameters['enableImages'] = requestParameters.enableImages;
}
if (requestParameters.imageTypeLimit !== undefined) {
queryParameters['imageTypeLimit'] = requestParameters.imageTypeLimit;
}
if (requestParameters.enableImageTypes) {
queryParameters['enableImageTypes'] = requestParameters.enableImageTypes;
}
if (requestParameters.fields) {
queryParameters['fields'] = requestParameters.fields;
}
if (requestParameters.enableUserData !== undefined) {
queryParameters['enableUserData'] = requestParameters.enableUserData;
}
if (requestParameters.isMovie !== undefined) {
queryParameters['isMovie'] = requestParameters.isMovie;
}
if (requestParameters.isSeries !== undefined) {
queryParameters['isSeries'] = requestParameters.isSeries;
}
if (requestParameters.isKids !== undefined) {
queryParameters['isKids'] = requestParameters.isKids;
}
if (requestParameters.isSports !== undefined) {
queryParameters['isSports'] = requestParameters.isSports;
}
if (requestParameters.isNews !== undefined) {
queryParameters['isNews'] = requestParameters.isNews;
}
if (requestParameters.isLibraryItem !== undefined) {
queryParameters['isLibraryItem'] = requestParameters.isLibraryItem;
}
if (requestParameters.enableTotalRecordCount !== undefined) {
queryParameters['enableTotalRecordCount'] = requestParameters.enableTotalRecordCount;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Recordings`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets live tv recordings.
*/
async getRecordings(requestParameters: GetRecordingsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getRecordingsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets live tv recording series.
*/
async getRecordingsSeriesRaw(requestParameters: GetRecordingsSeriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BaseItemDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.channelId !== undefined) {
queryParameters['channelId'] = requestParameters.channelId;
}
if (requestParameters.userId !== undefined) {
queryParameters['userId'] = requestParameters.userId;
}
if (requestParameters.groupId !== undefined) {
queryParameters['groupId'] = requestParameters.groupId;
}
if (requestParameters.startIndex !== undefined) {
queryParameters['startIndex'] = requestParameters.startIndex;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
if (requestParameters.status !== undefined) {
queryParameters['status'] = requestParameters.status;
}
if (requestParameters.isInProgress !== undefined) {
queryParameters['isInProgress'] = requestParameters.isInProgress;
}
if (requestParameters.seriesTimerId !== undefined) {
queryParameters['seriesTimerId'] = requestParameters.seriesTimerId;
}
if (requestParameters.enableImages !== undefined) {
queryParameters['enableImages'] = requestParameters.enableImages;
}
if (requestParameters.imageTypeLimit !== undefined) {
queryParameters['imageTypeLimit'] = requestParameters.imageTypeLimit;
}
if (requestParameters.enableImageTypes) {
queryParameters['enableImageTypes'] = requestParameters.enableImageTypes;
}
if (requestParameters.fields) {
queryParameters['fields'] = requestParameters.fields;
}
if (requestParameters.enableUserData !== undefined) {
queryParameters['enableUserData'] = requestParameters.enableUserData;
}
if (requestParameters.enableTotalRecordCount !== undefined) {
queryParameters['enableTotalRecordCount'] = requestParameters.enableTotalRecordCount;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Recordings/Series`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => BaseItemDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets live tv recording series.
*/
async getRecordingsSeries(requestParameters: GetRecordingsSeriesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseItemDtoQueryResult> {
const response = await this.getRecordingsSeriesRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets available countries.
*/
async getSchedulesDirectCountriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/ListingProviders/SchedulesDirect/Countries`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets available countries.
*/
async getSchedulesDirectCountries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getSchedulesDirectCountriesRaw(initOverrides);
return await response.value();
}
/**
* Gets a live tv series timer.
*/
async getSeriesTimerRaw(requestParameters: GetSeriesTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SeriesTimerInfoDto>> {
if (requestParameters.timerId === null || requestParameters.timerId === undefined) {
throw new runtime.RequiredError('timerId','Required parameter requestParameters.timerId was null or undefined when calling getSeriesTimer.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/SeriesTimers/{timerId}`.replace(`{${"timerId"}}`, encodeURIComponent(String(requestParameters.timerId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => SeriesTimerInfoDtoFromJSON(jsonValue));
}
/**
* Gets a live tv series timer.
*/
async getSeriesTimer(requestParameters: GetSeriesTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SeriesTimerInfoDto> {
const response = await this.getSeriesTimerRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets live tv series timers.
*/
async getSeriesTimersRaw(requestParameters: GetSeriesTimersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SeriesTimerInfoDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.sortBy !== undefined) {
queryParameters['sortBy'] = requestParameters.sortBy;
}
if (requestParameters.sortOrder !== undefined) {
queryParameters['sortOrder'] = requestParameters.sortOrder;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/SeriesTimers`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => SeriesTimerInfoDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets live tv series timers.
*/
async getSeriesTimers(requestParameters: GetSeriesTimersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SeriesTimerInfoDtoQueryResult> {
const response = await this.getSeriesTimersRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a timer.
*/
async getTimerRaw(requestParameters: GetTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimerInfoDto>> {
if (requestParameters.timerId === null || requestParameters.timerId === undefined) {
throw new runtime.RequiredError('timerId','Required parameter requestParameters.timerId was null or undefined when calling getTimer.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Timers/{timerId}`.replace(`{${"timerId"}}`, encodeURIComponent(String(requestParameters.timerId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => TimerInfoDtoFromJSON(jsonValue));
}
/**
* Gets a timer.
*/
async getTimer(requestParameters: GetTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimerInfoDto> {
const response = await this.getTimerRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets the live tv timers.
*/
async getTimersRaw(requestParameters: GetTimersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimerInfoDtoQueryResult>> {
const queryParameters: any = {};
if (requestParameters.channelId !== undefined) {
queryParameters['channelId'] = requestParameters.channelId;
}
if (requestParameters.seriesTimerId !== undefined) {
queryParameters['seriesTimerId'] = requestParameters.seriesTimerId;
}
if (requestParameters.isActive !== undefined) {
queryParameters['isActive'] = requestParameters.isActive;
}
if (requestParameters.isScheduled !== undefined) {
queryParameters['isScheduled'] = requestParameters.isScheduled;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Timers`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => TimerInfoDtoQueryResultFromJSON(jsonValue));
}
/**
* Gets the live tv timers.
*/
async getTimers(requestParameters: GetTimersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimerInfoDtoQueryResult> {
const response = await this.getTimersRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get tuner host types.
*/
async getTunerHostTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<NameIdPair>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/TunerHosts/Types`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NameIdPairFromJSON));
}
/**
* Get tuner host types.
*/
async getTunerHostTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NameIdPair>> {
const response = await this.getTunerHostTypesRaw(initOverrides);
return await response.value();
}
/**
* Resets a tv tuner.
*/
async resetTunerRaw(requestParameters: ResetTunerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.tunerId === null || requestParameters.tunerId === undefined) {
throw new runtime.RequiredError('tunerId','Required parameter requestParameters.tunerId was null or undefined when calling resetTuner.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Tuners/{tunerId}/Reset`.replace(`{${"tunerId"}}`, encodeURIComponent(String(requestParameters.tunerId))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Resets a tv tuner.
*/
async resetTuner(requestParameters: ResetTunerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.resetTunerRaw(requestParameters, initOverrides);
}
/**
* Set channel mappings.
*/
async setChannelMappingRaw(requestParameters: SetChannelMappingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TunerChannelMapping>> {
if (requestParameters.setChannelMappingRequest === null || requestParameters.setChannelMappingRequest === undefined) {
throw new runtime.RequiredError('setChannelMappingRequest','Required parameter requestParameters.setChannelMappingRequest was null or undefined when calling setChannelMapping.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/ChannelMappings`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SetChannelMappingRequestToJSON(requestParameters.setChannelMappingRequest),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => TunerChannelMappingFromJSON(jsonValue));
}
/**
* Set channel mappings.
*/
async setChannelMapping(requestParameters: SetChannelMappingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TunerChannelMapping> {
const response = await this.setChannelMappingRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Updates a live tv series timer.
*/
async updateSeriesTimerRaw(requestParameters: UpdateSeriesTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.timerId === null || requestParameters.timerId === undefined) {
throw new runtime.RequiredError('timerId','Required parameter requestParameters.timerId was null or undefined when calling updateSeriesTimer.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/SeriesTimers/{timerId}`.replace(`{${"timerId"}}`, encodeURIComponent(String(requestParameters.timerId))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateSeriesTimerRequestToJSON(requestParameters.createSeriesTimerRequest),
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Updates a live tv series timer.
*/
async updateSeriesTimer(requestParameters: UpdateSeriesTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.updateSeriesTimerRaw(requestParameters, initOverrides);
}
/**
* Updates a live tv timer.
*/
async updateTimerRaw(requestParameters: UpdateTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.timerId === null || requestParameters.timerId === undefined) {
throw new runtime.RequiredError('timerId','Required parameter requestParameters.timerId was null or undefined when calling updateTimer.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/LiveTv/Timers/{timerId}`.replace(`{${"timerId"}}`, encodeURIComponent(String(requestParameters.timerId))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateTimerRequestToJSON(requestParameters.createTimerRequest),
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Updates a live tv timer.
*/
async updateTimer(requestParameters: UpdateTimerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.updateTimerRaw(requestParameters, initOverrides);
}
}