Skip to content

Commit 1a4052f

Browse files
author
olivierapivideo
authored
Add discarded videos feature
1 parent c2cff20 commit 1a4052f

29 files changed

+322
-49
lines changed

api/openapi.yaml

Lines changed: 154 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ paths:
219219
value: John Doe
220220
- key: Format
221221
value: Tutorial
222-
publishedAt: 4665-07-14T23:36:18.598Z
222+
publishedAt: 2024-07-14T23:36:07+00:00
223+
discarded: false
224+
discardedAt: null
225+
deletesAt: null
223226
source:
224227
uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
225228
assets:
@@ -621,7 +624,10 @@ paths:
621624
value: John Doe
622625
- key: Format
623626
value: Tutorial
624-
publishedAt: 4665-07-14T23:36:18.598Z
627+
publishedAt: 2024-07-14T23:36:07+00:00
628+
discarded: false
629+
discardedAt: null
630+
deletesAt: null
625631
source:
626632
uri: /videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source
627633
assets:
@@ -792,8 +798,8 @@ components:
792798
live-stream-response-example:
793799
value:
794800
liveStreamId: li4pqNqGUkhKfWcBGpZVLRY5
795-
createdAt: 2020-07-29T10:45:35.000Z
796-
updatedAt: 2020-07-29T10:45:35.000Z
801+
createdAt: 2020-07-29T10:45:35+00:00
802+
updatedAt: 2020-07-29T10:45:35+00:00
797803
streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135
798804
restreams:
799805
- name: YouTube
@@ -812,6 +818,117 @@ components:
812818
hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8
813819
thumbnail: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg
814820
parameters:
821+
filterBy:
822+
$ref: '#/components/parameters/filterBy_2'
823+
description: "Use this parameter to filter the API's response based on different\
824+
\ data dimensions. You can serialize filters in your query to receive more\
825+
\ detailed breakdowns of your analytics.\n\n- If you do not set a value for\
826+
\ `filterBy`, the API returns the full dataset for your project.\n- The API\
827+
\ only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`\
828+
\ or `/data/buckets/play-total/media-id`.\n\nThese are the available breakdown\
829+
\ dimensions:\n\n- `mediaId`: Returns analytics based on the unique identifiers\
830+
\ of a video or a live stream.\n- `mediaType`: Returns analytics based on\
831+
\ the type of content. Possible values: `video` and `live-stream`. \n- `continent`:\
832+
\ Returns analytics based on the viewers' continent. The list of supported\
833+
\ continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).\
834+
\ You must use the ISO-3166 alpha2 format, for example `EU`. Possible values\
835+
\ are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`: Returns analytics\
836+
\ based on the viewers' country. The list of supported country names are based\
837+
\ on the [GeoNames public database](https://www.geonames.org/countries/).\
838+
\ You must use the ISO-3166 alpha2 format, for example `FR`.\n- `deviceType`:\
839+
\ Returns analytics based on the type of device used by the viewers. Response\
840+
\ values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`,\
841+
\ `unknown`.\n- `operatingSystem`: Returns analytics based on the operating\
842+
\ system used by the viewers. Response values can include `windows`, `mac\
843+
\ osx`, `android`, `ios`, `linux`.\n- `browser`: Returns analytics based on\
844+
\ the browser used by the viewers. Response values can include `chrome`, `firefox`,\
845+
\ `edge`, `opera`.\n- `tag`: Returns analytics for videos using this tag.\
846+
\ This filter only accepts a single value and is case sensitive. Read more\
847+
\ about tagging your videos [here](https://docs.api.video/vod/tags-metadata).\n"
848+
example: filterBy[country]=FR&filterBy[operatingSystem]=windows&filterBy[browser][]=firefox&filterBy[browser][]=chrome&filterBy[tag]=Cool
849+
videos
850+
explode: true
851+
in: query
852+
name: filterBy
853+
required: false
854+
schema:
855+
properties:
856+
mediaId:
857+
description: Returns analytics based on the unique identifiers of a video
858+
or a live stream.
859+
example:
860+
- vi4blUQJFrYWbaG44NChkH27
861+
items:
862+
type: string
863+
type: array
864+
mediaType:
865+
enum:
866+
- video
867+
- live-stream
868+
example: video
869+
type: string
870+
continent:
871+
description: Returns analytics based on the viewers' continent. The list
872+
of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).
873+
You must use the ISO-3166 alpha2 format, for example `EU`.
874+
example:
875+
- EU
876+
items:
877+
enum:
878+
- AS
879+
- AF
880+
- NA
881+
- SA
882+
- AN
883+
- EU
884+
- AZ
885+
type: string
886+
type: array
887+
country:
888+
description: Returns analytics based on the viewers' country. The list
889+
of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/).
890+
You must use the ISO-3166 alpha2 format, for example `FR`.
891+
example:
892+
- FR
893+
items:
894+
type: string
895+
type: array
896+
deviceType:
897+
description: 'Returns analytics based on the type of device used by the
898+
viewers. Response values can include: `computer`, `phone`, `tablet`,
899+
`tv`, `console`, `wearable`, `unknown`.'
900+
example:
901+
- computer
902+
items:
903+
type: string
904+
type: array
905+
operatingSystem:
906+
description: Returns analytics based on the operating system used by the
907+
viewers. Response values can include `windows`, `mac osx`, `android`,
908+
`ios`, `linux`.
909+
example:
910+
- windows
911+
items:
912+
type: string
913+
type: array
914+
browser:
915+
description: Returns analytics based on the browser used by the viewers.
916+
Response values can include `chrome`, `firefox`, `edge`, `opera`.
917+
example:
918+
- firefox
919+
items:
920+
type: string
921+
type: array
922+
tag:
923+
description: Returns analytics for videos using this tag. This filter
924+
only accepts a single value and is case sensitive. Read more about tagging
925+
your videos [here](https://docs.api.video/vod/tags-metadata).
926+
example: Cool videos
927+
type: string
928+
type: object
929+
x-is-deep-object: true
930+
style: deepObject
931+
x-is-deep-object: true
815932
current-page:
816933
description: 'Choose the number of search results to return per page. Minimum
817934
value: 1'
@@ -941,8 +1058,11 @@ components:
9411058
value: John Doe
9421059
- key: Format
9431060
value: Tutorial
944-
createdAt: 4251-03-03T12:52:03.085Z
945-
publishedAt: 4665-07-14T23:36:18.598Z
1061+
createdAt: 2024-03-03T12:52:03+00:00
1062+
publishedAt: 2024-07-14T23:36:07+00:00
1063+
discarded: false
1064+
discardedAt: null
1065+
deletesAt: null
9461066
actions:
9471067
- video_delete
9481068
- video_download
@@ -953,7 +1073,8 @@ components:
9531073
example: vi4k0jvEUuaTdRAEjQ4Prklg
9541074
type: string
9551075
createdAt:
956-
description: When a video was created, presented in ISO-8601 format.
1076+
description: When a video was created, presented in ATOM UTC format.
1077+
example: 2024-05-28T11:15:07Z
9571078
format: date-time
9581079
type: string
9591080
title:
@@ -968,16 +1089,37 @@ components:
9681089
type: string
9691090
publishedAt:
9701091
description: The date and time the API created the video. Date and time
971-
are provided using ISO-8601 UTC format.
972-
example: 2019-12-16T08:25:51Z
1092+
are provided using ATOM UTC format.
1093+
example: 2024-05-28T11:15:07Z
9731094
format: date-time
9741095
type: string
9751096
updatedAt:
9761097
description: The date and time the video was updated. Date and time are
977-
provided using ISO-8601 UTC format.
978-
example: 2019-12-16T08:15:51Z
1098+
provided using ATOM UTC format.
1099+
example: 2024-05-28T11:15:07Z
9791100
format: date-time
9801101
type: string
1102+
discardedAt:
1103+
description: The date and time the video was discarded. The API populates
1104+
this field only if you have the Video Restore feature enabled and discard
1105+
a video. Date and time are provided using ATOM UTC format.
1106+
example: 2024-05-28T11:15:07Z
1107+
format: date-time
1108+
nullable: true
1109+
type: string
1110+
deletesAt:
1111+
description: The date and time the video will be permanently deleted. The
1112+
API populates this field only if you have the Video Restore feature enabled
1113+
and discard a video. Discarded videos are pemanently deleted after 90
1114+
days. Date and time are provided using ATOM UTC format.
1115+
example: 2024-05-28T11:15:07Z
1116+
format: date-time
1117+
nullable: true
1118+
type: string
1119+
discarded:
1120+
description: Returns `true` for videos you discarded when you have the Video
1121+
Restore feature enabled. Returns `false` for every other video.
1122+
type: boolean
9811123
tags:
9821124
description: "One array of tags (each tag is a string) in order to categorize\
9831125
\ a video. Tags may include spaces. \n"
@@ -987,7 +1129,7 @@ components:
9871129
type: array
9881130
metadata:
9891131
description: |
990-
Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair.
1132+
Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video.
9911133
example: '[{"key":"Author", "value":"John Doe"}, {"key":"Format", "value":"Tutorial"}]'
9921134
items:
9931135
$ref: '#/components/schemas/metadata'

docs/AccessToken.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ Name | Type | Description | Notes
1515
## Implemented Interfaces
1616

1717
* Serializable
18+
* DeepObject
1819

1920

docs/AdditionalBadRequestErrors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ Name | Type | Description | Notes
1515
## Implemented Interfaces
1616

1717
* Serializable
18+
* DeepObject
1819

1920

docs/AuthenticatePayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ Name | Type | Description | Notes
1212
## Implemented Interfaces
1313

1414
* Serializable
15+
* DeepObject
1516

1617

docs/BadRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ Name | Type | Description | Notes
1616
## Implemented Interfaces
1717

1818
* Serializable
19+
* DeepObject
1920

2021

docs/Metadata.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ Name | Type | Description | Notes
1313
## Implemented Interfaces
1414

1515
* Serializable
16+
* DeepObject
1617

1718

docs/NotFound.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ Name | Type | Description | Notes
1515
## Implemented Interfaces
1616

1717
* Serializable
18+
* DeepObject
1819

1920

docs/RefreshTokenPayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ Name | Type | Description | Notes
1212
## Implemented Interfaces
1313

1414
* Serializable
15+
* DeepObject
1516

1617

docs/TooManyRequests.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ Name | Type | Description | Notes
1414
## Implemented Interfaces
1515

1616
* Serializable
17+
* DeepObject
1718

1819

docs/Video.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**videoId** | **String** | The unique identifier of the video object. |
10-
**createdAt** | **OffsetDateTime** | When a video was created, presented in ISO-8601 format. | [optional]
10+
**createdAt** | **OffsetDateTime** | When a video was created, presented in ATOM UTC format. | [optional]
1111
**title** | **String** | The title of the video content. | [optional]
1212
**description** | **String** | A description for the video content. | [optional]
13-
**publishedAt** | **OffsetDateTime** | The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. | [optional]
14-
**updatedAt** | **OffsetDateTime** | The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. | [optional]
13+
**publishedAt** | **OffsetDateTime** | The date and time the API created the video. Date and time are provided using ATOM UTC format. | [optional]
14+
**updatedAt** | **OffsetDateTime** | The date and time the video was updated. Date and time are provided using ATOM UTC format. | [optional]
15+
**discardedAt** | **OffsetDateTime** | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional]
16+
**deletesAt** | **OffsetDateTime** | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional]
17+
**discarded** | **Boolean** | Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. | [optional]
1518
**tags** | **List<String>** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional]
16-
**metadata** | [**List<Metadata>**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | [optional]
19+
**metadata** | [**List<Metadata>**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional]
1720
**source** | [**VideoSource**](VideoSource.md) | | [optional]
1821
**assets** | [**VideoAssets**](VideoAssets.md) | | [optional]
1922
**playerId** | **String** | The id of the player that will be applied on the video. | [optional]
@@ -25,5 +28,6 @@ Name | Type | Description | Notes
2528
## Implemented Interfaces
2629

2730
* Serializable
31+
* DeepObject
2832

2933

0 commit comments

Comments
 (0)