]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/server-commands/videos/videos-command.ts
Try to have more robust live tests
[github/Chocobozzz/PeerTube.git] / shared / server-commands / videos / videos-command.ts
index 5902444846ce9640411e033758a47e379dfb7557..b5df9c32534a05a00849d691c0a7e71938962505 100644 (file)
@@ -210,6 +210,20 @@ export class VideosCommand extends AbstractCommand {
     })
   }
 
+  listMySubscriptionVideos (options: OverrideCommandOptions & VideosCommonQuery = {}) {
+    const { sort = '-createdAt' } = options
+    const path = '/api/v1/users/me/subscriptions/videos'
+
+    return this.getRequestBody<ResultList<Video>>({
+      ...options,
+
+      path,
+      query: { sort, ...this.buildListQuery(options) },
+      implicitToken: true,
+      defaultExpectedStatus: HttpStatusCode.OK_200
+    })
+  }
+
   // ---------------------------------------------------------------------------
 
   list (options: OverrideCommandOptions & VideosCommonQuery = {}) {