X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Fvideos%2Fvideos-command.ts;h=b5df9c32534a05a00849d691c0a7e71938962505;hb=5170f492b95dc81b75230312411c5fdb0019eed2;hp=5902444846ce9640411e033758a47e379dfb7557;hpb=508c1b1e9f3b26752a961e945b7fa59b72b30827;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/server-commands/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts index 590244484..b5df9c325 100644 --- a/shared/server-commands/videos/videos-command.ts +++ b/shared/server-commands/videos/videos-command.ts @@ -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>({ + ...options, + + path, + query: { sort, ...this.buildListQuery(options) }, + implicitToken: true, + defaultExpectedStatus: HttpStatusCode.OK_200 + }) + } + // --------------------------------------------------------------------------- list (options: OverrideCommandOptions & VideosCommonQuery = {}) {