1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Add filter by start/end date overall stats in api

This commit is contained in:
Chocobozzz 2022-05-05 14:12:57 +02:00
parent f18a060a83
commit 49f0468d44
No known key found for this signature in database
GPG key ID: 583A612D890159BE
9 changed files with 121 additions and 12 deletions

View file

@ -6,6 +6,8 @@ export class VideoStatsCommand extends AbstractCommand {
getOverallStats (options: OverrideCommandOptions & {
videoId: number | string
startDate?: string
endDate?: string
}) {
const path = '/api/v1/videos/' + options.videoId + '/stats/overall'
@ -13,6 +15,8 @@ export class VideoStatsCommand extends AbstractCommand {
...options,
path,
query: pick(options, [ 'startDate', 'endDate' ]),
implicitToken: true,
defaultExpectedStatus: HttpStatusCode.OK_200
})