aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos/channels-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/videos/channels-command.ts')
-rw-r--r--shared/server-commands/videos/channels-command.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/shared/server-commands/videos/channels-command.ts b/shared/server-commands/videos/channels-command.ts
index 8ab124658..a688a120f 100644
--- a/shared/server-commands/videos/channels-command.ts
+++ b/shared/server-commands/videos/channels-command.ts
@@ -181,4 +181,22 @@ export class ChannelsCommand extends AbstractCommand {
181 defaultExpectedStatus: HttpStatusCode.OK_200 181 defaultExpectedStatus: HttpStatusCode.OK_200
182 }) 182 })
183 } 183 }
184
185 importVideos (options: OverrideCommandOptions & {
186 channelName: string
187 externalChannelUrl: string
188 }) {
189 const { channelName, externalChannelUrl } = options
190
191 const path = `/api/v1/video-channels/${channelName}/import-videos`
192
193 return this.postBodyRequest({
194 ...options,
195
196 path,
197 fields: { externalChannelUrl },
198 implicitToken: true,
199 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
200 })
201 }
184} 202}