@jellyfin/sdk 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/lib/discovery/discovery-service.js +4 -9
- package/lib/discovery/recommended-server-discovery.js +17 -22
- package/lib/generated-client/api/activity-log-api.js +8 -11
- package/lib/generated-client/api/api-key-api.js +24 -31
- package/lib/generated-client/api/artists-api.js +24 -31
- package/lib/generated-client/api/audio-api.d.ts +12 -12
- package/lib/generated-client/api/audio-api.js +28 -37
- package/lib/generated-client/api/branding-api.js +21 -28
- package/lib/generated-client/api/channels-api.js +40 -51
- package/lib/generated-client/api/client-log-api.js +8 -11
- package/lib/generated-client/api/collection-api.js +24 -31
- package/lib/generated-client/api/configuration-api.js +40 -51
- package/lib/generated-client/api/dashboard-api.js +15 -20
- package/lib/generated-client/api/devices-api.js +40 -51
- package/lib/generated-client/api/display-preferences-api.js +16 -21
- package/lib/generated-client/api/dynamic-hls-api.d.ts +27 -27
- package/lib/generated-client/api/dynamic-hls-api.js +72 -91
- package/lib/generated-client/api/environment-api.js +48 -61
- package/lib/generated-client/api/filter-api.js +16 -21
- package/lib/generated-client/api/genres-api.js +16 -21
- package/lib/generated-client/api/hls-segment-api.js +37 -48
- package/lib/generated-client/api/image-api.js +269 -344
- package/lib/generated-client/api/instant-mix-api.js +64 -81
- package/lib/generated-client/api/item-lookup-api.js +88 -111
- package/lib/generated-client/api/item-refresh-api.js +8 -11
- package/lib/generated-client/api/item-update-api.js +24 -31
- package/lib/generated-client/api/items-api.js +32 -41
- package/lib/generated-client/api/library-api.js +200 -251
- package/lib/generated-client/api/library-structure-api.js +64 -81
- package/lib/generated-client/api/live-tv-api.js +326 -409
- package/lib/generated-client/api/localization-api.js +32 -41
- package/lib/generated-client/api/lyrics-api.js +48 -61
- package/lib/generated-client/api/media-info-api.js +40 -51
- package/lib/generated-client/api/movies-api.js +8 -11
- package/lib/generated-client/api/music-genres-api.js +16 -21
- package/lib/generated-client/api/package-api.js +48 -61
- package/lib/generated-client/api/persons-api.js +16 -21
- package/lib/generated-client/api/playlists-api.js +80 -101
- package/lib/generated-client/api/playstate-api.js +72 -91
- package/lib/generated-client/api/plugins-api.js +72 -91
- package/lib/generated-client/api/quick-connect-api.js +29 -38
- package/lib/generated-client/api/remote-image-api.js +24 -31
- package/lib/generated-client/api/scheduled-tasks-api.js +40 -51
- package/lib/generated-client/api/search-api.js +8 -11
- package/lib/generated-client/api/session-api.js +128 -161
- package/lib/generated-client/api/startup-api.js +56 -71
- package/lib/generated-client/api/studios-api.js +16 -21
- package/lib/generated-client/api/subtitle-api.js +78 -99
- package/lib/generated-client/api/suggestions-api.js +8 -11
- package/lib/generated-client/api/sync-play-api.js +168 -211
- package/lib/generated-client/api/system-api.js +77 -98
- package/lib/generated-client/api/time-sync-api.js +7 -10
- package/lib/generated-client/api/tmdb-api.js +8 -11
- package/lib/generated-client/api/trailers-api.js +8 -11
- package/lib/generated-client/api/trickplay-api.js +16 -21
- package/lib/generated-client/api/tv-shows-api.js +32 -41
- package/lib/generated-client/api/universal-audio-api.js +16 -21
- package/lib/generated-client/api/user-api.js +107 -136
- package/lib/generated-client/api/user-library-api.js +80 -101
- package/lib/generated-client/api/user-views-api.js +16 -21
- package/lib/generated-client/api/video-attachments-api.js +7 -10
- package/lib/generated-client/api/videos-api.d.ts +12 -12
- package/lib/generated-client/api/videos-api.js +52 -67
- package/lib/generated-client/api/years-api.js +16 -21
- package/lib/generated-client/common.js +8 -11
- package/lib/generated-client/models/search-hint.d.ts +1 -1
- package/lib/utils/api/image-urls-api.js +16 -4
- package/lib/versions.d.ts +1 -1
- package/lib/versions.js +1 -1
- package/package.json +10 -10
- package/lib/node_modules/tslib/tslib.es6.js +0 -33
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import globalAxios from 'axios';
|
|
3
2
|
import { assertParamExists, DUMMY_BASE_URL, setApiKeyToObject, setSearchParams, toPathString, serializeDataIfNeeded, createRequestFunction } from '../common.js';
|
|
4
3
|
import { BaseAPI, BASE_PATH } from '../base.js';
|
|
@@ -28,7 +27,7 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
28
27
|
* @param {*} [options] Override http request option.
|
|
29
28
|
* @throws {RequiredError}
|
|
30
29
|
*/
|
|
31
|
-
closeLiveStream:
|
|
30
|
+
closeLiveStream: async (liveStreamId, options = {}) => {
|
|
32
31
|
// verify required parameter 'liveStreamId' is not null or undefined
|
|
33
32
|
assertParamExists('closeLiveStream', 'liveStreamId', liveStreamId);
|
|
34
33
|
const localVarPath = `/LiveStreams/Close`;
|
|
@@ -38,22 +37,22 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
38
37
|
if (configuration) {
|
|
39
38
|
baseOptions = configuration.baseOptions;
|
|
40
39
|
}
|
|
41
|
-
const localVarRequestOptions =
|
|
40
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
42
41
|
const localVarHeaderParameter = {};
|
|
43
42
|
const localVarQueryParameter = {};
|
|
44
43
|
// authentication CustomAuthentication required
|
|
45
|
-
|
|
44
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
46
45
|
if (liveStreamId !== undefined) {
|
|
47
46
|
localVarQueryParameter['liveStreamId'] = liveStreamId;
|
|
48
47
|
}
|
|
49
48
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
50
49
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
51
|
-
localVarRequestOptions.headers =
|
|
50
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
52
51
|
return {
|
|
53
52
|
url: toPathString(localVarUrlObj),
|
|
54
53
|
options: localVarRequestOptions,
|
|
55
54
|
};
|
|
56
|
-
}
|
|
55
|
+
},
|
|
57
56
|
/**
|
|
58
57
|
*
|
|
59
58
|
* @summary Tests the network with a request with the size of the bitrate.
|
|
@@ -61,7 +60,7 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
61
60
|
* @param {*} [options] Override http request option.
|
|
62
61
|
* @throws {RequiredError}
|
|
63
62
|
*/
|
|
64
|
-
getBitrateTestBytes:
|
|
63
|
+
getBitrateTestBytes: async (size, options = {}) => {
|
|
65
64
|
const localVarPath = `/Playback/BitrateTest`;
|
|
66
65
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
67
66
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -69,22 +68,22 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
69
68
|
if (configuration) {
|
|
70
69
|
baseOptions = configuration.baseOptions;
|
|
71
70
|
}
|
|
72
|
-
const localVarRequestOptions =
|
|
71
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
73
72
|
const localVarHeaderParameter = {};
|
|
74
73
|
const localVarQueryParameter = {};
|
|
75
74
|
// authentication CustomAuthentication required
|
|
76
|
-
|
|
75
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
77
76
|
if (size !== undefined) {
|
|
78
77
|
localVarQueryParameter['size'] = size;
|
|
79
78
|
}
|
|
80
79
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
81
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
|
-
localVarRequestOptions.headers =
|
|
81
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
83
82
|
return {
|
|
84
83
|
url: toPathString(localVarUrlObj),
|
|
85
84
|
options: localVarRequestOptions,
|
|
86
85
|
};
|
|
87
|
-
}
|
|
86
|
+
},
|
|
88
87
|
/**
|
|
89
88
|
*
|
|
90
89
|
* @summary Gets live playback media info for an item.
|
|
@@ -93,7 +92,7 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
93
92
|
* @param {*} [options] Override http request option.
|
|
94
93
|
* @throws {RequiredError}
|
|
95
94
|
*/
|
|
96
|
-
getPlaybackInfo:
|
|
95
|
+
getPlaybackInfo: async (itemId, userId, options = {}) => {
|
|
97
96
|
// verify required parameter 'itemId' is not null or undefined
|
|
98
97
|
assertParamExists('getPlaybackInfo', 'itemId', itemId);
|
|
99
98
|
const localVarPath = `/Items/{itemId}/PlaybackInfo`
|
|
@@ -104,22 +103,22 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
104
103
|
if (configuration) {
|
|
105
104
|
baseOptions = configuration.baseOptions;
|
|
106
105
|
}
|
|
107
|
-
const localVarRequestOptions =
|
|
106
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
108
107
|
const localVarHeaderParameter = {};
|
|
109
108
|
const localVarQueryParameter = {};
|
|
110
109
|
// authentication CustomAuthentication required
|
|
111
|
-
|
|
110
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
112
111
|
if (userId !== undefined) {
|
|
113
112
|
localVarQueryParameter['userId'] = userId;
|
|
114
113
|
}
|
|
115
114
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
116
115
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
117
|
-
localVarRequestOptions.headers =
|
|
116
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
118
117
|
return {
|
|
119
118
|
url: toPathString(localVarUrlObj),
|
|
120
119
|
options: localVarRequestOptions,
|
|
121
120
|
};
|
|
122
|
-
}
|
|
121
|
+
},
|
|
123
122
|
/**
|
|
124
123
|
* For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. Query parameters are obsolete.
|
|
125
124
|
* @summary Gets live playback media info for an item.
|
|
@@ -142,7 +141,7 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
142
141
|
* @param {*} [options] Override http request option.
|
|
143
142
|
* @throws {RequiredError}
|
|
144
143
|
*/
|
|
145
|
-
getPostedPlaybackInfo:
|
|
144
|
+
getPostedPlaybackInfo: async (itemId, userId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, mediaSourceId, liveStreamId, autoOpenLiveStream, enableDirectPlay, enableDirectStream, enableTranscoding, allowVideoStreamCopy, allowAudioStreamCopy, playbackInfoDto, options = {}) => {
|
|
146
145
|
// verify required parameter 'itemId' is not null or undefined
|
|
147
146
|
assertParamExists('getPostedPlaybackInfo', 'itemId', itemId);
|
|
148
147
|
const localVarPath = `/Items/{itemId}/PlaybackInfo`
|
|
@@ -153,11 +152,11 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
153
152
|
if (configuration) {
|
|
154
153
|
baseOptions = configuration.baseOptions;
|
|
155
154
|
}
|
|
156
|
-
const localVarRequestOptions =
|
|
155
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
157
156
|
const localVarHeaderParameter = {};
|
|
158
157
|
const localVarQueryParameter = {};
|
|
159
158
|
// authentication CustomAuthentication required
|
|
160
|
-
|
|
159
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
161
160
|
if (userId !== undefined) {
|
|
162
161
|
localVarQueryParameter['userId'] = userId;
|
|
163
162
|
}
|
|
@@ -203,13 +202,13 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
203
202
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
204
203
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
205
204
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
206
|
-
localVarRequestOptions.headers =
|
|
205
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
207
206
|
localVarRequestOptions.data = serializeDataIfNeeded(playbackInfoDto, localVarRequestOptions, configuration);
|
|
208
207
|
return {
|
|
209
208
|
url: toPathString(localVarUrlObj),
|
|
210
209
|
options: localVarRequestOptions,
|
|
211
210
|
};
|
|
212
|
-
}
|
|
211
|
+
},
|
|
213
212
|
/**
|
|
214
213
|
*
|
|
215
214
|
* @summary Opens a media source.
|
|
@@ -228,7 +227,7 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
228
227
|
* @param {*} [options] Override http request option.
|
|
229
228
|
* @throws {RequiredError}
|
|
230
229
|
*/
|
|
231
|
-
openLiveStream:
|
|
230
|
+
openLiveStream: async (openToken, userId, playSessionId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, itemId, enableDirectPlay, enableDirectStream, openLiveStreamDto, options = {}) => {
|
|
232
231
|
const localVarPath = `/LiveStreams/Open`;
|
|
233
232
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
234
233
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -236,11 +235,11 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
236
235
|
if (configuration) {
|
|
237
236
|
baseOptions = configuration.baseOptions;
|
|
238
237
|
}
|
|
239
|
-
const localVarRequestOptions =
|
|
238
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
240
239
|
const localVarHeaderParameter = {};
|
|
241
240
|
const localVarQueryParameter = {};
|
|
242
241
|
// authentication CustomAuthentication required
|
|
243
|
-
|
|
242
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
244
243
|
if (openToken !== undefined) {
|
|
245
244
|
localVarQueryParameter['openToken'] = openToken;
|
|
246
245
|
}
|
|
@@ -277,13 +276,13 @@ const MediaInfoApiAxiosParamCreator = function (configuration) {
|
|
|
277
276
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
278
277
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
279
278
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
280
|
-
localVarRequestOptions.headers =
|
|
279
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
281
280
|
localVarRequestOptions.data = serializeDataIfNeeded(openLiveStreamDto, localVarRequestOptions, configuration);
|
|
282
281
|
return {
|
|
283
282
|
url: toPathString(localVarUrlObj),
|
|
284
283
|
options: localVarRequestOptions,
|
|
285
284
|
};
|
|
286
|
-
}
|
|
285
|
+
},
|
|
287
286
|
};
|
|
288
287
|
};
|
|
289
288
|
/**
|
|
@@ -300,11 +299,9 @@ const MediaInfoApiFp = function (configuration) {
|
|
|
300
299
|
* @param {*} [options] Override http request option.
|
|
301
300
|
* @throws {RequiredError}
|
|
302
301
|
*/
|
|
303
|
-
closeLiveStream(liveStreamId, options) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
307
|
-
});
|
|
302
|
+
async closeLiveStream(liveStreamId, options) {
|
|
303
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.closeLiveStream(liveStreamId, options);
|
|
304
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
308
305
|
},
|
|
309
306
|
/**
|
|
310
307
|
*
|
|
@@ -313,11 +310,9 @@ const MediaInfoApiFp = function (configuration) {
|
|
|
313
310
|
* @param {*} [options] Override http request option.
|
|
314
311
|
* @throws {RequiredError}
|
|
315
312
|
*/
|
|
316
|
-
getBitrateTestBytes(size, options) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
320
|
-
});
|
|
313
|
+
async getBitrateTestBytes(size, options) {
|
|
314
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getBitrateTestBytes(size, options);
|
|
315
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
321
316
|
},
|
|
322
317
|
/**
|
|
323
318
|
*
|
|
@@ -327,11 +322,9 @@ const MediaInfoApiFp = function (configuration) {
|
|
|
327
322
|
* @param {*} [options] Override http request option.
|
|
328
323
|
* @throws {RequiredError}
|
|
329
324
|
*/
|
|
330
|
-
getPlaybackInfo(itemId, userId, options) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
334
|
-
});
|
|
325
|
+
async getPlaybackInfo(itemId, userId, options) {
|
|
326
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlaybackInfo(itemId, userId, options);
|
|
327
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
335
328
|
},
|
|
336
329
|
/**
|
|
337
330
|
* For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. Query parameters are obsolete.
|
|
@@ -355,11 +348,9 @@ const MediaInfoApiFp = function (configuration) {
|
|
|
355
348
|
* @param {*} [options] Override http request option.
|
|
356
349
|
* @throws {RequiredError}
|
|
357
350
|
*/
|
|
358
|
-
getPostedPlaybackInfo(itemId, userId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, mediaSourceId, liveStreamId, autoOpenLiveStream, enableDirectPlay, enableDirectStream, enableTranscoding, allowVideoStreamCopy, allowAudioStreamCopy, playbackInfoDto, options) {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
362
|
-
});
|
|
351
|
+
async getPostedPlaybackInfo(itemId, userId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, mediaSourceId, liveStreamId, autoOpenLiveStream, enableDirectPlay, enableDirectStream, enableTranscoding, allowVideoStreamCopy, allowAudioStreamCopy, playbackInfoDto, options) {
|
|
352
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPostedPlaybackInfo(itemId, userId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, mediaSourceId, liveStreamId, autoOpenLiveStream, enableDirectPlay, enableDirectStream, enableTranscoding, allowVideoStreamCopy, allowAudioStreamCopy, playbackInfoDto, options);
|
|
353
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
363
354
|
},
|
|
364
355
|
/**
|
|
365
356
|
*
|
|
@@ -379,11 +370,9 @@ const MediaInfoApiFp = function (configuration) {
|
|
|
379
370
|
* @param {*} [options] Override http request option.
|
|
380
371
|
* @throws {RequiredError}
|
|
381
372
|
*/
|
|
382
|
-
openLiveStream(openToken, userId, playSessionId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, itemId, enableDirectPlay, enableDirectStream, openLiveStreamDto, options) {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
386
|
-
});
|
|
373
|
+
async openLiveStream(openToken, userId, playSessionId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, itemId, enableDirectPlay, enableDirectStream, openLiveStreamDto, options) {
|
|
374
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.openLiveStream(openToken, userId, playSessionId, maxStreamingBitrate, startTimeTicks, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, itemId, enableDirectPlay, enableDirectStream, openLiveStreamDto, options);
|
|
375
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
387
376
|
},
|
|
388
377
|
};
|
|
389
378
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import globalAxios from 'axios';
|
|
3
2
|
import { DUMMY_BASE_URL, setApiKeyToObject, setSearchParams, toPathString, createRequestFunction } from '../common.js';
|
|
4
3
|
import { BaseAPI, BASE_PATH } from '../base.js';
|
|
@@ -32,7 +31,7 @@ const MoviesApiAxiosParamCreator = function (configuration) {
|
|
|
32
31
|
* @param {*} [options] Override http request option.
|
|
33
32
|
* @throws {RequiredError}
|
|
34
33
|
*/
|
|
35
|
-
getMovieRecommendations:
|
|
34
|
+
getMovieRecommendations: async (userId, parentId, fields, categoryLimit, itemLimit, options = {}) => {
|
|
36
35
|
const localVarPath = `/Movies/Recommendations`;
|
|
37
36
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38
37
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -40,11 +39,11 @@ const MoviesApiAxiosParamCreator = function (configuration) {
|
|
|
40
39
|
if (configuration) {
|
|
41
40
|
baseOptions = configuration.baseOptions;
|
|
42
41
|
}
|
|
43
|
-
const localVarRequestOptions =
|
|
42
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
44
43
|
const localVarHeaderParameter = {};
|
|
45
44
|
const localVarQueryParameter = {};
|
|
46
45
|
// authentication CustomAuthentication required
|
|
47
|
-
|
|
46
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
48
47
|
if (userId !== undefined) {
|
|
49
48
|
localVarQueryParameter['userId'] = userId;
|
|
50
49
|
}
|
|
@@ -62,12 +61,12 @@ const MoviesApiAxiosParamCreator = function (configuration) {
|
|
|
62
61
|
}
|
|
63
62
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
64
63
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
65
|
-
localVarRequestOptions.headers =
|
|
64
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
66
65
|
return {
|
|
67
66
|
url: toPathString(localVarUrlObj),
|
|
68
67
|
options: localVarRequestOptions,
|
|
69
68
|
};
|
|
70
|
-
}
|
|
69
|
+
},
|
|
71
70
|
};
|
|
72
71
|
};
|
|
73
72
|
/**
|
|
@@ -88,11 +87,9 @@ const MoviesApiFp = function (configuration) {
|
|
|
88
87
|
* @param {*} [options] Override http request option.
|
|
89
88
|
* @throws {RequiredError}
|
|
90
89
|
*/
|
|
91
|
-
getMovieRecommendations(userId, parentId, fields, categoryLimit, itemLimit, options) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
95
|
-
});
|
|
90
|
+
async getMovieRecommendations(userId, parentId, fields, categoryLimit, itemLimit, options) {
|
|
91
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMovieRecommendations(userId, parentId, fields, categoryLimit, itemLimit, options);
|
|
92
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
96
93
|
},
|
|
97
94
|
};
|
|
98
95
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import globalAxios from 'axios';
|
|
3
2
|
import { assertParamExists, DUMMY_BASE_URL, setApiKeyToObject, setSearchParams, toPathString, createRequestFunction } from '../common.js';
|
|
4
3
|
import { BaseAPI, BASE_PATH } from '../base.js';
|
|
@@ -29,7 +28,7 @@ const MusicGenresApiAxiosParamCreator = function (configuration) {
|
|
|
29
28
|
* @param {*} [options] Override http request option.
|
|
30
29
|
* @throws {RequiredError}
|
|
31
30
|
*/
|
|
32
|
-
getMusicGenre:
|
|
31
|
+
getMusicGenre: async (genreName, userId, options = {}) => {
|
|
33
32
|
// verify required parameter 'genreName' is not null or undefined
|
|
34
33
|
assertParamExists('getMusicGenre', 'genreName', genreName);
|
|
35
34
|
const localVarPath = `/MusicGenres/{genreName}`
|
|
@@ -40,22 +39,22 @@ const MusicGenresApiAxiosParamCreator = function (configuration) {
|
|
|
40
39
|
if (configuration) {
|
|
41
40
|
baseOptions = configuration.baseOptions;
|
|
42
41
|
}
|
|
43
|
-
const localVarRequestOptions =
|
|
42
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
44
43
|
const localVarHeaderParameter = {};
|
|
45
44
|
const localVarQueryParameter = {};
|
|
46
45
|
// authentication CustomAuthentication required
|
|
47
|
-
|
|
46
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
48
47
|
if (userId !== undefined) {
|
|
49
48
|
localVarQueryParameter['userId'] = userId;
|
|
50
49
|
}
|
|
51
50
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
52
51
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
53
|
-
localVarRequestOptions.headers =
|
|
52
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
54
53
|
return {
|
|
55
54
|
url: toPathString(localVarUrlObj),
|
|
56
55
|
options: localVarRequestOptions,
|
|
57
56
|
};
|
|
58
|
-
}
|
|
57
|
+
},
|
|
59
58
|
/**
|
|
60
59
|
*
|
|
61
60
|
* @summary Gets all music genres from a given item, folder, or the entire library.
|
|
@@ -81,7 +80,7 @@ const MusicGenresApiAxiosParamCreator = function (configuration) {
|
|
|
81
80
|
* @deprecated
|
|
82
81
|
* @throws {RequiredError}
|
|
83
82
|
*/
|
|
84
|
-
getMusicGenres:
|
|
83
|
+
getMusicGenres: async (startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, isFavorite, imageTypeLimit, enableImageTypes, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options = {}) => {
|
|
85
84
|
const localVarPath = `/MusicGenres`;
|
|
86
85
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
87
86
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -89,11 +88,11 @@ const MusicGenresApiAxiosParamCreator = function (configuration) {
|
|
|
89
88
|
if (configuration) {
|
|
90
89
|
baseOptions = configuration.baseOptions;
|
|
91
90
|
}
|
|
92
|
-
const localVarRequestOptions =
|
|
91
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
93
92
|
const localVarHeaderParameter = {};
|
|
94
93
|
const localVarQueryParameter = {};
|
|
95
94
|
// authentication CustomAuthentication required
|
|
96
|
-
|
|
95
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
97
96
|
if (startIndex !== undefined) {
|
|
98
97
|
localVarQueryParameter['startIndex'] = startIndex;
|
|
99
98
|
}
|
|
@@ -150,12 +149,12 @@ const MusicGenresApiAxiosParamCreator = function (configuration) {
|
|
|
150
149
|
}
|
|
151
150
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
152
151
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
153
|
-
localVarRequestOptions.headers =
|
|
152
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
154
153
|
return {
|
|
155
154
|
url: toPathString(localVarUrlObj),
|
|
156
155
|
options: localVarRequestOptions,
|
|
157
156
|
};
|
|
158
|
-
}
|
|
157
|
+
},
|
|
159
158
|
};
|
|
160
159
|
};
|
|
161
160
|
/**
|
|
@@ -173,11 +172,9 @@ const MusicGenresApiFp = function (configuration) {
|
|
|
173
172
|
* @param {*} [options] Override http request option.
|
|
174
173
|
* @throws {RequiredError}
|
|
175
174
|
*/
|
|
176
|
-
getMusicGenre(genreName, userId, options) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
180
|
-
});
|
|
175
|
+
async getMusicGenre(genreName, userId, options) {
|
|
176
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMusicGenre(genreName, userId, options);
|
|
177
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
181
178
|
},
|
|
182
179
|
/**
|
|
183
180
|
*
|
|
@@ -204,11 +201,9 @@ const MusicGenresApiFp = function (configuration) {
|
|
|
204
201
|
* @deprecated
|
|
205
202
|
* @throws {RequiredError}
|
|
206
203
|
*/
|
|
207
|
-
getMusicGenres(startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, isFavorite, imageTypeLimit, enableImageTypes, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options) {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
211
|
-
});
|
|
204
|
+
async getMusicGenres(startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, isFavorite, imageTypeLimit, enableImageTypes, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options) {
|
|
205
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMusicGenres(startIndex, limit, searchTerm, parentId, fields, excludeItemTypes, includeItemTypes, isFavorite, imageTypeLimit, enableImageTypes, userId, nameStartsWithOrGreater, nameStartsWith, nameLessThan, sortBy, sortOrder, enableImages, enableTotalRecordCount, options);
|
|
206
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
212
207
|
},
|
|
213
208
|
};
|
|
214
209
|
};
|