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:
parent
f18a060a83
commit
49f0468d44
9 changed files with 121 additions and 12 deletions
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue