diff options
Diffstat (limited to 'packages/server-commands/src/videos/storyboard-command.ts')
-rw-r--r-- | packages/server-commands/src/videos/storyboard-command.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/server-commands/src/videos/storyboard-command.ts b/packages/server-commands/src/videos/storyboard-command.ts new file mode 100644 index 000000000..a692ad612 --- /dev/null +++ b/packages/server-commands/src/videos/storyboard-command.ts | |||
@@ -0,0 +1,19 @@ | |||
1 | import { HttpStatusCode, Storyboard } from '@peertube/peertube-models' | ||
2 | import { AbstractCommand, OverrideCommandOptions } from '../shared/index.js' | ||
3 | |||
4 | export class StoryboardCommand extends AbstractCommand { | ||
5 | |||
6 | list (options: OverrideCommandOptions & { | ||
7 | id: number | string | ||
8 | }) { | ||
9 | const path = '/api/v1/videos/' + options.id + '/storyboards' | ||
10 | |||
11 | return this.getRequestBody<{ storyboards: Storyboard[] }>({ | ||
12 | ...options, | ||
13 | |||
14 | path, | ||
15 | implicitToken: true, | ||
16 | defaultExpectedStatus: HttpStatusCode.OK_200 | ||
17 | }) | ||
18 | } | ||
19 | } | ||