diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-20 14:35:18 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-24 14:04:05 +0200 |
commit | d525fc399a14a8b16eaad6d4c0bc0a9c4093c3c9 (patch) | |
tree | 4305044c4a97bdf1275b241c63cb0e85151cfb6a /shared | |
parent | 57c36b277e68b764dd34cb2e449f6e2ca3d1e9b6 (diff) | |
download | PeerTube-d525fc399a14a8b16eaad6d4c0bc0a9c4093c3c9.tar.gz PeerTube-d525fc399a14a8b16eaad6d4c0bc0a9c4093c3c9.tar.zst PeerTube-d525fc399a14a8b16eaad6d4c0bc0a9c4093c3c9.zip |
Add videos list filters
Diffstat (limited to 'shared')
-rw-r--r-- | shared/models/index.ts | 1 | ||||
-rw-r--r-- | shared/models/search/index.ts | 1 | ||||
-rw-r--r-- | shared/models/search/videos-search-query.model.ts | 24 |
3 files changed, 26 insertions, 0 deletions
diff --git a/shared/models/index.ts b/shared/models/index.ts index c8ce71f17..1db00c295 100644 --- a/shared/models/index.ts +++ b/shared/models/index.ts | |||
@@ -4,6 +4,7 @@ export * from './users' | |||
4 | export * from './videos' | 4 | export * from './videos' |
5 | export * from './feeds' | 5 | export * from './feeds' |
6 | export * from './i18n' | 6 | export * from './i18n' |
7 | export * from './search' | ||
7 | export * from './server/job.model' | 8 | export * from './server/job.model' |
8 | export * from './oauth-client-local.model' | 9 | export * from './oauth-client-local.model' |
9 | export * from './result-list.model' | 10 | export * from './result-list.model' |
diff --git a/shared/models/search/index.ts b/shared/models/search/index.ts new file mode 100644 index 000000000..288ee41ef --- /dev/null +++ b/shared/models/search/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './videos-search-query.model' | |||
diff --git a/shared/models/search/videos-search-query.model.ts b/shared/models/search/videos-search-query.model.ts new file mode 100644 index 000000000..bb23bd636 --- /dev/null +++ b/shared/models/search/videos-search-query.model.ts | |||
@@ -0,0 +1,24 @@ | |||
1 | export interface VideosSearchQuery { | ||
2 | search: string | ||
3 | |||
4 | start?: number | ||
5 | count?: number | ||
6 | sort?: string | ||
7 | |||
8 | startDate?: string // ISO 8601 | ||
9 | endDate?: string // ISO 8601 | ||
10 | |||
11 | nsfw?: boolean | ||
12 | |||
13 | categoryOneOf?: number[] | ||
14 | |||
15 | licenceOneOf?: number[] | ||
16 | |||
17 | languageOneOf?: string[] | ||
18 | |||
19 | tagsOneOf?: string[] | ||
20 | tagsAllOf?: string[] | ||
21 | |||
22 | durationMin?: number // seconds | ||
23 | durationMax?: number // seconds | ||
24 | } | ||