aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/videos/stats/index.ts1
-rw-r--r--shared/models/videos/stats/video-stats-overall-query.model.ts4
-rw-r--r--shared/server-commands/videos/video-stats-command.ts4
3 files changed, 9 insertions, 0 deletions
diff --git a/shared/models/videos/stats/index.ts b/shared/models/videos/stats/index.ts
index 4a6fdaa71..a9b203f58 100644
--- a/shared/models/videos/stats/index.ts
+++ b/shared/models/videos/stats/index.ts
@@ -1,3 +1,4 @@
1export * from './video-stats-overall-query.model'
1export * from './video-stats-overall.model' 2export * from './video-stats-overall.model'
2export * from './video-stats-retention.model' 3export * from './video-stats-retention.model'
3export * from './video-stats-timeserie-query.model' 4export * from './video-stats-timeserie-query.model'
diff --git a/shared/models/videos/stats/video-stats-overall-query.model.ts b/shared/models/videos/stats/video-stats-overall-query.model.ts
new file mode 100644
index 000000000..6b4c2164f
--- /dev/null
+++ b/shared/models/videos/stats/video-stats-overall-query.model.ts
@@ -0,0 +1,4 @@
1export interface VideoStatsOverallQuery {
2 startDate?: string
3 endDate?: string
4}
diff --git a/shared/server-commands/videos/video-stats-command.ts b/shared/server-commands/videos/video-stats-command.ts
index bd4808f63..b9b99bfb5 100644
--- a/shared/server-commands/videos/video-stats-command.ts
+++ b/shared/server-commands/videos/video-stats-command.ts
@@ -6,6 +6,8 @@ export class VideoStatsCommand extends AbstractCommand {
6 6
7 getOverallStats (options: OverrideCommandOptions & { 7 getOverallStats (options: OverrideCommandOptions & {
8 videoId: number | string 8 videoId: number | string
9 startDate?: string
10 endDate?: string
9 }) { 11 }) {
10 const path = '/api/v1/videos/' + options.videoId + '/stats/overall' 12 const path = '/api/v1/videos/' + options.videoId + '/stats/overall'
11 13
@@ -13,6 +15,8 @@ export class VideoStatsCommand extends AbstractCommand {
13 ...options, 15 ...options,
14 path, 16 path,
15 17
18 query: pick(options, [ 'startDate', 'endDate' ]),
19
16 implicitToken: true, 20 implicitToken: true,
17 defaultExpectedStatus: HttpStatusCode.OK_200 21 defaultExpectedStatus: HttpStatusCode.OK_200
18 }) 22 })