@easyedu/js-lsm-api 1.62.0 → 1.63.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/.openapi-generator/FILES +4 -0
- package/README.md +15 -2
- package/dist/apis/DispatchApi.d.ts +44 -0
- package/dist/apis/DispatchApi.js +104 -0
- package/dist/apis/PlayerApi.d.ts +183 -0
- package/dist/apis/PlayerApi.js +454 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/DispatchApi.d.ts +44 -0
- package/dist/esm/apis/DispatchApi.js +100 -0
- package/dist/esm/apis/PlayerApi.d.ts +183 -0
- package/dist/esm/apis/PlayerApi.js +450 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/docs/DispatchApi.md +134 -0
- package/docs/PlayerApi.md +760 -0
- package/package.json +1 -1
- package/src/apis/DispatchApi.ts +106 -0
- package/src/apis/PlayerApi.ts +559 -0
- package/src/apis/index.ts +2 -0
|
@@ -0,0 +1,760 @@
|
|
|
1
|
+
# PlayerApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com/stage1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getDispatchScormPlayer**](PlayerApi.md#getdispatchscormplayer) | **GET** /scorm/dispatch/session/{sessionId}/player | Dispatch SCORM player HTML page |
|
|
8
|
+
| [**getFileAsset**](PlayerApi.md#getfileasset) | **GET** /file/{contentId}/asset | File asset |
|
|
9
|
+
| [**getFilePlayer**](PlayerApi.md#getfileplayer) | **GET** /file/session/{sessionId}/player | File player HTML page |
|
|
10
|
+
| [**getImagePlayer**](PlayerApi.md#getimageplayer) | **GET** /image/session/{sessionId}/player | Image player HTML page |
|
|
11
|
+
| [**getPdfAsset**](PlayerApi.md#getpdfasset) | **GET** /pdf/{contentId}/asset | PDF asset |
|
|
12
|
+
| [**getPdfPlayer**](PlayerApi.md#getpdfplayer) | **GET** /pdf/session/{sessionId}/player | PDF player HTML page |
|
|
13
|
+
| [**getQuizPlayer**](PlayerApi.md#getquizplayer) | **GET** /quiz/session/{sessionId}/player | Quiz player HTML page |
|
|
14
|
+
| [**getScormAsset**](PlayerApi.md#getscormasset) | **GET** /scorm/{contentId}/scorm/asset/{assetPath} | SCORM package asset |
|
|
15
|
+
| [**getScormPlayer**](PlayerApi.md#getscormplayer) | **GET** /scorm/session/{sessionId}/player | SCORM player HTML page |
|
|
16
|
+
| [**getVideoAsset**](PlayerApi.md#getvideoasset) | **GET** /video/{contentId}/asset | Video asset |
|
|
17
|
+
| [**getVideoPlayer**](PlayerApi.md#getvideoplayer) | **GET** /video/session/{sessionId}/player | Video player HTML page |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## getDispatchScormPlayer
|
|
22
|
+
|
|
23
|
+
> getDispatchScormPlayer(sessionId)
|
|
24
|
+
|
|
25
|
+
Dispatch SCORM player HTML page
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
Configuration,
|
|
32
|
+
PlayerApi,
|
|
33
|
+
} from '@easyedu/js-lsm-api';
|
|
34
|
+
import type { GetDispatchScormPlayerRequest } from '@easyedu/js-lsm-api';
|
|
35
|
+
|
|
36
|
+
async function example() {
|
|
37
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
38
|
+
const api = new PlayerApi();
|
|
39
|
+
|
|
40
|
+
const body = {
|
|
41
|
+
// string
|
|
42
|
+
sessionId: sessionId_example,
|
|
43
|
+
} satisfies GetDispatchScormPlayerRequest;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const data = await api.getDispatchScormPlayer(body);
|
|
47
|
+
console.log(data);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Run the test
|
|
54
|
+
example().catch(console.error);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description | Notes |
|
|
61
|
+
|------------- | ------------- | ------------- | -------------|
|
|
62
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
`void` (Empty response body)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
No authorization required
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: Not defined
|
|
75
|
+
- **Accept**: Not defined
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### HTTP response details
|
|
79
|
+
| Status code | Description | Response headers |
|
|
80
|
+
|-------------|-------------|------------------|
|
|
81
|
+
| **200** | HTML player page | - |
|
|
82
|
+
| **401** | Dispatch token required | - |
|
|
83
|
+
| **404** | Session not found | - |
|
|
84
|
+
|
|
85
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## getFileAsset
|
|
89
|
+
|
|
90
|
+
> getFileAsset(contentId)
|
|
91
|
+
|
|
92
|
+
File asset
|
|
93
|
+
|
|
94
|
+
### Example
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import {
|
|
98
|
+
Configuration,
|
|
99
|
+
PlayerApi,
|
|
100
|
+
} from '@easyedu/js-lsm-api';
|
|
101
|
+
import type { GetFileAssetRequest } from '@easyedu/js-lsm-api';
|
|
102
|
+
|
|
103
|
+
async function example() {
|
|
104
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
105
|
+
const api = new PlayerApi();
|
|
106
|
+
|
|
107
|
+
const body = {
|
|
108
|
+
// string
|
|
109
|
+
contentId: contentId_example,
|
|
110
|
+
} satisfies GetFileAssetRequest;
|
|
111
|
+
|
|
112
|
+
try {
|
|
113
|
+
const data = await api.getFileAsset(body);
|
|
114
|
+
console.log(data);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.error(error);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Run the test
|
|
121
|
+
example().catch(console.error);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Parameters
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
| Name | Type | Description | Notes |
|
|
128
|
+
|------------- | ------------- | ------------- | -------------|
|
|
129
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
130
|
+
|
|
131
|
+
### Return type
|
|
132
|
+
|
|
133
|
+
`void` (Empty response body)
|
|
134
|
+
|
|
135
|
+
### Authorization
|
|
136
|
+
|
|
137
|
+
No authorization required
|
|
138
|
+
|
|
139
|
+
### HTTP request headers
|
|
140
|
+
|
|
141
|
+
- **Content-Type**: Not defined
|
|
142
|
+
- **Accept**: Not defined
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### HTTP response details
|
|
146
|
+
| Status code | Description | Response headers |
|
|
147
|
+
|-------------|-------------|------------------|
|
|
148
|
+
| **302** | Redirect to asset URL | - |
|
|
149
|
+
| **403** | Forbidden | - |
|
|
150
|
+
| **404** | Content not found | - |
|
|
151
|
+
|
|
152
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## getFilePlayer
|
|
156
|
+
|
|
157
|
+
> getFilePlayer(sessionId)
|
|
158
|
+
|
|
159
|
+
File player HTML page
|
|
160
|
+
|
|
161
|
+
### Example
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
import {
|
|
165
|
+
Configuration,
|
|
166
|
+
PlayerApi,
|
|
167
|
+
} from '@easyedu/js-lsm-api';
|
|
168
|
+
import type { GetFilePlayerRequest } from '@easyedu/js-lsm-api';
|
|
169
|
+
|
|
170
|
+
async function example() {
|
|
171
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
172
|
+
const api = new PlayerApi();
|
|
173
|
+
|
|
174
|
+
const body = {
|
|
175
|
+
// string
|
|
176
|
+
sessionId: sessionId_example,
|
|
177
|
+
} satisfies GetFilePlayerRequest;
|
|
178
|
+
|
|
179
|
+
try {
|
|
180
|
+
const data = await api.getFilePlayer(body);
|
|
181
|
+
console.log(data);
|
|
182
|
+
} catch (error) {
|
|
183
|
+
console.error(error);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Run the test
|
|
188
|
+
example().catch(console.error);
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Parameters
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
| Name | Type | Description | Notes |
|
|
195
|
+
|------------- | ------------- | ------------- | -------------|
|
|
196
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
197
|
+
|
|
198
|
+
### Return type
|
|
199
|
+
|
|
200
|
+
`void` (Empty response body)
|
|
201
|
+
|
|
202
|
+
### Authorization
|
|
203
|
+
|
|
204
|
+
No authorization required
|
|
205
|
+
|
|
206
|
+
### HTTP request headers
|
|
207
|
+
|
|
208
|
+
- **Content-Type**: Not defined
|
|
209
|
+
- **Accept**: Not defined
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
### HTTP response details
|
|
213
|
+
| Status code | Description | Response headers |
|
|
214
|
+
|-------------|-------------|------------------|
|
|
215
|
+
| **200** | HTML player page | - |
|
|
216
|
+
| **403** | Forbidden | - |
|
|
217
|
+
| **404** | Session not found | - |
|
|
218
|
+
|
|
219
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## getImagePlayer
|
|
223
|
+
|
|
224
|
+
> getImagePlayer(sessionId)
|
|
225
|
+
|
|
226
|
+
Image player HTML page
|
|
227
|
+
|
|
228
|
+
### Example
|
|
229
|
+
|
|
230
|
+
```ts
|
|
231
|
+
import {
|
|
232
|
+
Configuration,
|
|
233
|
+
PlayerApi,
|
|
234
|
+
} from '@easyedu/js-lsm-api';
|
|
235
|
+
import type { GetImagePlayerRequest } from '@easyedu/js-lsm-api';
|
|
236
|
+
|
|
237
|
+
async function example() {
|
|
238
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
239
|
+
const api = new PlayerApi();
|
|
240
|
+
|
|
241
|
+
const body = {
|
|
242
|
+
// string
|
|
243
|
+
sessionId: sessionId_example,
|
|
244
|
+
} satisfies GetImagePlayerRequest;
|
|
245
|
+
|
|
246
|
+
try {
|
|
247
|
+
const data = await api.getImagePlayer(body);
|
|
248
|
+
console.log(data);
|
|
249
|
+
} catch (error) {
|
|
250
|
+
console.error(error);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Run the test
|
|
255
|
+
example().catch(console.error);
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Parameters
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
| Name | Type | Description | Notes |
|
|
262
|
+
|------------- | ------------- | ------------- | -------------|
|
|
263
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
264
|
+
|
|
265
|
+
### Return type
|
|
266
|
+
|
|
267
|
+
`void` (Empty response body)
|
|
268
|
+
|
|
269
|
+
### Authorization
|
|
270
|
+
|
|
271
|
+
No authorization required
|
|
272
|
+
|
|
273
|
+
### HTTP request headers
|
|
274
|
+
|
|
275
|
+
- **Content-Type**: Not defined
|
|
276
|
+
- **Accept**: Not defined
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
### HTTP response details
|
|
280
|
+
| Status code | Description | Response headers |
|
|
281
|
+
|-------------|-------------|------------------|
|
|
282
|
+
| **200** | HTML player page | - |
|
|
283
|
+
| **403** | Forbidden | - |
|
|
284
|
+
| **404** | Session not found | - |
|
|
285
|
+
|
|
286
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
## getPdfAsset
|
|
290
|
+
|
|
291
|
+
> getPdfAsset(contentId)
|
|
292
|
+
|
|
293
|
+
PDF asset
|
|
294
|
+
|
|
295
|
+
### Example
|
|
296
|
+
|
|
297
|
+
```ts
|
|
298
|
+
import {
|
|
299
|
+
Configuration,
|
|
300
|
+
PlayerApi,
|
|
301
|
+
} from '@easyedu/js-lsm-api';
|
|
302
|
+
import type { GetPdfAssetRequest } from '@easyedu/js-lsm-api';
|
|
303
|
+
|
|
304
|
+
async function example() {
|
|
305
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
306
|
+
const api = new PlayerApi();
|
|
307
|
+
|
|
308
|
+
const body = {
|
|
309
|
+
// string
|
|
310
|
+
contentId: contentId_example,
|
|
311
|
+
} satisfies GetPdfAssetRequest;
|
|
312
|
+
|
|
313
|
+
try {
|
|
314
|
+
const data = await api.getPdfAsset(body);
|
|
315
|
+
console.log(data);
|
|
316
|
+
} catch (error) {
|
|
317
|
+
console.error(error);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Run the test
|
|
322
|
+
example().catch(console.error);
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Parameters
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
| Name | Type | Description | Notes |
|
|
329
|
+
|------------- | ------------- | ------------- | -------------|
|
|
330
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
331
|
+
|
|
332
|
+
### Return type
|
|
333
|
+
|
|
334
|
+
`void` (Empty response body)
|
|
335
|
+
|
|
336
|
+
### Authorization
|
|
337
|
+
|
|
338
|
+
No authorization required
|
|
339
|
+
|
|
340
|
+
### HTTP request headers
|
|
341
|
+
|
|
342
|
+
- **Content-Type**: Not defined
|
|
343
|
+
- **Accept**: Not defined
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
### HTTP response details
|
|
347
|
+
| Status code | Description | Response headers |
|
|
348
|
+
|-------------|-------------|------------------|
|
|
349
|
+
| **302** | Redirect to asset URL | - |
|
|
350
|
+
| **403** | Forbidden | - |
|
|
351
|
+
| **404** | Content not found | - |
|
|
352
|
+
|
|
353
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
## getPdfPlayer
|
|
357
|
+
|
|
358
|
+
> getPdfPlayer(sessionId)
|
|
359
|
+
|
|
360
|
+
PDF player HTML page
|
|
361
|
+
|
|
362
|
+
### Example
|
|
363
|
+
|
|
364
|
+
```ts
|
|
365
|
+
import {
|
|
366
|
+
Configuration,
|
|
367
|
+
PlayerApi,
|
|
368
|
+
} from '@easyedu/js-lsm-api';
|
|
369
|
+
import type { GetPdfPlayerRequest } from '@easyedu/js-lsm-api';
|
|
370
|
+
|
|
371
|
+
async function example() {
|
|
372
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
373
|
+
const api = new PlayerApi();
|
|
374
|
+
|
|
375
|
+
const body = {
|
|
376
|
+
// string
|
|
377
|
+
sessionId: sessionId_example,
|
|
378
|
+
} satisfies GetPdfPlayerRequest;
|
|
379
|
+
|
|
380
|
+
try {
|
|
381
|
+
const data = await api.getPdfPlayer(body);
|
|
382
|
+
console.log(data);
|
|
383
|
+
} catch (error) {
|
|
384
|
+
console.error(error);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Run the test
|
|
389
|
+
example().catch(console.error);
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Parameters
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
| Name | Type | Description | Notes |
|
|
396
|
+
|------------- | ------------- | ------------- | -------------|
|
|
397
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
398
|
+
|
|
399
|
+
### Return type
|
|
400
|
+
|
|
401
|
+
`void` (Empty response body)
|
|
402
|
+
|
|
403
|
+
### Authorization
|
|
404
|
+
|
|
405
|
+
No authorization required
|
|
406
|
+
|
|
407
|
+
### HTTP request headers
|
|
408
|
+
|
|
409
|
+
- **Content-Type**: Not defined
|
|
410
|
+
- **Accept**: Not defined
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
### HTTP response details
|
|
414
|
+
| Status code | Description | Response headers |
|
|
415
|
+
|-------------|-------------|------------------|
|
|
416
|
+
| **200** | HTML player page | - |
|
|
417
|
+
| **403** | Forbidden | - |
|
|
418
|
+
| **404** | Session not found | - |
|
|
419
|
+
|
|
420
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
## getQuizPlayer
|
|
424
|
+
|
|
425
|
+
> getQuizPlayer(sessionId)
|
|
426
|
+
|
|
427
|
+
Quiz player HTML page
|
|
428
|
+
|
|
429
|
+
### Example
|
|
430
|
+
|
|
431
|
+
```ts
|
|
432
|
+
import {
|
|
433
|
+
Configuration,
|
|
434
|
+
PlayerApi,
|
|
435
|
+
} from '@easyedu/js-lsm-api';
|
|
436
|
+
import type { GetQuizPlayerRequest } from '@easyedu/js-lsm-api';
|
|
437
|
+
|
|
438
|
+
async function example() {
|
|
439
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
440
|
+
const api = new PlayerApi();
|
|
441
|
+
|
|
442
|
+
const body = {
|
|
443
|
+
// string
|
|
444
|
+
sessionId: sessionId_example,
|
|
445
|
+
} satisfies GetQuizPlayerRequest;
|
|
446
|
+
|
|
447
|
+
try {
|
|
448
|
+
const data = await api.getQuizPlayer(body);
|
|
449
|
+
console.log(data);
|
|
450
|
+
} catch (error) {
|
|
451
|
+
console.error(error);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// Run the test
|
|
456
|
+
example().catch(console.error);
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Parameters
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
| Name | Type | Description | Notes |
|
|
463
|
+
|------------- | ------------- | ------------- | -------------|
|
|
464
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
465
|
+
|
|
466
|
+
### Return type
|
|
467
|
+
|
|
468
|
+
`void` (Empty response body)
|
|
469
|
+
|
|
470
|
+
### Authorization
|
|
471
|
+
|
|
472
|
+
No authorization required
|
|
473
|
+
|
|
474
|
+
### HTTP request headers
|
|
475
|
+
|
|
476
|
+
- **Content-Type**: Not defined
|
|
477
|
+
- **Accept**: Not defined
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
### HTTP response details
|
|
481
|
+
| Status code | Description | Response headers |
|
|
482
|
+
|-------------|-------------|------------------|
|
|
483
|
+
| **200** | HTML player page | - |
|
|
484
|
+
| **403** | Forbidden | - |
|
|
485
|
+
| **404** | Session not found | - |
|
|
486
|
+
|
|
487
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
## getScormAsset
|
|
491
|
+
|
|
492
|
+
> getScormAsset(contentId, assetPath)
|
|
493
|
+
|
|
494
|
+
SCORM package asset
|
|
495
|
+
|
|
496
|
+
### Example
|
|
497
|
+
|
|
498
|
+
```ts
|
|
499
|
+
import {
|
|
500
|
+
Configuration,
|
|
501
|
+
PlayerApi,
|
|
502
|
+
} from '@easyedu/js-lsm-api';
|
|
503
|
+
import type { GetScormAssetRequest } from '@easyedu/js-lsm-api';
|
|
504
|
+
|
|
505
|
+
async function example() {
|
|
506
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
507
|
+
const api = new PlayerApi();
|
|
508
|
+
|
|
509
|
+
const body = {
|
|
510
|
+
// string
|
|
511
|
+
contentId: contentId_example,
|
|
512
|
+
// string
|
|
513
|
+
assetPath: assetPath_example,
|
|
514
|
+
} satisfies GetScormAssetRequest;
|
|
515
|
+
|
|
516
|
+
try {
|
|
517
|
+
const data = await api.getScormAsset(body);
|
|
518
|
+
console.log(data);
|
|
519
|
+
} catch (error) {
|
|
520
|
+
console.error(error);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// Run the test
|
|
525
|
+
example().catch(console.error);
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### Parameters
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
| Name | Type | Description | Notes |
|
|
532
|
+
|------------- | ------------- | ------------- | -------------|
|
|
533
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
534
|
+
| **assetPath** | `string` | | [Defaults to `undefined`] |
|
|
535
|
+
|
|
536
|
+
### Return type
|
|
537
|
+
|
|
538
|
+
`void` (Empty response body)
|
|
539
|
+
|
|
540
|
+
### Authorization
|
|
541
|
+
|
|
542
|
+
No authorization required
|
|
543
|
+
|
|
544
|
+
### HTTP request headers
|
|
545
|
+
|
|
546
|
+
- **Content-Type**: Not defined
|
|
547
|
+
- **Accept**: Not defined
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
### HTTP response details
|
|
551
|
+
| Status code | Description | Response headers |
|
|
552
|
+
|-------------|-------------|------------------|
|
|
553
|
+
| **200** | SCORM asset content | - |
|
|
554
|
+
| **302** | Redirect to asset URL | - |
|
|
555
|
+
| **403** | Forbidden | - |
|
|
556
|
+
| **404** | Content or asset not found | - |
|
|
557
|
+
|
|
558
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
## getScormPlayer
|
|
562
|
+
|
|
563
|
+
> getScormPlayer(sessionId)
|
|
564
|
+
|
|
565
|
+
SCORM player HTML page
|
|
566
|
+
|
|
567
|
+
### Example
|
|
568
|
+
|
|
569
|
+
```ts
|
|
570
|
+
import {
|
|
571
|
+
Configuration,
|
|
572
|
+
PlayerApi,
|
|
573
|
+
} from '@easyedu/js-lsm-api';
|
|
574
|
+
import type { GetScormPlayerRequest } from '@easyedu/js-lsm-api';
|
|
575
|
+
|
|
576
|
+
async function example() {
|
|
577
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
578
|
+
const api = new PlayerApi();
|
|
579
|
+
|
|
580
|
+
const body = {
|
|
581
|
+
// string
|
|
582
|
+
sessionId: sessionId_example,
|
|
583
|
+
} satisfies GetScormPlayerRequest;
|
|
584
|
+
|
|
585
|
+
try {
|
|
586
|
+
const data = await api.getScormPlayer(body);
|
|
587
|
+
console.log(data);
|
|
588
|
+
} catch (error) {
|
|
589
|
+
console.error(error);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// Run the test
|
|
594
|
+
example().catch(console.error);
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
### Parameters
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
| Name | Type | Description | Notes |
|
|
601
|
+
|------------- | ------------- | ------------- | -------------|
|
|
602
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
603
|
+
|
|
604
|
+
### Return type
|
|
605
|
+
|
|
606
|
+
`void` (Empty response body)
|
|
607
|
+
|
|
608
|
+
### Authorization
|
|
609
|
+
|
|
610
|
+
No authorization required
|
|
611
|
+
|
|
612
|
+
### HTTP request headers
|
|
613
|
+
|
|
614
|
+
- **Content-Type**: Not defined
|
|
615
|
+
- **Accept**: Not defined
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
### HTTP response details
|
|
619
|
+
| Status code | Description | Response headers |
|
|
620
|
+
|-------------|-------------|------------------|
|
|
621
|
+
| **200** | HTML player page | - |
|
|
622
|
+
| **403** | Forbidden | - |
|
|
623
|
+
| **404** | Session not found | - |
|
|
624
|
+
|
|
625
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
## getVideoAsset
|
|
629
|
+
|
|
630
|
+
> getVideoAsset(contentId)
|
|
631
|
+
|
|
632
|
+
Video asset
|
|
633
|
+
|
|
634
|
+
### Example
|
|
635
|
+
|
|
636
|
+
```ts
|
|
637
|
+
import {
|
|
638
|
+
Configuration,
|
|
639
|
+
PlayerApi,
|
|
640
|
+
} from '@easyedu/js-lsm-api';
|
|
641
|
+
import type { GetVideoAssetRequest } from '@easyedu/js-lsm-api';
|
|
642
|
+
|
|
643
|
+
async function example() {
|
|
644
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
645
|
+
const api = new PlayerApi();
|
|
646
|
+
|
|
647
|
+
const body = {
|
|
648
|
+
// string
|
|
649
|
+
contentId: contentId_example,
|
|
650
|
+
} satisfies GetVideoAssetRequest;
|
|
651
|
+
|
|
652
|
+
try {
|
|
653
|
+
const data = await api.getVideoAsset(body);
|
|
654
|
+
console.log(data);
|
|
655
|
+
} catch (error) {
|
|
656
|
+
console.error(error);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
// Run the test
|
|
661
|
+
example().catch(console.error);
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
### Parameters
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
| Name | Type | Description | Notes |
|
|
668
|
+
|------------- | ------------- | ------------- | -------------|
|
|
669
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
670
|
+
|
|
671
|
+
### Return type
|
|
672
|
+
|
|
673
|
+
`void` (Empty response body)
|
|
674
|
+
|
|
675
|
+
### Authorization
|
|
676
|
+
|
|
677
|
+
No authorization required
|
|
678
|
+
|
|
679
|
+
### HTTP request headers
|
|
680
|
+
|
|
681
|
+
- **Content-Type**: Not defined
|
|
682
|
+
- **Accept**: Not defined
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
### HTTP response details
|
|
686
|
+
| Status code | Description | Response headers |
|
|
687
|
+
|-------------|-------------|------------------|
|
|
688
|
+
| **302** | Redirect to asset URL | - |
|
|
689
|
+
| **403** | Forbidden | - |
|
|
690
|
+
| **404** | Content not found | - |
|
|
691
|
+
|
|
692
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
## getVideoPlayer
|
|
696
|
+
|
|
697
|
+
> getVideoPlayer(sessionId)
|
|
698
|
+
|
|
699
|
+
Video player HTML page
|
|
700
|
+
|
|
701
|
+
### Example
|
|
702
|
+
|
|
703
|
+
```ts
|
|
704
|
+
import {
|
|
705
|
+
Configuration,
|
|
706
|
+
PlayerApi,
|
|
707
|
+
} from '@easyedu/js-lsm-api';
|
|
708
|
+
import type { GetVideoPlayerRequest } from '@easyedu/js-lsm-api';
|
|
709
|
+
|
|
710
|
+
async function example() {
|
|
711
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
712
|
+
const api = new PlayerApi();
|
|
713
|
+
|
|
714
|
+
const body = {
|
|
715
|
+
// string
|
|
716
|
+
sessionId: sessionId_example,
|
|
717
|
+
} satisfies GetVideoPlayerRequest;
|
|
718
|
+
|
|
719
|
+
try {
|
|
720
|
+
const data = await api.getVideoPlayer(body);
|
|
721
|
+
console.log(data);
|
|
722
|
+
} catch (error) {
|
|
723
|
+
console.error(error);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
// Run the test
|
|
728
|
+
example().catch(console.error);
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
### Parameters
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
| Name | Type | Description | Notes |
|
|
735
|
+
|------------- | ------------- | ------------- | -------------|
|
|
736
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
737
|
+
|
|
738
|
+
### Return type
|
|
739
|
+
|
|
740
|
+
`void` (Empty response body)
|
|
741
|
+
|
|
742
|
+
### Authorization
|
|
743
|
+
|
|
744
|
+
No authorization required
|
|
745
|
+
|
|
746
|
+
### HTTP request headers
|
|
747
|
+
|
|
748
|
+
- **Content-Type**: Not defined
|
|
749
|
+
- **Accept**: Not defined
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
### HTTP response details
|
|
753
|
+
| Status code | Description | Response headers |
|
|
754
|
+
|-------------|-------------|------------------|
|
|
755
|
+
| **200** | HTML player page | - |
|
|
756
|
+
| **403** | Forbidden | - |
|
|
757
|
+
| **404** | Session not found | - |
|
|
758
|
+
|
|
759
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
760
|
+
|