From 570c4d5747ee96a7fc9494e5147551f810cafdc7 Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Fri, 26 Jul 2024 06:58:50 +0000 Subject: [PATCH] Add new analytics endpoints & livestream complete() --- CHANGELOG.md | 4 + README.md | 38 +- api/openapi.yaml | 2908 +++++++++-------- build.gradle | 2 +- docs/AnalyticsAggregatedMetricsResponse.md | 17 + ...alyticsAggregatedMetricsResponseContext.md | 43 + ...gregatedMetricsResponseContextTimeframe.md | 18 + docs/AnalyticsApi.md | 200 +- docs/AnalyticsMetricsBreakdownResponse.md | 18 + ...nalyticsMetricsBreakdownResponseContext.md | 44 + docs/AnalyticsMetricsBreakdownResponseData.md | 17 + docs/AnalyticsMetricsOverTimeResponse.md | 18 + ...AnalyticsMetricsOverTimeResponseContext.md | 39 + docs/AnalyticsMetricsOverTimeResponseData.md | 17 + docs/FilterBy.md | 46 + docs/FilterBy1.md | 46 + docs/FilterBy2.md | 46 + docs/LiveStream.md | 4 +- docs/LiveStreamCreationPayload.md | 4 +- docs/LiveStreamSession.md | 21 - docs/LiveStreamSessionClient.md | 19 - docs/LiveStreamSessionDevice.md | 19 - docs/LiveStreamSessionLocation.md | 18 - docs/LiveStreamSessionReferrer.md | 19 - docs/LiveStreamSessionSession.md | 18 - docs/LiveStreamUpdatePayload.md | 4 +- docs/LiveStreamsApi.md | 78 +- docs/RestreamsRequestObject.md | 2 +- docs/RestreamsResponseObject.md | 2 +- docs/UnrecognizedRequestUrl.md | 18 + docs/VideoCreationPayload.md | 2 +- docs/VideoSession.md | 21 - docs/VideoSessionClient.md | 19 - docs/VideoSessionDevice.md | 19 - docs/VideoSessionLocation.md | 18 - docs/VideoSessionOs.md | 19 - docs/VideoSessionReferrer.md | 19 - docs/VideoSessionSession.md | 19 - docs/VideosApi.md | 2 +- pom.xml | 2 +- .../java/video/api/client/api/ApiClient.java | 20 +- .../api/client/api/clients/AnalyticsApi.java | 1123 +++++-- .../client/api/clients/LiveStreamsApi.java | 273 ++ .../AnalyticsAggregatedMetricsResponse.java | 120 + ...yticsAggregatedMetricsResponseContext.java | 258 ++ ...egatedMetricsResponseContextTimeframe.java | 123 + .../AnalyticsMetricsBreakdownResponse.java | 155 + ...lyticsMetricsBreakdownResponseContext.java | 260 ++ ...AnalyticsMetricsBreakdownResponseData.java | 123 + .../AnalyticsMetricsOverTimeResponse.java | 155 + ...alyticsMetricsOverTimeResponseContext.java | 250 ++ .../AnalyticsMetricsOverTimeResponseData.java | 123 + .../video/api/client/api/models/FilterBy.java | 395 +++ .../api/client/api/models/FilterBy1.java | 396 +++ .../api/client/api/models/FilterBy2.java | 396 +++ .../api/client/api/models/LiveStream.java | 8 +- .../api/models/LiveStreamCreationPayload.java | 10 +- .../client/api/models/LiveStreamSession.java | 235 -- .../api/models/LiveStreamSessionClient.java | 149 - .../api/models/LiveStreamSessionDevice.java | 149 - .../api/models/LiveStreamSessionLocation.java | 122 - .../api/models/LiveStreamSessionReferrer.java | 176 - .../api/models/LiveStreamSessionSession.java | 149 - .../api/models/LiveStreamUpdatePayload.java | 14 +- .../api/models/RestreamsRequestObject.java | 6 +- .../api/models/RestreamsResponseObject.java | 6 +- ...evice.java => UnrecognizedRequestUrl.java} | 75 +- .../api/models/VideoCreationPayload.java | 4 +- .../api/client/api/models/VideoSession.java | 234 -- .../client/api/models/VideoSessionClient.java | 149 - .../api/models/VideoSessionLocation.java | 122 - .../api/client/api/models/VideoSessionOs.java | 149 - .../api/models/VideoSessionReferrer.java | 177 - .../api/models/VideoSessionSession.java | 189 -- .../client/api/clients/AnalyticsApiTest.java | 338 +- .../client/api/clients/WebhooksApiTest.java | 6 +- .../authenticate/responses/400.json | 2 +- .../refresh/responses/400.json | 2 +- .../getAggregatedMetrics/responses/200.json | 11 + .../responses/400-0.json | 2 +- .../responses/400-1.json} | 4 +- .../getAggregatedMetrics/responses/404.json | 5 + .../responses/429.json | 0 .../getLiveStreamsPlays/responses/200-0.json | 29 - .../getLiveStreamsPlays/responses/200-1.json | 29 - .../getLiveStreamsPlays/responses/200-2.json | 29 - .../getLiveStreamsPlays/responses/400-1.json | 7 - .../getLiveStreamsPlays/responses/400-2.json | 7 - .../getLiveStreamsPlays/responses/400-3.json | 7 - .../getLiveStreamsPlays/responses/400-4.json | 7 - .../getLiveStreamsPlays/responses/403.json | 5 - .../getLiveStreamsPlays/responses/404.json | 3 - .../getMetricsBreakdown/responses/200.json | 31 + .../responses/400-0.json | 2 +- .../responses/400-1.json} | 4 +- .../getMetricsBreakdown/responses/404.json | 5 + .../responses/429.json | 0 .../getMetricsOverTime/responses/200.json | 37 + .../getMetricsOverTime/responses/400-0.json | 7 + .../responses/400-1.json | 4 +- .../getMetricsOverTime/responses/404.json | 5 + .../getMetricsOverTime/responses/429.json | 5 + .../getVideosPlays/responses/200-0.json | 29 - .../getVideosPlays/responses/200-1.json | 32 - .../getVideosPlays/responses/200-2.json | 29 - .../getVideosPlays/responses/400-2.json | 7 - .../getVideosPlays/responses/400-3.json | 7 - .../getVideosPlays/responses/400-4.json | 7 - .../getVideosPlays/responses/403.json | 5 - .../getVideosPlays/responses/404.json | 3 - .../livestreams/complete/responses/404.json | 6 + .../livestreams/complete/responses/429.json | 5 + .../livestreams/create/responses/400-1.json | 2 +- .../livestreams/create/responses/400-2.json | 2 +- .../deleteThumbnail/responses/404.json | 2 +- .../livestreams/update/responses/400-1.json | 2 +- .../livestreams/update/responses/400-2.json | 2 +- .../uploadThumbnail/responses/400.json | 2 +- .../uploadThumbnail/responses/404.json | 2 +- .../playerthemes/delete/responses/404.json | 2 +- .../deleteLogo/responses/404.json | 2 +- .../playerthemes/get/responses/404.json | 2 +- .../playerthemes/update/responses/404.json | 2 +- .../uploadLogo/responses/400.json | 2 +- .../uploadLogo/responses/404.json | 2 +- .../payloads/videos/create/responses/400.json | 10 +- .../payloads/videos/delete/responses/404.json | 2 +- .../payloads/videos/get/responses/404.json | 2 +- .../videos/getStatus/responses/404.json | 2 +- .../videos/pickThumbnail/responses/404.json | 2 +- .../payloads/videos/update/responses/400.json | 8 +- .../payloads/videos/update/responses/404.json | 2 +- .../payloads/videos/upload/responses/400.json | 10 +- .../payloads/videos/upload/responses/404.json | 2 +- .../videos/uploadThumbnail/responses/400.json | 2 +- .../videos/uploadThumbnail/responses/404.json | 2 +- .../watermarks/delete/responses/404.json | 2 +- .../watermarks/upload/responses/400.json | 2 +- .../webhooks/create/responses/400.json | 8 +- .../webhooks/delete/responses/404.json | 2 +- 140 files changed, 6438 insertions(+), 4549 deletions(-) create mode 100644 docs/AnalyticsAggregatedMetricsResponse.md create mode 100644 docs/AnalyticsAggregatedMetricsResponseContext.md create mode 100644 docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md create mode 100644 docs/AnalyticsMetricsBreakdownResponse.md create mode 100644 docs/AnalyticsMetricsBreakdownResponseContext.md create mode 100644 docs/AnalyticsMetricsBreakdownResponseData.md create mode 100644 docs/AnalyticsMetricsOverTimeResponse.md create mode 100644 docs/AnalyticsMetricsOverTimeResponseContext.md create mode 100644 docs/AnalyticsMetricsOverTimeResponseData.md create mode 100644 docs/FilterBy.md create mode 100644 docs/FilterBy1.md create mode 100644 docs/FilterBy2.md delete mode 100644 docs/LiveStreamSession.md delete mode 100644 docs/LiveStreamSessionClient.md delete mode 100644 docs/LiveStreamSessionDevice.md delete mode 100644 docs/LiveStreamSessionLocation.md delete mode 100644 docs/LiveStreamSessionReferrer.md delete mode 100644 docs/LiveStreamSessionSession.md create mode 100644 docs/UnrecognizedRequestUrl.md delete mode 100644 docs/VideoSession.md delete mode 100644 docs/VideoSessionClient.md delete mode 100644 docs/VideoSessionDevice.md delete mode 100644 docs/VideoSessionLocation.md delete mode 100644 docs/VideoSessionOs.md delete mode 100644 docs/VideoSessionReferrer.md delete mode 100644 docs/VideoSessionSession.md create mode 100644 src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponse.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContext.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContextTimeframe.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponse.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseContext.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseData.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponse.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseContext.java create mode 100644 src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseData.java create mode 100644 src/main/java/video/api/client/api/models/FilterBy.java create mode 100644 src/main/java/video/api/client/api/models/FilterBy1.java create mode 100644 src/main/java/video/api/client/api/models/FilterBy2.java delete mode 100644 src/main/java/video/api/client/api/models/LiveStreamSession.java delete mode 100644 src/main/java/video/api/client/api/models/LiveStreamSessionClient.java delete mode 100644 src/main/java/video/api/client/api/models/LiveStreamSessionDevice.java delete mode 100644 src/main/java/video/api/client/api/models/LiveStreamSessionLocation.java delete mode 100644 src/main/java/video/api/client/api/models/LiveStreamSessionReferrer.java delete mode 100644 src/main/java/video/api/client/api/models/LiveStreamSessionSession.java rename src/main/java/video/api/client/api/models/{VideoSessionDevice.java => UnrecognizedRequestUrl.java} (53%) delete mode 100644 src/main/java/video/api/client/api/models/VideoSession.java delete mode 100644 src/main/java/video/api/client/api/models/VideoSessionClient.java delete mode 100644 src/main/java/video/api/client/api/models/VideoSessionLocation.java delete mode 100644 src/main/java/video/api/client/api/models/VideoSessionOs.java delete mode 100644 src/main/java/video/api/client/api/models/VideoSessionReferrer.java delete mode 100644 src/main/java/video/api/client/api/models/VideoSessionSession.java create mode 100644 src/test/resources/payloads/analytics/getAggregatedMetrics/responses/200.json rename src/test/resources/payloads/analytics/{getVideosPlays => getAggregatedMetrics}/responses/400-0.json (88%) rename src/test/resources/payloads/analytics/{getVideosPlays/responses/400-5.json => getAggregatedMetrics/responses/400-1.json} (61%) create mode 100644 src/test/resources/payloads/analytics/getAggregatedMetrics/responses/404.json rename src/test/resources/payloads/analytics/{getLiveStreamsPlays => getAggregatedMetrics}/responses/429.json (100%) delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json delete mode 100644 src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json create mode 100644 src/test/resources/payloads/analytics/getMetricsBreakdown/responses/200.json rename src/test/resources/payloads/analytics/{getLiveStreamsPlays => getMetricsBreakdown}/responses/400-0.json (88%) rename src/test/resources/payloads/analytics/{getLiveStreamsPlays/responses/400-5.json => getMetricsBreakdown/responses/400-1.json} (61%) create mode 100644 src/test/resources/payloads/analytics/getMetricsBreakdown/responses/404.json rename src/test/resources/payloads/analytics/{getVideosPlays => getMetricsBreakdown}/responses/429.json (100%) create mode 100644 src/test/resources/payloads/analytics/getMetricsOverTime/responses/200.json create mode 100644 src/test/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json rename src/test/resources/payloads/analytics/{getVideosPlays => getMetricsOverTime}/responses/400-1.json (58%) create mode 100644 src/test/resources/payloads/analytics/getMetricsOverTime/responses/404.json create mode 100644 src/test/resources/payloads/analytics/getMetricsOverTime/responses/429.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/200-0.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/200-1.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/200-2.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/400-2.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/400-3.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/400-4.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/403.json delete mode 100644 src/test/resources/payloads/analytics/getVideosPlays/responses/404.json create mode 100644 src/test/resources/payloads/livestreams/complete/responses/404.json create mode 100644 src/test/resources/payloads/livestreams/complete/responses/429.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f55c38..f905665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All changes to this project will be documented in this file. +## [1.4.0] - 2024-07-29 +- Add new analytics methods +- Add livestream complete() method + ## [1.3.3] - 2024-04-25 - Add API to get rate limiting headers diff --git a/README.md b/README.md index 8121def..6fc94cc 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Add this dependency to your project's POM: video.api java-api-client - 1.3.3 + 1.4.0 compile ``` @@ -78,7 +78,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -implementation "video.api:java-api-client:1.3.3" +implementation "video.api:java-api-client:1.4.0" ``` #### Others @@ -91,7 +91,7 @@ mvn clean package Then manually install the following JARs: -* `target/java-api-client-1.3.3.jar` +* `target/java-api-client-1.4.0.jar` * `target/lib/*.jar` ### Code sample @@ -151,8 +151,9 @@ AnalyticsApi analytics = client.analytics() Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLiveStreamsPlays**](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsApi.md#getLiveStreamsPlays) | **GET** `/analytics/live-streams/plays` | Get play events for live stream -[**getVideosPlays**](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsApi.md#getVideosPlays) | **GET** `/analytics/videos/plays` | Get play events for video +[**getAggregatedMetrics**](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsApi.md#getAggregatedMetrics) | **GET** `/data/metrics/{metric}/{aggregation}` | Retrieve aggregated metrics +[**getMetricsBreakdown**](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsApi.md#getMetricsBreakdown) | **GET** `/data/buckets/{metric}/{breakdown}` | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsApi.md#getMetricsOverTime) | **GET** `/data/timeseries/{metric}` | Retrieve metrics over time ### CaptionsApi @@ -220,6 +221,7 @@ Method | HTTP request | Description [**list**](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#list) | **GET** `/live-streams` | List all live streams [**uploadThumbnail**](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail) | **POST** `/live-streams/{liveStreamId}/thumbnail` | Upload a thumbnail [**deleteThumbnail**](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail) | **DELETE** `/live-streams/{liveStreamId}/thumbnail` | Delete a thumbnail +[**complete**](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#complete) | **PUT** `/live-streams/{liveStreamId}/complete` | Complete a live stream ### PlayerThemesApi @@ -340,7 +342,16 @@ Method | HTTP request | Description - [AccessToken](https://github.com/apivideo/api.video-java-client/blob/main/docs/AccessToken.md) - [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-java-client/blob/main/docs/AdditionalBadRequestErrors.md) + - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsAggregatedMetricsResponse.md) + - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContext.md) + - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md) - [AnalyticsData](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsData.md) + - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsMetricsBreakdownResponse.md) + - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsMetricsBreakdownResponseContext.md) + - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsMetricsBreakdownResponseData.md) + - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsMetricsOverTimeResponse.md) + - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsMetricsOverTimeResponseContext.md) + - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsMetricsOverTimeResponseData.md) - [AnalyticsPlays400Error](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsPlays400Error.md) - [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/AnalyticsPlaysResponse.md) - [AuthenticatePayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/AuthenticatePayload.md) @@ -351,17 +362,14 @@ Method | HTTP request | Description - [CaptionsUpdatePayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsUpdatePayload.md) - [Chapter](https://github.com/apivideo/api.video-java-client/blob/main/docs/Chapter.md) - [ChaptersListResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersListResponse.md) + - [FilterBy](https://github.com/apivideo/api.video-java-client/blob/main/docs/FilterBy.md) + - [FilterBy1](https://github.com/apivideo/api.video-java-client/blob/main/docs/FilterBy1.md) + - [FilterBy2](https://github.com/apivideo/api.video-java-client/blob/main/docs/FilterBy2.md) - [Link](https://github.com/apivideo/api.video-java-client/blob/main/docs/Link.md) - [LiveStream](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStream.md) - [LiveStreamAssets](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamAssets.md) - [LiveStreamCreationPayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamCreationPayload.md) - [LiveStreamListResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamListResponse.md) - - [LiveStreamSession](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamSession.md) - - [LiveStreamSessionClient](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamSessionClient.md) - - [LiveStreamSessionDevice](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamSessionDevice.md) - - [LiveStreamSessionLocation](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamSessionLocation.md) - - [LiveStreamSessionReferrer](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamSessionReferrer.md) - - [LiveStreamSessionSession](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamSessionSession.md) - [LiveStreamUpdatePayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamUpdatePayload.md) - [Metadata](https://github.com/apivideo/api.video-java-client/blob/main/docs/Metadata.md) - [Model403ErrorSchema](https://github.com/apivideo/api.video-java-client/blob/main/docs/Model403ErrorSchema.md) @@ -381,18 +389,12 @@ Method | HTTP request | Description - [TokenCreationPayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-java-client/blob/main/docs/TooManyRequests.md) + - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-java-client/blob/main/docs/UnrecognizedRequestUrl.md) - [UploadToken](https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadToken.md) - [Video](https://github.com/apivideo/api.video-java-client/blob/main/docs/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoAssets.md) - [VideoClip](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoClip.md) - [VideoCreationPayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoCreationPayload.md) - - [VideoSession](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSession.md) - - [VideoSessionClient](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSessionClient.md) - - [VideoSessionDevice](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSessionDevice.md) - - [VideoSessionLocation](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSessionLocation.md) - - [VideoSessionOs](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSessionOs.md) - - [VideoSessionReferrer](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSessionReferrer.md) - - [VideoSessionSession](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSessionSession.md) - [VideoSource](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSource.md) - [VideoSourceLiveStream](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSourceLiveStream.md) - [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideoSourceLiveStreamLink.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 0c4c208..117fa4c 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -44,7 +44,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/authenticationinvalid_credentials + type: https://docs.api.video/reference/authentication-invalid-user-credentials title: The user credentials were incorrect. name: "" status: 400 @@ -122,7 +122,7 @@ paths: response: value: status: 400 - type: https://docs.api.video/docs/authenticationinvalid_credentials + type: https://docs.api.video/reference/authentication-invalid-user-credentials title: The user credentials were incorrect. name: "" schema: @@ -453,7 +453,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -690,21 +690,21 @@ paths: examples: response: value: - type: https://docs.api.video/docs/attributerequired + type: https://docs.api.video/reference/attribute-required title: This attribute is required. name: title status: 400 problems: - - type: https://docs.api.video/docs/attributerequired + - type: https://docs.api.video/reference/attribute-required title: This attribute is required. name: title - - type: https://docs.api.video/docs/attributeinvalid + - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be a ISO8601 date. name: scheduledAt - - type: https://docs.api.video/docs/attributeinvalid + - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be an array. name: tags - - type: https://docs.api.video/docs/attributeinvalid + - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be an array. name: metadata schema: @@ -735,7 +735,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1066,21 +1066,21 @@ paths: examples: response: value: - type: https://docs.api.video/docs/filealreadyuploaded + type: https://docs.api.video/reference/video-source-already-uploaded title: The source of the video is already uploaded. name: file status: 400 problems: - - type: https://docs.api.video/docs/filealreadyuploaded + - type: https://docs.api.video/reference/video-source-already-uploaded title: The source of the video is already uploaded. name: file - - type: https://docs.api.video/docs/filealreadyuploaded + - type: https://docs.api.video/reference/video-source-already-uploaded title: The video xxxx has already been uploaded. name: video - - type: https://docs.api.video/docs/filemissing + - type: https://docs.api.video/reference/uploaded-file-no-file title: There is no uploaded file in the request. name: file - - type: https://docs.api.video/docs/multiplefilesuploaded + - type: https://docs.api.video/reference/uploaded-file-multiple-files title: There is more than one uploaded file in the request. name: file schema: @@ -1113,7 +1113,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: videoId status: 404 @@ -1145,7 +1145,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1515,7 +1515,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1642,7 +1642,7 @@ paths: response: value: status: 400 - type: https://docs.api.video/docs/fileextension + type: https://docs.api.video/reference/uploaded-file-extension-invalid title: Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported. name: file schema: @@ -1673,7 +1673,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1904,7 +1904,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: watermarkId status: 404 @@ -1936,7 +1936,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2093,7 +2093,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: videoId status: 404 @@ -2125,7 +2125,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2360,7 +2360,7 @@ paths: response: value: status: 400 - type: https://docs.api.video/docs/fileextension + type: https://docs.api.video/reference/uploaded-file-extension-invalid title: Only [jpeg, jpg, JPG, JPEG] extensions are supported. name: file schema: @@ -2393,7 +2393,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: videoId status: 404 @@ -2425,7 +2425,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2611,7 +2611,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: videoId status: 404 @@ -2643,7 +2643,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2844,7 +2844,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: videoId status: 404 @@ -2876,7 +2876,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3095,18 +3095,18 @@ paths: examples: response: value: - type: https://docs.api.video/docs/attributeinvalid + type: https://docs.api.video/reference/invalid-attribute title: This attribute must be a ISO-8601 date. name: scheduledAt status: 400 problems: - - type: https://docs.api.video/docs/attributeinvalid + - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be a ISO-8601 date. name: scheduledAt - - type: https://docs.api.video/docs/attributeinvalid + - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be an array. name: tags - - type: https://docs.api.video/docs/attributeinvalid + - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be an array. name: metadata schema: @@ -3139,7 +3139,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: videoId status: 404 @@ -3171,7 +3171,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3450,7 +3450,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: videoId status: 404 @@ -3482,7 +3482,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3747,7 +3747,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3993,7 +3993,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4193,7 +4193,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4419,7 +4419,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4692,7 +4692,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4961,7 +4961,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5218,22 +5218,22 @@ paths: detail: This value should not be blank. name: restreams[0][name] Missing app name in serverUrl: - description: This error occurs when the rtmp app name is missing - from `serverURL` in the `restreams` array. + description: This error occurs when the app name is missing from + `serverURL` in the `restreams` array. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 - detail: 'Missing app name: rtmp://[host]/[app name].' + detail: 'Missing app name: [rtmp|rtmps]://[host]/[app name].' name: restreams[0][serverUrl] Incorrect URL in serverUrl: description: This error occurs when the URL you set in `serverURL` - is not `rtmp`. + is not `rtmps` or `rtmp`. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 - detail: 'RTMP URL should have the following format: rtmp://[host]/[app + detail: 'RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].' name: restreams[0][serverUrl] Too many restream destinations: @@ -5282,7 +5282,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5480,7 +5480,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5673,7 +5673,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5907,22 +5907,22 @@ paths: detail: This value should not be blank. name: restreams[0][name] Missing app name in serverUrl: - description: This error occurs when the rtmp app name is missing - from `serverURL` in the `restreams` array. + description: This error occurs when the app name is missing from + `serverURL` in the `restreams` array. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 - detail: 'Missing app name: rtmp://[host]/[app name].' + detail: 'Missing app name: [rtmp|rtmps]://[host]/[app name].' name: restreams[0][serverUrl] Incorrect URL in serverUrl: description: This error occurs when the URL you set in `serverURL` - is not `rtmp`. + is not `rtmps` or `rtmp`. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 - detail: 'RTMP URL should have the following format: rtmp://[host]/[app + detail: 'RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].' name: restreams[0][serverUrl] Too many restream destinations: @@ -5971,7 +5971,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -6225,7 +6225,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: liveStreamId status: 404 @@ -6257,7 +6257,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -6435,7 +6435,7 @@ paths: response: value: status: 400 - type: https://docs.api.video/docs/fileextension + type: https://docs.api.video/reference/uploaded-file-extension-invalid title: Only [jpeg, jpg, JPG, JPEG] extensions are supported. name: file schema: @@ -6468,7 +6468,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: liveStreamId status: 404 @@ -6500,7 +6500,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -6665,6 +6665,124 @@ paths: // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#uploadThumbnail x-contentType: multipart/form-data x-accepts: application/json + /live-streams/{liveStreamId}/complete: + put: + description: "Request the completion of a live stream that is currently running.\ + \ This operation is asynchronous and the live stream will stop after a few\ + \ seconds. \n\nThe API adds the `EXT-X-ENDLIST` tag to the live stream's HLS\ + \ manifest. This stops the live stream on the player and also stops the recording\ + \ of the live stream. The API keeps the incoming connection from the streamer\ + \ open for at most 1 minute, which can be used to terminate the stream.\n" + operationId: PUT_live-streams-liveStreamId-complete + parameters: + - description: The unique ID for the live stream you want to complete. + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + explode: false + in: path + name: liveStreamId + required: true + schema: + type: string + style: simple + responses: + "202": + description: Accepted + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/resource-not-found + title: The requested resource was not found. + name: liveStreamId + status: 404 + schema: + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Complete a live stream + tags: + - Live Streams + x-client-action: complete + x-doctave: {} + x-accepts: application/json /videos/{videoId}/captions/{language}: delete: description: Delete a caption in a specific language by by video id. @@ -6796,7 +6914,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -7096,7 +7214,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -7419,7 +7537,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -7725,7 +7843,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -8021,7 +8139,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -8267,7 +8385,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -8506,7 +8624,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -8786,7 +8904,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9073,7 +9191,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9418,7 +9536,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9654,7 +9772,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9909,7 +10027,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: playerId status: 404 @@ -9941,7 +10059,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10151,7 +10269,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: playerId status: 404 @@ -10183,7 +10301,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10379,7 +10497,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: playerId status: 404 @@ -10411,7 +10529,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10654,7 +10772,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: playerId status: 404 @@ -10686,7 +10804,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10885,7 +11003,7 @@ paths: response: value: status: 400 - type: https://docs.api.video/docs/fileextension + type: https://docs.api.video/reference/uploaded-file-extension-invalid title: Only ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] extensions are supported. name: file @@ -10919,7 +11037,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: playerId status: 404 @@ -10951,7 +11069,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -11119,175 +11237,196 @@ paths: // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#uploadLogo x-contentType: multipart/form-data x-accepts: application/json - /analytics/videos/plays: + /data/metrics/{metric}/{aggregation}: get: - description: Retrieve filtered analytics about the number of plays for your - videos in a project. - operationId: GET_analytics-videos-plays + description: Retrieve time-based and countable metrics like average watch time + or the number of impressions over a certain period of time. + operationId: GET_aggregated-metrics parameters: - description: | - Use this query parameter to set the start date for the time period that you want analytics for. - - The API returns analytics data including the day you set in `from`. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. - example: 2023-06-01 - explode: true - in: query - name: from + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. + - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. + - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. + - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. + - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. + - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + explode: false + in: path + name: metric required: true schema: - format: date - type: string - style: form - - description: | - Use this optional query parameter to set the end date for the time period that you want analytics for. - - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. - example: 2023-06-10 - explode: true - in: query - name: to - required: false - schema: - format: date + enum: + - play + - start + - end + - impression + - impression-time + - watch-time type: string - style: form - - description: |- - Use this query parameter to define the dimension that you want analytics for. - - `videoId`: Returns analytics based on the public video identifiers. - - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - example: browser + style: simple + - description: "Use this path parameter to define a way of collecting data for\ + \ the metric that you want analytics for.\n\n- `count` returns the overall\ + \ number of events for the `play` metric.\n- `rate` returns the ratio that\ + \ calculates the number of plays your content receives divided by its impressions.\ + \ This aggregation can be used only with the `play` metric.\n- `total` calculates\ + \ the total number of events for the `play` metric. \n- `average` calculates\ + \ an average value for the selected metric.\n- `sum` adds up the total value\ + \ of the select metric.\n" explode: false - in: query - name: dimension + in: path + name: aggregation required: true schema: enum: - - videoId - - emittedAt - - country - - deviceType - - operatingSystem - - browser + - count + - rate + - total + - average + - sum type: string - style: form - - description: Use this query parameter to filter your results to a specific - video in a project that you want analytics for. You must use the `videoId:` - prefix when specifying a video ID. - example: videoId:vi3q7HxhApxRF1c8F8r6VeaI + style: simple + - description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 30 days ago. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + - The API ignores this parameter when you call `/data/metrics/play/total`. + example: 2024-02-05T00:00:00+01:00 explode: false in: query - name: filter + name: from required: false schema: + format: date-time type: string style: form - - description: 'Choose the number of search results to return per page. Minimum - value: 1' - example: 2 - explode: true + - description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The API ignores this parameter when you call `/data/metrics/play/total`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + example: 2024-02-06T00:00:00+01:00 + explode: false in: query - name: currentPage + name: to required: false schema: - default: 1 - type: integer + format: date-time + type: string style: form - - description: Results per page. Allowed values 1-100, default is 25. - example: 30 + - $ref: '#/components/parameters/filterBy_2' + description: "Use this parameter to filter the API's response based on different\ + \ data dimensions. You can serialize filters in your query to receive more\ + \ detailed breakdowns of your analytics.\n\n- If you do not set a value\ + \ for `filterBy`, the API returns the full dataset for your project.\n-\ + \ The API only accepts the `mediaId` and `mediaType` filters when you call\ + \ `/data/metrics/play/total`.\n\nThese are the available breakdown dimensions:\n\ + \n- `mediaId`: Returns analytics based on the unique identifiers of a video\ + \ or a live stream.\n- `mediaType`: Returns analytics based on the type\ + \ of content. Possible values: `video` and `live-stream`. \n- `continent`:\ + \ Returns analytics based on the viewers' continent. The list of supported\ + \ continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ You must use the ISO-3166 alpha2 format, for example `EU`. Possible values\ + \ are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`: Returns\ + \ analytics based on the viewers' country. The list of supported country\ + \ names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ You must use the ISO-3166 alpha2 format, for example `FR`.\n- `deviceType`:\ + \ Returns analytics based on the type of device used by the viewers. Possible\ + \ response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`,\ + \ `unknown`.\n- `operatingSystem`: Returns analytics based on the operating\ + \ system used by the viewers. Response values include `windows`, `mac osx`,\ + \ `android`, `ios`, `linux`.\n- `browser`: Returns analytics based on the\ + \ browser used by the viewers. Response values include `chrome`, `firefox`,\ + \ `edge`, `opera`.\n- `tag`: Returns analytics for videos using this tag.\ + \ This filter only accepts a single value and is case sensitive. Read more\ + \ about tagging your videos [here](https://docs.api.video/vod/tags-metadata).\n" + example: + mediaType: video + continent: EU + country: FR explode: true in: query - name: pageSize + name: filterBy required: false schema: - default: 25 - type: integer - style: form + properties: + mediaId: + description: Returns analytics based on the unique identifiers of a + video or a live stream. + example: vi4blUQJFrYWbaG44NChkH27 + type: string + mediaType: + enum: + - video + - live-stream + example: video + type: string + continent: + description: Returns analytics based on the viewers' continent. The + list of supported continents names are based on the [GeoNames public + database](https://www.geonames.org/countries/). You must use the ISO-3166 + alpha2 format, for example `EU`. + enum: + - AS + - AF + - NA + - SA + - AN + - EU + - AZ + example: EU + type: string + country: + description: Returns analytics based on the viewers' country. The list + of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `FR`. + example: FR + type: string + deviceType: + description: 'Returns analytics based on the type of device used by + the viewers. Possible response values are: `computer`, `phone`, `tablet`, + `tv`, `console`, `wearable`, `unknown`.' + example: computer + type: string + operatingSystem: + description: Returns analytics based on the operating system used by + the viewers. Response values include `windows`, `mac osx`, `android`, + `ios`, `linux`. + example: windows + type: string + browser: + description: Returns analytics based on the browser used by the viewers. + Response values include `chrome`, `firefox`, `edge`, `opera`. + example: firefox + type: string + tag: + description: Returns analytics for videos using this tag. This filter + only accepts a single value and is case sensitive. Read more about + tagging your videos [here](https://docs.api.video/vod/tags-metadata). + example: Cool videos + type: string + type: object + style: deepObject responses: "200": content: application/json: examples: - Dimension is videoId: - description: Breakdown video-plays by videoId for a project. + Impression time from a certain date: value: - data: - - value: vi3q7HxhApxRF1c8F8r6VeaI - plays: 100 - - value: vi3q7HxhApxRF1c8F8r6VeaF - plays: 10 - - value: vi3q7HxhApxRF1c8F8r6VeaH - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 3 - pageSize: 25 - pagesTotal: 1 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 - - rel: first - uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 - - rel: last - uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 - Dimension is country: - description: Breakdown video-plays by country for a project, with - pagination set. - value: - data: - - value: france - plays: 100 - - value: united states - plays: 10 - - value: spain - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 2 - pageSize: 2 - pagesTotal: 2 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/videos/plays?dimension=country¤tPage=1&pageSize=2 - - rel: first - uri: /analytics/videos/plays?dimension=country¤tPage=1&pageSize=2 - - rel: next - uri: /analytics/videos/plays?dimension=country¤tPage=2&pageSize=1 - - rel: last - uri: /analytics/videos/plays?dimension=country¤tPage=2&pageSize=1 - Dimension is emittedAt, filtered for a videoId: - description: Breakdown video-plays by the time of play events, for - a specific video. - value: - data: - - value: 2023-06-10T10:00:00.000Z - plays: 100 - - value: 2023-06-10T11:00:00.000Z - plays: 10 - - value: 2023-06-10T12:00:00.000Z - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 3 - pageSize: 25 - pagesTotal: 1 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 - - rel: first - uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 - - rel: last - uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 + context: + metric: impression + aggregation: count + timeframe: + from: 2024-05-28T11:15:07+00:00 + to: 2024-05-29T11:15:07+00:00 + data: 346.5 schema: - $ref: '#/components/schemas/analytics-plays-response' + $ref: '#/components/schemas/analytics-aggregated-metrics-response' description: Success headers: X-RateLimit-Limit: @@ -11314,61 +11453,26 @@ paths: content: application/json: examples: - Missing parameter: - description: This error occurs when a required query-parameter is - missing. + Invalid attribute: + description: This error occurs when a parameter you provided does + not exist, or isn't correct for this endpoint, has an invalid + value. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 detail: This value must be of type string. - name: dimension - Invalid parameter: - description: This error occurs when a required query-parameter format - is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): videoId:{videoId}' - name: filter - Dimension not allowed: - description: This error occurs when the dimension you requested - is not allowed for the endpoint. For example, the dimension `videoId` - is not allowed for the `/live-streams` endpoint. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' - name: dimension - Dimension unknown: - description: This error occurs when the dimension you requested - is unknown. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' - name: dimension - Invalid filter: - description: This error occurs when the format of the filter you - requested is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): videoId:{videoId}' - name: filter - Invalid videoId: - description: This error occurs when the videoId you requested does - not refer to an existing video. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided + does not exist, isn't correct for this endpoint, or has an invalid + value. value: type: https://docs.api.video/reference/request-invalid-query-parameter title: A query parameter is invalid. status: 400 - detail: This value must refer to an existing video - name: filter + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 schema: $ref: '#/components/schemas/analytics-plays-400-error' description: Bad request error @@ -11393,18 +11497,18 @@ paths: schema: type: integer style: simple - "403": + "404": content: application/json: examples: - Analytics is disabled: + Unrecognized request URL: value: - type: https://docs.api.video/reference/authorization-disabled-analytics - title: You cannot get analytics from this project. - status: 403 + type: https://docs.api.video/reference/unrecognized-request-url + title: Unrecognized request URL. + status: 404 schema: - $ref: '#/components/schemas/403-error-schema' - description: Forbidden - Disabled Analytics + $ref: '#/components/schemas/unrecognized-request-url' + description: Unrecognized request URL headers: X-RateLimit-Limit: description: The request limit per minute. @@ -11426,19 +11530,18 @@ paths: schema: type: integer style: simple - "404": + "429": content: application/json: examples: - Endpoint not found: + Too many requests: value: - type: null - title: null - name: null - status: 404 + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 schema: - $ref: '#/components/schemas/not-found' - description: Not Found + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests headers: X-RateLimit-Limit: description: The request limit per minute. @@ -11460,11 +11563,359 @@ paths: schema: type: integer style: simple - "429": - content: - application/json: + security: + - apiKey: [] + summary: Retrieve aggregated metrics + tags: + - Analytics + x-client-action: getAggregatedMetrics + x-group-parameters: true + x-doctave: {} + x-accepts: application/json + /data/buckets/{metric}/{breakdown}: + get: + description: Retrieve detailed analytics play-rate and number of impressions + segmented by dimensions like country or device type. + operationId: GET_metrics-breakdown + parameters: + - description: | + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. + - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. + - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. + - `start` is the number of times playback was started. + - `end` is the number of times playback has ended with the content watch until the end. + - `impression` is the number of times your content has been loaded and was ready for playback. + explode: false + in: path + name: metric + required: true + schema: + enum: + - play + - play-rate + - play-total + - start + - end + - impression + type: string + style: simple + - description: "Use this path parameter to define a dimension for segmenting\ + \ analytics data. You must use `kebab-case` for path parameters.\n\nThese\ + \ are the available dimensions:\n\n- `media-id`: Returns analytics based\ + \ on the unique identifiers of a video or a live stream.\n- `media-type`:\ + \ Returns analytics based on the type of content. Possible values: `video`\ + \ and `live-stream`. \n- `continent`: Returns analytics based on the viewers'\ + \ continent. The list of supported continents names are based on the [GeoNames\ + \ public database](https://www.geonames.org/countries/). Possible values\ + \ are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`: Returns\ + \ analytics based on the viewers' country. The list of supported country\ + \ names are based on the [GeoNames public database](https://www.geonames.org/countries/).\n\ + - `device-type`: Returns analytics based on the type of device used by the\ + \ viewers. Possible response values are: `computer`, `phone`, `tablet`,\ + \ `tv`, `console`, `wearable`, `unknown`.\n- `operating-system`: Returns\ + \ analytics based on the operating system used by the viewers. Response\ + \ values include `windows`, `mac osx`, `android`, `ios`, `linux`.\n- `browser`:\ + \ Returns analytics based on the browser used by the viewers. Response values\ + \ include `chrome`, `firefox`, `edge`, `opera`.\n" + explode: false + in: path + name: breakdown + required: true + schema: + enum: + - media-id + - media-type + - continent + - country + - device-type + - operating-system + - browser + type: string + style: simple + - description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 30 days ago. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + example: 2024-02-05T00:00:00+01:00 + explode: false + in: query + name: from + required: false + schema: + format: date-time + type: string + style: form + - description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + example: 2024-02-06T00:00:00+01:00 + explode: false + in: query + name: to + required: false + schema: + format: date-time + type: string + style: form + - $ref: '#/components/parameters/filterBy_2' + description: "Use this parameter to filter the API's response based on different\ + \ data dimensions. You can serialize filters in your query to receive more\ + \ detailed breakdowns of your analytics.\n\n- If you do not set a value\ + \ for `filterBy`, the API returns the full dataset for your project.\n-\ + \ The API only accepts the `mediaId` and `mediaType` filters when you call\ + \ `/data/metrics/play/total`.\n\nThese are the available breakdown dimensions:\n\ + \n- `mediaId`: Returns analytics based on the unique identifiers of a video\ + \ or a live stream.\n- `mediaType`: Returns analytics based on the type\ + \ of content. Possible values: `video` and `live-stream`. \n- `continent`:\ + \ Returns analytics based on the viewers' continent. The list of supported\ + \ continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ You must use the ISO-3166 alpha2 format, for example `EU`. Possible values\ + \ are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`: Returns\ + \ analytics based on the viewers' country. The list of supported country\ + \ names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ You must use the ISO-3166 alpha2 format, for example `FR`.\n- `deviceType`:\ + \ Returns analytics based on the type of device used by the viewers. Possible\ + \ response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`,\ + \ `unknown`.\n- `operatingSystem`: Returns analytics based on the operating\ + \ system used by the viewers. Response values include `windows`, `mac osx`,\ + \ `android`, `ios`, `linux`.\n- `browser`: Returns analytics based on the\ + \ browser used by the viewers. Response values include `chrome`, `firefox`,\ + \ `edge`, `opera`.\n- `tag`: Returns analytics for videos using this tag.\ + \ This filter only accepts a single value and is case sensitive. Read more\ + \ about tagging your videos [here](https://docs.api.video/vod/tags-metadata).\n" + example: + mediaType: video + continent: EU + country: FR + explode: true + in: query + name: filterBy + required: false + schema: + properties: + mediaId: + description: Returns analytics based on the unique identifiers of a + video or a live stream. + example: vi4blUQJFrYWbaG44NChkH27 + type: string + mediaType: + enum: + - video + - live-stream + example: video + type: string + continent: + description: Returns analytics based on the viewers' continent. The + list of supported continents names are based on the [GeoNames public + database](https://www.geonames.org/countries/). You must use the ISO-3166 + alpha2 format, for example `EU`. + enum: + - AS + - AF + - NA + - SA + - AN + - EU + - AZ + example: EU + type: string + country: + description: Returns analytics based on the viewers' country. The list + of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `FR`. + example: FR + type: string + deviceType: + description: 'Returns analytics based on the type of device used by + the viewers. Possible response values are: `computer`, `phone`, `tablet`, + `tv`, `console`, `wearable`, `unknown`.' + example: computer + type: string + operatingSystem: + description: Returns analytics based on the operating system used by + the viewers. Response values include `windows`, `mac osx`, `android`, + `ios`, `linux`. + example: windows + type: string + browser: + description: Returns analytics based on the browser used by the viewers. + Response values include `chrome`, `firefox`, `edge`, `opera`. + example: firefox + type: string + tag: + description: Returns analytics for videos using this tag. This filter + only accepts a single value and is case sensitive. Read more about + tagging your videos [here](https://docs.api.video/vod/tags-metadata). + example: Cool videos + type: string + type: object + style: deepObject + - description: 'Choose the number of search results to return per page. Minimum + value: 1' + example: 2 + explode: true + in: query + name: currentPage + required: false + schema: + default: 1 + type: integer + style: form + - description: Results per page. Allowed values 1-100, default is 25. + example: 30 + explode: true + in: query + name: pageSize + required: false + schema: + default: 25 + type: integer + style: form + responses: + "200": + content: + application/json: examples: - response: + Number of plays in a country over a specific timeframe: + value: + context: + metric: play + breakdown: country + timeframe: + from: 2024-04-28T07:15:05+00:00 + to: 2024-05-29T11:25:37+00:00 + data: + - metricValue: 7 + dimensionValue: FR + pagination: + currentPage: 1 + currentPageItems: 1 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 1 + links: + - rel: self + uri: /data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25 + - rel: first + uri: /data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25 + - rel: last + uri: /data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25 + schema: + $ref: '#/components/schemas/analytics-metrics-breakdown-response' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": + content: + application/json: + examples: + Invalid attribute: + description: This error occurs when a parameter you provided does + not exist, or isn't correct for this endpoint, has an invalid + value. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: This value must be of type string. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided + does not exist, isn't correct for this endpoint, or has an invalid + value. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 + schema: + $ref: '#/components/schemas/analytics-plays-400-error' + description: Bad request error + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + Unrecognized request URL: + value: + type: https://docs.api.video/reference/unrecognized-request-url + title: Unrecognized request URL. + status: 404 + schema: + $ref: '#/components/schemas/unrecognized-request-url' + description: Unrecognized request URL + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -11495,381 +11946,180 @@ paths: style: simple security: - apiKey: [] - summary: Get play events for video + summary: Retrieve metrics in a breakdown of dimensions tags: - Analytics - x-client-action: getVideosPlays + x-client-action: getMetricsBreakdown x-group-parameters: true x-client-paginated: true - x-doctave: - code-samples: - - language: go - code: "package main\n\nimport (\n \"context\"\n \"fmt\"\n \"os\"\ - \n \"time\"\n apivideosdk \"github.com/apivideo/api.video-go-client\"\ - \n)\n\nfunc main() {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\"\ - ).Build()\n // if you rather like to use the sandbox environment:\n\ - \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_KEY\"\ - ).Build()\n req := apivideosdk.AnalyticsApiGetVideosPlaysRequest{}\n\ - \n req.From(time.Now()) // string | Use this query parameter to set\ - \ the start date for the time period that you want analytics for. - The\ - \ API returns analytics data including the day you set in `from`. - The\ - \ date you set must be **within the last 30 days**. - The value you provide\ - \ must follow the `YYYY-MM-DD` format. \n req.Dimension(\"browser\"\ - ) // string | Use this query parameter to define the dimension that you\ - \ want analytics for. - `videoId`: Returns analytics based on the public\ - \ video identifiers. - `emittedAt`: Returns analytics based on the times\ - \ of the play events. The API returns data in specific interval groups.\ - \ When the date period you set in `from` and `to` is less than or equals\ - \ to 2 days, the response for this dimension is grouped in hourly intervals.\ - \ Otherwise, it is grouped in daily intervals. - `country`: Returns analytics\ - \ based on the viewers' country. The list of supported country names are\ - \ based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n req.To(time.Now()) // string | Use this\ - \ optional query parameter to set the end date for the time period that\ - \ you want analytics for. - If you do not specify a `to` date, the API\ - \ returns analytics data starting from the `from` date up until today,\ - \ and excluding today. - The date you set must be **within the last 30\ - \ days**. - The value you provide must follow the `YYYY-MM-DD` format.\ - \ \n req.Filter(\"videoId:vi3q7HxhApxRF1c8F8r6VeaI\") // string | Use\ - \ this query parameter to filter your results to a specific video in a\ - \ project that you want analytics for. You must use the `videoId:` prefix\ - \ when specifying a video ID.\n req.CurrentPage(int32(2)) // int32\ - \ | Choose the number of search results to return per page. Minimum value:\ - \ 1 (default to 1)\n req.PageSize(int32(30)) // int32 | Results per\ - \ page. Allowed values 1-100, default is 25. (default to 25)\n\n res,\ - \ err := client.Analytics.GetVideosPlays(req)\n\n\n if err != nil {\n\ - \ fmt.Fprintf(os.Stderr, \"Error when calling `Analytics.GetVideosPlays``:\ - \ %v\\n\", err)\n }\n // response from `GetVideosPlays`: AnalyticsPlaysResponse\n\ - \ fmt.Fprintf(os.Stdout, \"Response from `Analytics.GetVideosPlays`:\ - \ %v\\n\", res)\n}\n" - - language: node - code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ - \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/AnalyticsApi.md#getVideosPlays\n\ - \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ - const from = \"2023-06-01\"; // Use this query parameter to set the start\ - \ date for the time period that you want analytics for. - The API returns\ - \ analytics data including the day you set in `from`. - The date you set\ - \ must be **within the last 30 days**. - The value you provide must follow\ - \ the `YYYY-MM-DD` format. \nconst dimension = \"videoId\"; // Use this\ - \ query parameter to define the dimension that you want analytics for.\ - \ - `videoId`: Returns analytics based on the public video identifiers.\ - \ - `emittedAt`: Returns analytics based on the times of the play events.\ - \ The API returns data in specific interval groups. When the date period\ - \ you set in `from` and `to` is less than or equals to 2 days, the response\ - \ for this dimension is grouped in hourly intervals. Otherwise, it is\ - \ grouped in daily intervals. - `country`: Returns analytics based on\ - \ the viewers' country. The list of supported country names are based\ - \ on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\nconst to = \"2023-06-10\"; // Use this optional\ - \ query parameter to set the end date for the time period that you want\ - \ analytics for. - If you do not specify a `to` date, the API returns\ - \ analytics data starting from the `from` date up until today, and excluding\ - \ today. - The date you set must be **within the last 30 days**. - The\ - \ value you provide must follow the `YYYY-MM-DD` format. \nconst filter\ - \ = \"videoId:vi3q7HxhApxRF1c8F8r6VeaI\"; // Use this query parameter\ - \ to filter your results to a specific video in a project that you want\ - \ analytics for. You must use the `videoId:` prefix when specifying a\ - \ video ID.\nconst currentPage = 1; // Choose the number of search results\ - \ to return per page. Minimum value: 1\nconst pageSize = 25; // Results\ - \ per page. Allowed values 1-100, default is 25.\n\nconst videoPlays =\ - \ await client.analytics.getVideosPlays({\n from, dimension, to, filter,\ - \ currentPage, pageSize\n});" - - language: python - code: "import apivideo\nfrom apivideo.api import analytics_api\nfrom apivideo.model.analytics_plays_response\ - \ import AnalyticsPlaysResponse\nfrom apivideo.model.not_found import\ - \ NotFound\nfrom apivideo.model.analytics_plays400_error import AnalyticsPlays400Error\n\ - from pprint import pprint\n\n# Enter a context with an instance of the\ - \ API client\nwith apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:\n\ - \ # Create an instance of the API class\n api_instance = analytics_api.AnalyticsApi(api_client)\n\ - \ _from = dateutil_parser('2023-06-01').date() # date | Use this query\ - \ parameter to set the start date for the time period that you want analytics\ - \ for. - The API returns analytics data including the day you set in `from`.\ - \ - The date you set must be **within the last 30 days**. - The value\ - \ you provide must follow the `YYYY-MM-DD` format. \n dimension = \"\ - browser\" # str | Use this query parameter to define the dimension that\ - \ you want analytics for. - `videoId`: Returns analytics based on the\ - \ public video identifiers. - `emittedAt`: Returns analytics based on\ - \ the times of the play events. The API returns data in specific interval\ - \ groups. When the date period you set in `from` and `to` is less than\ - \ or equals to 2 days, the response for this dimension is grouped in hourly\ - \ intervals. Otherwise, it is grouped in daily intervals. - `country`:\ - \ Returns analytics based on the viewers' country. The list of supported\ - \ country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n to = dateutil_parser('2023-06-10').date()\ - \ # date | Use this optional query parameter to set the end date for the\ - \ time period that you want analytics for. - If you do not specify a `to`\ - \ date, the API returns analytics data starting from the `from` date up\ - \ until today, and excluding today. - The date you set must be **within\ - \ the last 30 days**. - The value you provide must follow the `YYYY-MM-DD`\ - \ format. (optional)\n filter = \"videoId:vi3q7HxhApxRF1c8F8r6VeaI\"\ - \ # str | Use this query parameter to filter your results to a specific\ - \ video in a project that you want analytics for. You must use the `videoId:`\ - \ prefix when specifying a video ID. (optional)\n current_page = 2\ - \ # int | Choose the number of search results to return per page. Minimum\ - \ value: 1 (optional) if omitted the server will use the default value\ - \ of 1\n page_size = 30 # int | Results per page. Allowed values 1-100,\ - \ default is 25. (optional) if omitted the server will use the default\ - \ value of 25\n\n # example passing only required values which don't\ - \ have defaults set\n try:\n # Get play events for video\n \ - \ api_response = api_instance.get_videos_plays(_from, dimension)\n\ - \ pprint(api_response)\n except apivideo.ApiException as e:\n\ - \ print(\"Exception when calling AnalyticsApi->get_videos_plays:\ - \ %s\\n\" % e)\n\n # example passing only required values which don't\ - \ have defaults set\n # and optional values\n try:\n # Get\ - \ play events for video\n api_response = api_instance.get_videos_plays(_from,\ - \ dimension, to=to, filter=filter, current_page=current_page, page_size=page_size)\n\ - \ pprint(api_response)\n except apivideo.ApiException as e:\n\ - \ print(\"Exception when calling AnalyticsApi->get_videos_plays:\ - \ %s\\n\" % e)\n" - - language: java - code: "// Import classes:\nimport video.api.client.ApiVideoClient;\nimport\ - \ video.api.client.api.ApiException;\nimport video.api.client.api.models.*;\n\ - import video.api.client.api.clients.AnalyticsApi;\nimport java.util.*;\n\ - \npublic class Example {\n public static void main(String[] args) {\n\ - \ ApiVideoClient client = new ApiVideoClient(\"YOUR_API_KEY\");\n \ - \ // if you rather like to use the sandbox environment:\n // ApiVideoClient\ - \ client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\", Environment.SANDBOX);\n\ - \n AnalyticsApi apiInstance = client.analytics();\n\n LocalDate\ - \ from = LocalDate.parse(\"2023-06-01\"); // Use this query parameter\ - \ to set the start date for the time period that you want analytics for.\ - \ - The API returns analytics data including the day you set in `from`.\ - \ - The date you set must be **within the last 30 days**. - The value\ - \ you provide must follow the `YYYY-MM-DD` format. \n String dimension\ - \ = \"videoId\"; // Use this query parameter to define the dimension that\ - \ you want analytics for. - `videoId`: Returns analytics based on the\ - \ public video identifiers. - `emittedAt`: Returns analytics based on\ - \ the times of the play events. The API returns data in specific interval\ - \ groups. When the date period you set in `from` and `to` is less than\ - \ or equals to 2 days, the response for this dimension is grouped in hourly\ - \ intervals. Otherwise, it is grouped in daily intervals. - `country`:\ - \ Returns analytics based on the viewers' country. The list of supported\ - \ country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n LocalDate to = LocalDate.parse(\"2023-06-10\"\ - ); // Use this optional query parameter to set the end date for the time\ - \ period that you want analytics for. - If you do not specify a `to` date,\ - \ the API returns analytics data starting from the `from` date up until\ - \ today, and excluding today. - The date you set must be **within the\ - \ last 30 days**. - The value you provide must follow the `YYYY-MM-DD`\ - \ format. \n String filter = \"videoId:vi3q7HxhApxRF1c8F8r6VeaI\";\ - \ // Use this query parameter to filter your results to a specific video\ - \ in a project that you want analytics for. You must use the `videoId:`\ - \ prefix when specifying a video ID.\n Integer currentPage = 1; //\ - \ Choose the number of search results to return per page. Minimum value:\ - \ 1\n Integer pageSize = 25; // Results per page. Allowed values 1-100,\ - \ default is 25.\n\n try {\n Page result = apiInstance.getVideosPlays(from,\ - \ dimension)\n .to(to)\n .filter(filter)\n \ - \ .currentPage(currentPage)\n .pageSize(pageSize)\n \ - \ .execute();\n System.out.println(result);\n } catch\ - \ (ApiException e) {\n System.err.println(\"Exception when calling\ - \ AnalyticsApi#getVideosPlays\");\n System.err.println(\"Status code:\ - \ \" + e.getCode());\n System.err.println(\"Reason: \" + e.getMessage());\n\ - \ System.err.println(\"Response headers: \" + e.getResponseHeaders());\n\ - \ e.printStackTrace();\n }\n }\n}\n" - - language: csharp - code: "using System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ - {\n public class getVideosPlaysExample\n {\n public static\ - \ void Main()\n {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ - \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ - \ = new ApiVideoClient(apiKey,basePath);\n\n var from = 2023-06-01;\ - \ // DateTime | Use this query parameter to set the start date for the\ - \ time period that you want analytics for. - The API returns analytics\ - \ data including the day you set in `from`. - The date you set must be\ - \ **within the last 30 days**. - The value you provide must follow the\ - \ `YYYY-MM-DD` format. \n var dimension = browser; // string\ - \ | Use this query parameter to define the dimension that you want analytics\ - \ for. - `videoId`: Returns analytics based on the public video identifiers.\ - \ - `emittedAt`: Returns analytics based on the times of the play events.\ - \ The API returns data in specific interval groups. When the date period\ - \ you set in `from` and `to` is less than or equals to 2 days, the response\ - \ for this dimension is grouped in hourly intervals. Otherwise, it is\ - \ grouped in daily intervals. - `country`: Returns analytics based on\ - \ the viewers' country. The list of supported country names are based\ - \ on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n var to = 2023-06-10; // DateTime?\ - \ | Use this optional query parameter to set the end date for the time\ - \ period that you want analytics for. - If you do not specify a `to` date,\ - \ the API returns analytics data starting from the `from` date up until\ - \ today, and excluding today. - The date you set must be **within the\ - \ last 30 days**. - The value you provide must follow the `YYYY-MM-DD`\ - \ format. (optional) \n var filter = videoId:vi3q7HxhApxRF1c8F8r6VeaI;\ - \ // string | Use this query parameter to filter your results to a specific\ - \ video in a project that you want analytics for. You must use the `videoId:`\ - \ prefix when specifying a video ID. (optional) \n var currentPage\ - \ = 2; // int? | Choose the number of search results to return per page.\ - \ Minimum value: 1 (optional) (default to 1)\n var pageSize\ - \ = 30; // int? | Results per page. Allowed values 1-100, default is\ - \ 25. (optional) (default to 25)\n var apiAnalyticsInstance\ - \ = apiInstance.Analytics();\n try\n {\n \ - \ // Get play events for video\n AnalyticsPlaysResponse\ - \ result = apiAnalyticsInstance.getVideosPlays(from, dimension, to, filter,\ - \ currentPage, pageSize);\n Debug.WriteLine(result);\n\ - \ }\n catch (ApiException e)\n {\n \ - \ Debug.Print(\"Exception when calling AnalyticsApi.getVideosPlays:\ - \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ - \ Debug.Print(e.StackTrace);\n }\n }\n\ - \ }\n}\n" - - language: php - code: "analytics()->getVideosPlays($from,\ - \ $dimension, array(\n 'to' => new \\DateTime('2023-06-10'), // Use\ - \ this optional query parameter to set the end date for the time period\ - \ that you want analytics for. - If you do not specify a `to` date, the\ - \ API returns analytics data starting from the `from` date up until today,\ - \ and excluding today. - The date you set must be **within the last 30\ - \ days**. - The value you provide must follow the `YYYY-MM-DD` format.\ - \ \n 'filter' => \"videoId:vi3q7HxhApxRF1c8F8r6VeaI\", // Use this\ - \ query parameter to filter your results to a specific video in a project\ - \ that you want analytics for. You must use the `videoId:` prefix when\ - \ specifying a video ID.\n 'currentPage' => 2, // Choose the number\ - \ of search results to return per page. Minimum ->setvalue(1)\n 'pageSize'\ - \ => 30 // Results per page. Allowed values 1-100, default is 25.\n)); " - - language: swift - code: "// The following code samples are still beta. For any issue, please\ - \ report via http://github.com/OpenAPITools/openapi-generator/issues/new\n\ - import ApiVideoClient\n\nlet from = Date() // Date | Use this query parameter\ - \ to set the start date for the time period that you want analytics for.\ - \ - The API returns analytics data including the day you set in `from`.\ - \ - The date you set must be **within the last 30 days**. - The value\ - \ you provide must follow the `YYYY-MM-DD` format. \nlet dimension = \"\ - dimension_example\" // String | Use this query parameter to define the\ - \ dimension that you want analytics for. - `videoId`: Returns analytics\ - \ based on the public video identifiers. - `emittedAt`: Returns analytics\ - \ based on the times of the play events. The API returns data in specific\ - \ interval groups. When the date period you set in `from` and `to` is\ - \ less than or equals to 2 days, the response for this dimension is grouped\ - \ in hourly intervals. Otherwise, it is grouped in daily intervals. -\ - \ `country`: Returns analytics based on the viewers' country. The list\ - \ of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\nlet to = Date() // Date | Use this optional\ - \ query parameter to set the end date for the time period that you want\ - \ analytics for. - If you do not specify a `to` date, the API returns\ - \ analytics data starting from the `from` date up until today, and excluding\ - \ today. - The date you set must be **within the last 30 days**. - The\ - \ value you provide must follow the `YYYY-MM-DD` format. (optional)\n\ - let filter = \"filter_example\" // String | Use this query parameter to\ - \ filter your results to a specific video in a project that you want analytics\ - \ for. You must use the `videoId:` prefix when specifying a video ID.\ - \ (optional)\nlet currentPage = 987 // Int | Choose the number of search\ - \ results to return per page. Minimum value: 1 (optional) (default to\ - \ 1)\nlet pageSize = 987 // Int | Results per page. Allowed values 1-100,\ - \ default is 25. (optional) (default to 25)\n\n// Get play events for\ - \ video\nAnalyticsAPI.getVideosPlays(from: from, dimension: dimension,\ - \ to: to, filter: filter, currentPage: currentPage, pageSize: pageSize)\ - \ { (response, error) in\n guard error == nil else {\n print(error)\n\ - \ return\n }\n\n if (response) {\n dump(response)\n\ - \ }\n}\n" + x-doctave: {} x-accepts: application/json - /analytics/live-streams/plays: + /data/timeseries/{metric}: get: - description: Retrieve filtered analytics about the number of plays for your - live streams in a project. - operationId: GET_analytics-live-streams-plays + description: Retrieve countable metrics like the number of plays or impressions, + grouped by the time at which they occurred + operationId: GET_metrics-over-time parameters: - description: | - Use this query parameter to set the start date for the time period that you want analytics for. - - The API returns analytics data including the day you set in `from`. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. - example: 2023-06-01 - explode: true + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. + - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. + - `start` is the number of times playback was started. + - `end` is the number of times playback has ended with the content watch until the end. + - `impression` is the number of times your content has been loaded and was ready for playback. + explode: false + in: path + name: metric + required: true + schema: + enum: + - play + - play-rate + - start + - end + - impression + type: string + style: simple + - description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 30 days ago. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + example: 2024-02-05T00:00:00+01:00 + explode: false in: query name: from - required: true + required: false schema: - format: date + format: date-time type: string style: form - description: | - Use this optional query parameter to set the end date for the time period that you want analytics for. - - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. - example: 2023-06-10 - explode: true + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + example: 2024-02-06T00:00:00+01:00 + explode: false in: query name: to required: false schema: - format: date + format: date-time type: string style: form - - description: |- - Use this query parameter to define the dimension that you want analytics for. - - `liveStreamId`: Returns analytics based on the public live stream identifiers. - - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - example: browser + - description: | + Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. + + - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. + + - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. + example: hour explode: false in: query - name: dimension - required: true + name: interval + required: false schema: enum: - - liveStreamId - - emittedAt - - country - - deviceType - - operatingSystem - - browser + - hour + - day type: string style: form - - description: Use this query parameter to filter your results to a specific - live stream in a project that you want analytics for. You must use the `liveStreamId:` - prefix when specifying a live stream ID. - example: liveStreamId:li3q7HxhApxRF1c8F8r6VeaI - explode: false + - $ref: '#/components/parameters/filterBy_2' + description: "Use this parameter to filter the API's response based on different\ + \ data dimensions. You can serialize filters in your query to receive more\ + \ detailed breakdowns of your analytics.\n\n- If you do not set a value\ + \ for `filterBy`, the API returns the full dataset for your project.\n-\ + \ The API only accepts the `mediaId` and `mediaType` filters when you call\ + \ `/data/metrics/play/total`.\n\nThese are the available breakdown dimensions:\n\ + \n- `mediaId`: Returns analytics based on the unique identifiers of a video\ + \ or a live stream.\n- `mediaType`: Returns analytics based on the type\ + \ of content. Possible values: `video` and `live-stream`. \n- `continent`:\ + \ Returns analytics based on the viewers' continent. The list of supported\ + \ continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ You must use the ISO-3166 alpha2 format, for example `EU`. Possible values\ + \ are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`: Returns\ + \ analytics based on the viewers' country. The list of supported country\ + \ names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ You must use the ISO-3166 alpha2 format, for example `FR`.\n- `deviceType`:\ + \ Returns analytics based on the type of device used by the viewers. Possible\ + \ response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`,\ + \ `unknown`.\n- `operatingSystem`: Returns analytics based on the operating\ + \ system used by the viewers. Response values include `windows`, `mac osx`,\ + \ `android`, `ios`, `linux`.\n- `browser`: Returns analytics based on the\ + \ browser used by the viewers. Response values include `chrome`, `firefox`,\ + \ `edge`, `opera`.\n- `tag`: Returns analytics for videos using this tag.\ + \ This filter only accepts a single value and is case sensitive. Read more\ + \ about tagging your videos [here](https://docs.api.video/vod/tags-metadata).\n" + example: + mediaType: video + continent: EU + country: FR + explode: true in: query - name: filter + name: filterBy required: false schema: - type: string - style: form + properties: + mediaId: + description: Returns analytics based on the unique identifiers of a + video or a live stream. + example: vi4blUQJFrYWbaG44NChkH27 + type: string + mediaType: + enum: + - video + - live-stream + example: video + type: string + continent: + description: Returns analytics based on the viewers' continent. The + list of supported continents names are based on the [GeoNames public + database](https://www.geonames.org/countries/). You must use the ISO-3166 + alpha2 format, for example `EU`. + enum: + - AS + - AF + - NA + - SA + - AN + - EU + - AZ + example: EU + type: string + country: + description: Returns analytics based on the viewers' country. The list + of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `FR`. + example: FR + type: string + deviceType: + description: 'Returns analytics based on the type of device used by + the viewers. Possible response values are: `computer`, `phone`, `tablet`, + `tv`, `console`, `wearable`, `unknown`.' + example: computer + type: string + operatingSystem: + description: Returns analytics based on the operating system used by + the viewers. Response values include `windows`, `mac osx`, `android`, + `ios`, `linux`. + example: windows + type: string + browser: + description: Returns analytics based on the browser used by the viewers. + Response values include `chrome`, `firefox`, `edge`, `opera`. + example: firefox + type: string + tag: + description: Returns analytics for videos using this tag. This filter + only accepts a single value and is case sensitive. Read more about + tagging your videos [here](https://docs.api.video/vod/tags-metadata). + example: Cool videos + type: string + type: object + style: deepObject - description: 'Choose the number of search results to return per page. Minimum value: 1' example: 2 @@ -11896,64 +12146,21 @@ paths: content: application/json: examples: - Dimension is liveStreamId: - description: Breakdown video-plays by liveStreamId for a project. - value: - data: - - value: li3q7HxhApxRF1c8F8r6VeaI - plays: 100 - - value: li3q7HxhApxRF1c8F8r6VeaB - plays: 10 - - value: li3q7HxhApxRF1c8F8r6VeaD - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 2 - pageSize: 2 - pagesTotal: 2 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/live-streams/plays?dimension=liveStreamId¤tPage=1&pageSize=2 - - rel: first - uri: /analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1 - - rel: last - uri: /analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1 - Dimension is country, paginated: - description: Breakdown video-plays by country for a project, with - pagination. - value: - data: - - value: france - plays: 100 - - value: united states - plays: 10 - - value: spain - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 2 - pageSize: 2 - pagesTotal: 2 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2 - - rel: first - uri: /analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2 - - rel: last - uri: /analytics/live-streams/plays?dimension=country¤tPage=2&pageSize=1 - Dimension is emittedAt, filtered for a liveStreamId: - description: Breakdown video-plays by the time of play events, for - a specific live stream. - value: + Impression time from a certain date: + value: + context: + metric: play + interval: hour + timeframe: + from: 2024-05-28T11:08:39+00:00 + to: 2024-05-29T11:08:39+00:00 data: - - value: 2023-06-10T10:00:00.000Z - plays: 100 - - value: 2023-06-10T11:00:00.000Z - plays: 10 - - value: 2023-06-10T12:00:00.000Z - plays: 1 + - emittedAt: 2024-05-29T07:00:00+00:00 + metricValue: 2 + - emittedAt: 2024-05-29T08:00:00+00:00 + metricValue: 1 + - emittedAt: 2024-05-29T09:00:00+00:00 + metricValue: 1 pagination: currentPage: 1 currentPageItems: 3 @@ -11962,13 +12169,13 @@ paths: itemsTotal: 3 links: - rel: self - uri: /analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 + uri: /data/timeseries/play?currentPage=1&pageSize=25 - rel: first - uri: /analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 + uri: /data/timeseries/play?currentPage=1&pageSize=25 - rel: last - uri: /analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 + uri: /data/timeseries/play?currentPage=1&pageSize=25 schema: - $ref: '#/components/schemas/analytics-plays-response' + $ref: '#/components/schemas/analytics-metrics-over-time-response' description: Success headers: X-RateLimit-Limit: @@ -11995,61 +12202,26 @@ paths: content: application/json: examples: - Missing parameter: - description: This error occurs when a required query-parameter is - missing. + Invalid attribute: + description: This error occurs when a parameter you provided does + not exist, or isn't correct for this endpoint, has an invalid + value. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 detail: This value must be of type string. - name: dimension - Invalid parameter: - description: This error occurs when a required query-parameter format - is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): liveStreamId:{liveStreamId}' - name: filter - Dimension not allowed: - description: This error occurs when the dimension you requested - is not allowed for the endpoint. For example, the dimension `videoId` - is not allowed for the `/live-streams` endpoint. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser' - name: dimension - Dimension unknown: - description: This error occurs when the dimension you requested - is unknown. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided + does not exist, isn't correct for this endpoint, or has an invalid + value. value: type: https://docs.api.video/reference/request-invalid-query-parameter title: A query parameter is invalid. status: 400 - detail: 'This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser' - name: dimension - Invalid filter: - description: This error occurs when the format of the filter you - requested is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): liveStreamId:{liveStreamId}' - name: filter - Invalid liveStreamId: - description: This error occurs when the liveStreamId you requested - does not refer to an existing live stream. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: This value must refer to an existing live stream - name: filter + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 schema: $ref: '#/components/schemas/analytics-plays-400-error' description: Bad request error @@ -12074,52 +12246,18 @@ paths: schema: type: integer style: simple - "403": - content: - application/json: - examples: - Analytics is disabled: - value: - type: https://docs.api.video/reference/authorization-disabled-analytics - title: You cannot get analytics from this project. - status: 403 - schema: - $ref: '#/components/schemas/403-error-schema' - description: Forbidden - Disabled Analytics - headers: - X-RateLimit-Limit: - description: The request limit per minute. - explode: false - schema: - type: integer - style: simple - X-RateLimit-Remaining: - description: The number of available requests left for the current time - window. - explode: false - schema: - type: integer - style: simple - X-RateLimit-Retry-After: - description: The number of seconds left until the current rate limit - window resets. - explode: false - schema: - type: integer - style: simple "404": content: application/json: examples: - Endpoint not found: + Unrecognized request URL: value: - type: null - title: null - name: null + type: https://docs.api.video/reference/unrecognized-request-url + title: Unrecognized request URL. status: 404 schema: - $ref: '#/components/schemas/not-found' - description: Not Found + $ref: '#/components/schemas/unrecognized-request-url' + description: Unrecognized request URL headers: X-RateLimit-Limit: description: The request limit per minute. @@ -12145,7 +12283,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -12176,314 +12314,13 @@ paths: style: simple security: - apiKey: [] - summary: Get play events for live stream + summary: Retrieve metrics over time tags: - Analytics - x-client-action: getLiveStreamsPlays + x-client-action: getMetricsOverTime x-group-parameters: true x-client-paginated: true - x-doctave: - code-samples: - - language: go - code: "package main\n\nimport (\n \"context\"\n \"fmt\"\n \"os\"\ - \n \"time\"\n apivideosdk \"github.com/apivideo/api.video-go-client\"\ - \n)\n\nfunc main() {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\"\ - ).Build()\n // if you rather like to use the sandbox environment:\n\ - \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_KEY\"\ - ).Build()\n req := apivideosdk.AnalyticsApiGetLiveStreamsPlaysRequest{}\n\ - \n req.From(time.Now()) // string | Use this query parameter to set\ - \ the start date for the time period that you want analytics for. - The\ - \ API returns analytics data including the day you set in `from`. - The\ - \ date you set must be **within the last 30 days**. - The value you provide\ - \ must follow the `YYYY-MM-DD` format. \n req.Dimension(\"browser\"\ - ) // string | Use this query parameter to define the dimension that you\ - \ want analytics for. - `liveStreamId`: Returns analytics based on the\ - \ public live stream identifiers. - `emittedAt`: Returns analytics based\ - \ on the times of the play events. The API returns data in specific interval\ - \ groups. When the date period you set in `from` and `to` is less than\ - \ or equals to 2 days, the response for this dimension is grouped in hourly\ - \ intervals. Otherwise, it is grouped in daily intervals. - `country`:\ - \ Returns analytics based on the viewers' country. The list of supported\ - \ country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n req.To(time.Now()) // string | Use this\ - \ optional query parameter to set the end date for the time period that\ - \ you want analytics for. - If you do not specify a `to` date, the API\ - \ returns analytics data starting from the `from` date up until today,\ - \ and excluding today. - The date you set must be **within the last 30\ - \ days**. - The value you provide must follow the `YYYY-MM-DD` format.\ - \ \n req.Filter(\"liveStreamId:li3q7HxhApxRF1c8F8r6VeaI\") // string\ - \ | Use this query parameter to filter your results to a specific live\ - \ stream in a project that you want analytics for. You must use the `liveStreamId:`\ - \ prefix when specifying a live stream ID.\n req.CurrentPage(int32(2))\ - \ // int32 | Choose the number of search results to return per page. Minimum\ - \ value: 1 (default to 1)\n req.PageSize(int32(30)) // int32 | Results\ - \ per page. Allowed values 1-100, default is 25. (default to 25)\n\n \ - \ res, err := client.Analytics.GetLiveStreamsPlays(req)\n\n\n if\ - \ err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling `Analytics.GetLiveStreamsPlays``:\ - \ %v\\n\", err)\n }\n // response from `GetLiveStreamsPlays`: AnalyticsPlaysResponse\n\ - \ fmt.Fprintf(os.Stdout, \"Response from `Analytics.GetLiveStreamsPlays`:\ - \ %v\\n\", res)\n}\n" - - language: node - code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ - \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/AnalyticsApi.md#getLiveStreamsPlays\n\ - \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ - const from = \"2023-06-01\"; // Use this query parameter to set the start\ - \ date for the time period that you want analytics for. - The API returns\ - \ analytics data including the day you set in `from`. - The date you set\ - \ must be **within the last 30 days**. - The value you provide must follow\ - \ the `YYYY-MM-DD` format. \nconst dimension = \"liveStreamId\"; // Use\ - \ this query parameter to define the dimension that you want analytics\ - \ for. - `liveStreamId`: Returns analytics based on the public live stream\ - \ identifiers. - `emittedAt`: Returns analytics based on the times of\ - \ the play events. The API returns data in specific interval groups. When\ - \ the date period you set in `from` and `to` is less than or equals to\ - \ 2 days, the response for this dimension is grouped in hourly intervals.\ - \ Otherwise, it is grouped in daily intervals. - `country`: Returns analytics\ - \ based on the viewers' country. The list of supported country names are\ - \ based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\nconst to = \"2023-06-10\"; // Use this optional\ - \ query parameter to set the end date for the time period that you want\ - \ analytics for. - If you do not specify a `to` date, the API returns\ - \ analytics data starting from the `from` date up until today, and excluding\ - \ today. - The date you set must be **within the last 30 days**. - The\ - \ value you provide must follow the `YYYY-MM-DD` format. \nconst filter\ - \ = \"liveStreamId:li3q7HxhApxRF1c8F8r6VeaI\"; // Use this query parameter\ - \ to filter your results to a specific live stream in a project that you\ - \ want analytics for. You must use the `liveStreamId:` prefix when specifying\ - \ a live stream ID.\nconst currentPage = 1; // Choose the number of search\ - \ results to return per page. Minimum value: 1\nconst pageSize = 25; //\ - \ Results per page. Allowed values 1-100, default is 25.\n\nconst liveStreamsPlays\ - \ = await client.analytics.getLiveStreamsPlays({\n from, dimension, to,\ - \ filter, currentPage, pageSize\n});" - - language: python - code: "import apivideo\nfrom apivideo.api import analytics_api\nfrom apivideo.model.analytics_plays_response\ - \ import AnalyticsPlaysResponse\nfrom apivideo.model.not_found import\ - \ NotFound\nfrom apivideo.model.analytics_plays400_error import AnalyticsPlays400Error\n\ - from pprint import pprint\n\n# Enter a context with an instance of the\ - \ API client\nwith apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:\n\ - \ # Create an instance of the API class\n api_instance = analytics_api.AnalyticsApi(api_client)\n\ - \ _from = dateutil_parser('2023-06-01').date() # date | Use this query\ - \ parameter to set the start date for the time period that you want analytics\ - \ for. - The API returns analytics data including the day you set in `from`.\ - \ - The date you set must be **within the last 30 days**. - The value\ - \ you provide must follow the `YYYY-MM-DD` format. \n dimension = \"\ - browser\" # str | Use this query parameter to define the dimension that\ - \ you want analytics for. - `liveStreamId`: Returns analytics based on\ - \ the public live stream identifiers. - `emittedAt`: Returns analytics\ - \ based on the times of the play events. The API returns data in specific\ - \ interval groups. When the date period you set in `from` and `to` is\ - \ less than or equals to 2 days, the response for this dimension is grouped\ - \ in hourly intervals. Otherwise, it is grouped in daily intervals. -\ - \ `country`: Returns analytics based on the viewers' country. The list\ - \ of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n to = dateutil_parser('2023-06-10').date()\ - \ # date | Use this optional query parameter to set the end date for the\ - \ time period that you want analytics for. - If you do not specify a `to`\ - \ date, the API returns analytics data starting from the `from` date up\ - \ until today, and excluding today. - The date you set must be **within\ - \ the last 30 days**. - The value you provide must follow the `YYYY-MM-DD`\ - \ format. (optional)\n filter = \"liveStreamId:li3q7HxhApxRF1c8F8r6VeaI\"\ - \ # str | Use this query parameter to filter your results to a specific\ - \ live stream in a project that you want analytics for. You must use the\ - \ `liveStreamId:` prefix when specifying a live stream ID. (optional)\n\ - \ current_page = 2 # int | Choose the number of search results to return\ - \ per page. Minimum value: 1 (optional) if omitted the server will use\ - \ the default value of 1\n page_size = 30 # int | Results per page.\ - \ Allowed values 1-100, default is 25. (optional) if omitted the server\ - \ will use the default value of 25\n\n # example passing only required\ - \ values which don't have defaults set\n try:\n # Get play events\ - \ for live stream\n api_response = api_instance.get_live_streams_plays(_from,\ - \ dimension)\n pprint(api_response)\n except apivideo.ApiException\ - \ as e:\n print(\"Exception when calling AnalyticsApi->get_live_streams_plays:\ - \ %s\\n\" % e)\n\n # example passing only required values which don't\ - \ have defaults set\n # and optional values\n try:\n # Get\ - \ play events for live stream\n api_response = api_instance.get_live_streams_plays(_from,\ - \ dimension, to=to, filter=filter, current_page=current_page, page_size=page_size)\n\ - \ pprint(api_response)\n except apivideo.ApiException as e:\n\ - \ print(\"Exception when calling AnalyticsApi->get_live_streams_plays:\ - \ %s\\n\" % e)\n" - - language: java - code: "// Import classes:\nimport video.api.client.ApiVideoClient;\nimport\ - \ video.api.client.api.ApiException;\nimport video.api.client.api.models.*;\n\ - import video.api.client.api.clients.AnalyticsApi;\nimport java.util.*;\n\ - \npublic class Example {\n public static void main(String[] args) {\n\ - \ ApiVideoClient client = new ApiVideoClient(\"YOUR_API_KEY\");\n \ - \ // if you rather like to use the sandbox environment:\n // ApiVideoClient\ - \ client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\", Environment.SANDBOX);\n\ - \n AnalyticsApi apiInstance = client.analytics();\n\n LocalDate\ - \ from = LocalDate.parse(\"2023-06-01\"); // Use this query parameter\ - \ to set the start date for the time period that you want analytics for.\ - \ - The API returns analytics data including the day you set in `from`.\ - \ - The date you set must be **within the last 30 days**. - The value\ - \ you provide must follow the `YYYY-MM-DD` format. \n String dimension\ - \ = \"liveStreamId\"; // Use this query parameter to define the dimension\ - \ that you want analytics for. - `liveStreamId`: Returns analytics based\ - \ on the public live stream identifiers. - `emittedAt`: Returns analytics\ - \ based on the times of the play events. The API returns data in specific\ - \ interval groups. When the date period you set in `from` and `to` is\ - \ less than or equals to 2 days, the response for this dimension is grouped\ - \ in hourly intervals. Otherwise, it is grouped in daily intervals. -\ - \ `country`: Returns analytics based on the viewers' country. The list\ - \ of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n LocalDate to = LocalDate.parse(\"2023-06-10\"\ - ); // Use this optional query parameter to set the end date for the time\ - \ period that you want analytics for. - If you do not specify a `to` date,\ - \ the API returns analytics data starting from the `from` date up until\ - \ today, and excluding today. - The date you set must be **within the\ - \ last 30 days**. - The value you provide must follow the `YYYY-MM-DD`\ - \ format. \n String filter = \"liveStreamId:li3q7HxhApxRF1c8F8r6VeaI\"\ - ; // Use this query parameter to filter your results to a specific live\ - \ stream in a project that you want analytics for. You must use the `liveStreamId:`\ - \ prefix when specifying a live stream ID.\n Integer currentPage =\ - \ 1; // Choose the number of search results to return per page. Minimum\ - \ value: 1\n Integer pageSize = 25; // Results per page. Allowed values\ - \ 1-100, default is 25.\n\n try {\n Page result\ - \ = apiInstance.getLiveStreamsPlays(from, dimension)\n .to(to)\n\ - \ .filter(filter)\n .currentPage(currentPage)\n\ - \ .pageSize(pageSize)\n .execute();\n System.out.println(result);\n\ - \ } catch (ApiException e) {\n System.err.println(\"Exception\ - \ when calling AnalyticsApi#getLiveStreamsPlays\");\n System.err.println(\"\ - Status code: \" + e.getCode());\n System.err.println(\"Reason: \"\ - \ + e.getMessage());\n System.err.println(\"Response headers: \"\ - \ + e.getResponseHeaders());\n e.printStackTrace();\n }\n }\n\ - }\n" - - language: csharp - code: "using System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ - {\n public class getLiveStreamsPlaysExample\n {\n public\ - \ static void Main()\n {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ - \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ - \ = new ApiVideoClient(apiKey,basePath);\n\n var from = 2023-06-01;\ - \ // DateTime | Use this query parameter to set the start date for the\ - \ time period that you want analytics for. - The API returns analytics\ - \ data including the day you set in `from`. - The date you set must be\ - \ **within the last 30 days**. - The value you provide must follow the\ - \ `YYYY-MM-DD` format. \n var dimension = browser; // string\ - \ | Use this query parameter to define the dimension that you want analytics\ - \ for. - `liveStreamId`: Returns analytics based on the public live stream\ - \ identifiers. - `emittedAt`: Returns analytics based on the times of\ - \ the play events. The API returns data in specific interval groups. When\ - \ the date period you set in `from` and `to` is less than or equals to\ - \ 2 days, the response for this dimension is grouped in hourly intervals.\ - \ Otherwise, it is grouped in daily intervals. - `country`: Returns analytics\ - \ based on the viewers' country. The list of supported country names are\ - \ based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\n var to = 2023-06-10; // DateTime?\ - \ | Use this optional query parameter to set the end date for the time\ - \ period that you want analytics for. - If you do not specify a `to` date,\ - \ the API returns analytics data starting from the `from` date up until\ - \ today, and excluding today. - The date you set must be **within the\ - \ last 30 days**. - The value you provide must follow the `YYYY-MM-DD`\ - \ format. (optional) \n var filter = liveStreamId:li3q7HxhApxRF1c8F8r6VeaI;\ - \ // string | Use this query parameter to filter your results to a specific\ - \ live stream in a project that you want analytics for. You must use the\ - \ `liveStreamId:` prefix when specifying a live stream ID. (optional)\ - \ \n var currentPage = 2; // int? | Choose the number of search\ - \ results to return per page. Minimum value: 1 (optional) (default to\ - \ 1)\n var pageSize = 30; // int? | Results per page. Allowed\ - \ values 1-100, default is 25. (optional) (default to 25)\n \ - \ var apiAnalyticsInstance = apiInstance.Analytics();\n try\n\ - \ {\n // Get play events for live stream\n \ - \ AnalyticsPlaysResponse result = apiAnalyticsInstance.getLiveStreamsPlays(from,\ - \ dimension, to, filter, currentPage, pageSize);\n Debug.WriteLine(result);\n\ - \ }\n catch (ApiException e)\n {\n \ - \ Debug.Print(\"Exception when calling AnalyticsApi.getLiveStreamsPlays:\ - \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ - \ Debug.Print(e.StackTrace);\n }\n }\n\ - \ }\n}\n" - - language: php - code: "analytics()->getLiveStreamsPlays($from,\ - \ $dimension, array(\n 'to' => new \\DateTime('2023-06-10'), // Use\ - \ this optional query parameter to set the end date for the time period\ - \ that you want analytics for. - If you do not specify a `to` date, the\ - \ API returns analytics data starting from the `from` date up until today,\ - \ and excluding today. - The date you set must be **within the last 30\ - \ days**. - The value you provide must follow the `YYYY-MM-DD` format.\ - \ \n 'filter' => \"liveStreamId:li3q7HxhApxRF1c8F8r6VeaI\", // Use\ - \ this query parameter to filter your results to a specific live stream\ - \ in a project that you want analytics for. You must use the `liveStreamId:`\ - \ prefix when specifying a live stream ID.\n 'currentPage' => 2, //\ - \ Choose the number of search results to return per page. Minimum value:\ - \ 1\n 'pageSize' => 30 // Results per page. Allowed values 1-100, default\ - \ is 25.\n));" - - language: swift - code: "// The following code samples are still beta. For any issue, please\ - \ report via http://github.com/OpenAPITools/openapi-generator/issues/new\n\ - import ApiVideoClient\n\nlet from = Date() // Date | Use this query parameter\ - \ to set the start date for the time period that you want analytics for.\ - \ - The API returns analytics data including the day you set in `from`.\ - \ - The date you set must be **within the last 30 days**. - The value\ - \ you provide must follow the `YYYY-MM-DD` format. \nlet dimension = \"\ - dimension_example\" // String | Use this query parameter to define the\ - \ dimension that you want analytics for. - `liveStreamId`: Returns analytics\ - \ based on the public live stream identifiers. - `emittedAt`: Returns\ - \ analytics based on the times of the play events. The API returns data\ - \ in specific interval groups. When the date period you set in `from`\ - \ and `to` is less than or equals to 2 days, the response for this dimension\ - \ is grouped in hourly intervals. Otherwise, it is grouped in daily intervals.\ - \ - `country`: Returns analytics based on the viewers' country. The list\ - \ of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ - \ - `deviceType`: Returns analytics based on the type of device used by\ - \ the viewers during the play event. - `operatingSystem`: Returns analytics\ - \ based on the operating system used by the viewers during the play event.\ - \ - `browser`: Returns analytics based on the browser used by the viewers\ - \ during the play event.\nlet to = Date() // Date | Use this optional\ - \ query parameter to set the end date for the time period that you want\ - \ analytics for. - If you do not specify a `to` date, the API returns\ - \ analytics data starting from the `from` date up until today, and excluding\ - \ today. - The date you set must be **within the last 30 days**. - The\ - \ value you provide must follow the `YYYY-MM-DD` format. (optional)\n\ - let filter = \"filter_example\" // String | Use this query parameter to\ - \ filter your results to a specific live stream in a project that you\ - \ want analytics for. You must use the `liveStreamId:` prefix when specifying\ - \ a live stream ID. (optional)\nlet currentPage = 987 // Int | Choose\ - \ the number of search results to return per page. Minimum value: 1 (optional)\ - \ (default to 1)\nlet pageSize = 987 // Int | Results per page. Allowed\ - \ values 1-100, default is 25. (optional) (default to 25)\n\n// Get play\ - \ events for live stream\nAnalyticsAPI.getLiveStreamsPlays(from: from,\ - \ dimension: dimension, to: to, filter: filter, currentPage: currentPage,\ - \ pageSize: pageSize) { (response, error) in\n guard error == nil else\ - \ {\n print(error)\n return\n }\n\n if (response)\ - \ {\n dump(response)\n }\n}\n" + x-doctave: {} x-accepts: application/json /webhooks: get: @@ -12579,7 +12416,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -12797,18 +12634,18 @@ paths: examples: response: value: - type: https://docs.api.video/docs/attributerequired + type: https://docs.api.video/reference/attribute-required events: This attribute is required. name: events status: 400 problems: - - type: https://docs.api.video/docs/attributerequired + - type: https://docs.api.video/reference/attribute-required title: This attribute is required. name: events - - type: https://docs.api.video/docs/attributerequired + - type: https://docs.api.video/reference/attribute-required title: This attribute is required. name: url - - type: https://docs.api.video/docs/attributeinvalid + - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be an array. name: events schema: @@ -12839,7 +12676,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -13040,7 +12877,7 @@ paths: examples: response: value: - type: https://docs.api.video/docs/resourcenot_found + type: https://docs.api.video/reference/resource-not-found title: The requested resource was not found. name: webhookId status: 404 @@ -13072,7 +12909,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -13266,7 +13103,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -13436,6 +13273,99 @@ components: hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 thumbnail: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg parameters: + filterBy: + $ref: '#/components/parameters/filterBy_2' + description: "Use this parameter to filter the API's response based on different\ + \ data dimensions. You can serialize filters in your query to receive more\ + \ detailed breakdowns of your analytics.\n\n- If you do not set a value for\ + \ `filterBy`, the API returns the full dataset for your project.\n- The API\ + \ only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`.\n\ + \nThese are the available breakdown dimensions:\n\n- `mediaId`: Returns analytics\ + \ based on the unique identifiers of a video or a live stream.\n- `mediaType`:\ + \ Returns analytics based on the type of content. Possible values: `video`\ + \ and `live-stream`. \n- `continent`: Returns analytics based on the viewers'\ + \ continent. The list of supported continents names are based on the [GeoNames\ + \ public database](https://www.geonames.org/countries/). You must use the\ + \ ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`,\ + \ `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`: Returns analytics based on\ + \ the viewers' country. The list of supported country names are based on the\ + \ [GeoNames public database](https://www.geonames.org/countries/). You must\ + \ use the ISO-3166 alpha2 format, for example `FR`.\n- `deviceType`: Returns\ + \ analytics based on the type of device used by the viewers. Possible response\ + \ values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`,\ + \ `unknown`.\n- `operatingSystem`: Returns analytics based on the operating\ + \ system used by the viewers. Response values include `windows`, `mac osx`,\ + \ `android`, `ios`, `linux`.\n- `browser`: Returns analytics based on the\ + \ browser used by the viewers. Response values include `chrome`, `firefox`,\ + \ `edge`, `opera`.\n- `tag`: Returns analytics for videos using this tag.\ + \ This filter only accepts a single value and is case sensitive. Read more\ + \ about tagging your videos [here](https://docs.api.video/vod/tags-metadata).\n" + example: + mediaType: video + continent: EU + country: FR + explode: true + in: query + name: filterBy + required: false + schema: + properties: + mediaId: + description: Returns analytics based on the unique identifiers of a video + or a live stream. + example: vi4blUQJFrYWbaG44NChkH27 + type: string + mediaType: + enum: + - video + - live-stream + example: video + type: string + continent: + description: Returns analytics based on the viewers' continent. The list + of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `EU`. + enum: + - AS + - AF + - NA + - SA + - AN + - EU + - AZ + example: EU + type: string + country: + description: Returns analytics based on the viewers' country. The list + of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `FR`. + example: FR + type: string + deviceType: + description: 'Returns analytics based on the type of device used by the + viewers. Possible response values are: `computer`, `phone`, `tablet`, + `tv`, `console`, `wearable`, `unknown`.' + example: computer + type: string + operatingSystem: + description: Returns analytics based on the operating system used by the + viewers. Response values include `windows`, `mac osx`, `android`, `ios`, + `linux`. + example: windows + type: string + browser: + description: Returns analytics based on the browser used by the viewers. + Response values include `chrome`, `firefox`, `edge`, `opera`. + example: firefox + type: string + tag: + description: Returns analytics for videos using this tag. This filter + only accepts a single value and is case sensitive. Read more about tagging + your videos [here](https://docs.api.video/vod/tags-metadata). + example: Cool videos + type: string + type: object + style: deepObject current-page: description: 'Choose the number of search results to return per page. Minimum value: 1' @@ -14061,48 +13991,7 @@ components: have subtitles, false for no you will not have subtitles. example: false type: boolean - title: Caption - type: object - video-session: - example: - session: - sessionId: psEmFwGQUAXR2lFHj5nDOpy - loadedAt: 2019-06-24T11:45:01.109Z - endedAt: 2019-06-24T11:49:19.243Z - location: - country: France - city: Paris - referrer: - url: https://api.video - medium: organic - source: https://google.com - searchTerm: video encoding hosting and delivery - device: - type: desktop - vendor: Dell - model: unknown - os: - name: Microsoft Windows - shortname: W10 - version: Windows10 - client: - type: browser - name: Firefox - version: "67.0" - properties: - session: - $ref: '#/components/schemas/video-session-session' - location: - $ref: '#/components/schemas/video-session-location' - referrer: - $ref: '#/components/schemas/video-session-referrer' - device: - $ref: '#/components/schemas/video-session-device' - os: - $ref: '#/components/schemas/video-session-os' - client: - $ref: '#/components/schemas/video-session-client' - title: VideoSession + title: Caption type: object live-stream: example: @@ -14118,10 +14007,10 @@ components: restreams: - streamKey: dw-dew8-q6w9-k67w-1ws8 serverUrl: rtmp://my.broadcast.example.com/app - name: My RTMP server + name: My restream server - streamKey: dw-dew8-q6w9-k67w-1ws8 serverUrl: rtmp://my.broadcast.example.com/app - name: My RTMP server + name: My restream server liveStreamId: li400mYKSgQ6xs7taUeSaEKr name: My Live Stream playerId: pl45d5vFFGrfdsdsd156dGhh @@ -14144,7 +14033,7 @@ components: public: description: Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. - Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). example: true type: boolean assets: @@ -14160,7 +14049,7 @@ components: example: true type: boolean restreams: - description: Returns the list of RTMP restream destinations. + description: Returns the list of restream destinations. items: $ref: '#/components/schemas/restreams-response-object' type: array @@ -14179,22 +14068,6 @@ components: - restreams title: LiveStream type: object - live-stream-session: - properties: - session: - $ref: '#/components/schemas/live-stream-session-session' - location: - $ref: '#/components/schemas/live-stream-session-location' - referrer: - $ref: '#/components/schemas/live-stream-session-referrer' - device: - $ref: '#/components/schemas/live-stream-session-device' - os: - $ref: '#/components/schemas/video-session-os' - client: - $ref: '#/components/schemas/live-stream-session-client' - title: LiveStreamSession - type: object player-session-event: properties: type: @@ -14539,7 +14412,7 @@ components: public: default: true description: 'Default: True. If set to `false` the video will become private. - More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management)' + More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management)' example: true type: boolean panoramic: @@ -14789,10 +14662,10 @@ components: restreams: - streamKey: dw-dew8-q6w9-k67w-1ws8 serverUrl: rtmp://my.broadcast.example.com/app - name: My RTMP server + name: My restream server - streamKey: dw-dew8-q6w9-k67w-1ws8 serverUrl: rtmp://my.broadcast.example.com/app - name: My RTMP server + name: My restream server liveStreamId: li400mYKSgQ6xs7taUeSaEKr name: My Live Stream playerId: pl45d5vFFGrfdsdsd156dGhh @@ -14810,10 +14683,10 @@ components: restreams: - streamKey: dw-dew8-q6w9-k67w-1ws8 serverUrl: rtmp://my.broadcast.example.com/app - name: My RTMP server + name: My restream server - streamKey: dw-dew8-q6w9-k67w-1ws8 serverUrl: rtmp://my.broadcast.example.com/app - name: My RTMP server + name: My restream server liveStreamId: li400mYKSgQ6xs7taUeSaEKr name: My Live Stream playerId: pl45d5vFFGrfdsdsd156dGhh @@ -14850,16 +14723,16 @@ components: public: description: Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. - Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). type: boolean playerId: description: The unique identifier for the player. example: pl4f4ferf5erfr5zed4fsdd type: string restreams: - description: Use this parameter to add, edit, or remove RTMP services where - you want to restream a live stream. The list can only contain up to 5 - destinations. + description: Use this parameter to add, edit, or remove `RTMPS` or `RTMP` + services where you want to restream a live stream. The list can only contain + up to 5 destinations. items: $ref: '#/components/schemas/restreams-request-object' maxItems: 5 @@ -14877,7 +14750,7 @@ components: public: description: Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. - Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). type: boolean playerId: description: The unique ID for the player associated with a live stream @@ -14885,11 +14758,11 @@ components: example: pl45KFKdlddgk654dspkze type: string restreams: - description: Use this parameter to add, edit, or remove RTMP services where - you want to restream a live stream. The list can only contain up to 5 - destinations. This operation updates all restream destinations in the - same request. If you do not want to modify an existing restream destination, - you need to include it in your request, otherwise it is removed. + description: Use this parameter to add, edit, or remove `RTMPS` or `RTMP` + services where you want to restream a live stream. The list can only contain + up to 5 destinations. This operation updates all restream destinations + in the same request. If you do not want to modify an existing restream + destination, you need to include it in your request, otherwise it is removed. items: $ref: '#/components/schemas/restreams-request-object' maxItems: 5 @@ -14902,10 +14775,11 @@ components: properties: name: description: Use this parameter to define a name for the restream destination. - example: My RTMP server + example: My restream server type: string serverUrl: - description: Use this parameter to set the RTMP URL of the restream destination. + description: Use this parameter to set the `RTMPS` or `RTMP` server URL + of the restream destination. example: rtmp://my.broadcast.example.com/app type: string streamKey: @@ -14923,14 +14797,14 @@ components: example: streamKey: dw-dew8-q6w9-k67w-1ws8 serverUrl: rtmp://my.broadcast.example.com/app - name: My RTMP server + name: My restream server properties: name: description: Returns the name of a restream destination. - example: My RTMP server + example: My restream server type: string serverUrl: - description: Returns the RTMP URL of a restream destination. + description: Returns the server URL of a restream destination. example: rtmp://my.broadcast.example.com/app type: string streamKey: @@ -15157,31 +15031,6 @@ components: title: PlayerThemeUploadLogoPayload type: object analytics-plays-response: - example: - pagination: - itemsTotal: 123 - pagesTotal: 7 - pageSize: 20 - currentPage: 3 - currentPageItems: 20 - links: - first: - rel: first - uri: /videos/search?currentPage=1&pageSize=20 - previous: - rel: previous - uri: /videos/search?currentPage=2&pageSize=20 - next: - rel: next - uri: /videos/search?currentPage=4&pageSize=20 - last: - rel: last - uri: /videos/search?currentPage=6&pageSize=20 - data: - - plays: 100 - value: vi3q7HxhApxRF1c8F8r6VeaI - - plays: 100 - value: vi3q7HxhApxRF1c8F8r6VeaI properties: data: items: @@ -15195,9 +15044,6 @@ components: title: Play event analytics response type: object analytics-data: - example: - plays: 100 - value: vi3q7HxhApxRF1c8F8r6VeaI properties: value: description: Shows a value for the property you have specified for `dimension` @@ -15232,6 +15078,137 @@ components: description: The name of the parameter that caused the error. type: string type: object + analytics-aggregated-metrics-response: + example: + data: 356.2 + context: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + aggregation: count + properties: + context: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context' + data: + example: 356.2 + format: float + type: number + required: + - context + - data + - pagination + title: Analytics response for aggregated metrics + type: object + analytics-metrics-breakdown-response: + example: + pagination: + itemsTotal: 123 + pagesTotal: 7 + pageSize: 20 + currentPage: 3 + currentPageItems: 20 + links: + first: + rel: first + uri: /videos/search?currentPage=1&pageSize=20 + previous: + rel: previous + uri: /videos/search?currentPage=2&pageSize=20 + next: + rel: next + uri: /videos/search?currentPage=4&pageSize=20 + last: + rel: last + uri: /videos/search?currentPage=6&pageSize=20 + data: + - dimensionValue: dimensionValue + metricValue: 0.8008282 + - dimensionValue: dimensionValue + metricValue: 0.8008282 + context: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + breakdown: country + properties: + context: + $ref: '#/components/schemas/analytics_metrics_breakdown_response_context' + data: + description: Returns an array of dimensions and their respective metrics. + items: + $ref: '#/components/schemas/analytics_metrics_breakdown_response_data' + type: array + pagination: + $ref: '#/components/schemas/pagination' + required: + - context + - data + - pagination + title: Analytics response for metrics breakdown by dimension + type: object + analytics-metrics-over-time-response: + example: + pagination: + itemsTotal: 123 + pagesTotal: 7 + pageSize: 20 + currentPage: 3 + currentPageItems: 20 + links: + first: + rel: first + uri: /videos/search?currentPage=1&pageSize=20 + previous: + rel: previous + uri: /videos/search?currentPage=2&pageSize=20 + next: + rel: next + uri: /videos/search?currentPage=4&pageSize=20 + last: + rel: last + uri: /videos/search?currentPage=6&pageSize=20 + data: + - emittedAt: emittedAt + metricValue: 0.8008282 + - emittedAt: emittedAt + metricValue: 0.8008282 + context: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + interval: day + properties: + context: + $ref: '#/components/schemas/analytics_metrics_over_time_response_context' + data: + description: Returns an array of metrics and the timestamps . + items: + $ref: '#/components/schemas/analytics_metrics_over_time_response_data' + type: array + pagination: + $ref: '#/components/schemas/pagination' + required: + - context + - data + - pagination + title: Analytics response for metrics over time + type: object + unrecognized-request-url: + properties: + type: + description: A link to the error documentation. + type: string + title: + description: A description of the error that occurred. + type: string + status: + description: The HTTP status code. + type: integer + title: Unrecognized request URL + type: object webhooks-list-response: example: pagination: @@ -15441,124 +15418,6 @@ components: type: string title: VideoAssets type: object - video-session-session: - properties: - sessionId: - description: The unique identifier for the session that you can use to track - what happens during it. - example: psEmFwGQUAXR2lFHj5nDOpy - type: string - loadedAt: - description: When the video session started, presented in ISO-8601 format. - example: 2019-06-24T11:45:01.109Z - format: date-time - type: string - endedAt: - description: When the video session ended, presented in ISO-8601 format. - example: 2019-06-24T12:45:01.109Z - format: date-time - type: string - metadata: - description: A list of key value pairs that you use to provide metadata - for your video. These pairs can be made dynamic, allowing you to segment - your audience. You can also just use the pairs as another way to tag and - categorize your videos. - example: '[{"key": "Author", "value": "John Doe"}]' - items: - $ref: '#/components/schemas/metadata' - type: array - title: VideoSessionSession - type: object - video-session-location: - description: The location of the viewer. - properties: - country: - description: The country of the viewer. - example: France - type: string - city: - description: The city of the viewer. - example: Paris - nullable: true - type: string - title: VideoSessionLocation - type: object - video-session-referrer: - properties: - url: - description: The link the viewer used to reach the video session. - example: https://api.video - nullable: true - type: string - medium: - description: How they arrived at the site, for example organic or paid. - Organic meaning they found it themselves and paid meaning they followed - a link from an advertisement. - example: organic - type: string - source: - description: The source the referrer came from to the video session. For - example if they searched through google to find the stream. - example: https://google.com - type: string - searchTerm: - description: The search term they typed to arrive at the video session. - type: string - title: VideoSessionReferrer - type: object - video-session-device: - description: What type of device the user is on when in the video session. - properties: - type: - description: What the type is like desktop, laptop, mobile. - example: desktop - type: string - vendor: - description: If known, what the brand of the device is, like Apple, Dell, - etc. - example: Dell - type: string - model: - description: The specific model of the device, if known. - example: unknown - type: string - title: VideoSessionDevice - type: object - video-session-os: - description: The operating system the viewer is on. - properties: - name: - description: The name of the operating system. - example: Microsoft Windows - type: string - shortname: - description: The nickname for the operating system, often representing the - version. - example: W10 - type: string - version: - description: The version of the operating system. - example: Windows 10 - type: string - title: VideoSessionOs - type: object - video-session-client: - description: What kind of browser the viewer is using for the video session. - properties: - name: - description: The name of the browser used to view the video session. - example: Firefox - type: string - version: - description: The version of the browser used to view the video session. - example: "67.0" - type: string - type: - description: The type of client used to view the video session. - example: browser - type: string - title: VideoSessionClient - type: object live-stream-assets: example: thumbnail: https://live.api.video/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg @@ -15589,98 +15448,6 @@ components: type: string title: LiveStreamAssets type: object - live-stream-session-session: - properties: - sessionId: - description: A unique identifier for your session. You can use this to track - what happens during a specific session. - type: string - loadedAt: - description: When the session started, with the date and time presented - in ISO-8601 format. - example: 2019-06-24T11:45:01.109Z - format: date-time - type: string - endedAt: - description: When the session ended, with the date and time presented in - ISO-8601 format. - example: 2019-06-24T12:45:01.109Z - format: date-time - type: string - title: LiveStreamSessionSession - type: object - live-stream-session-location: - description: The location of the viewer of the live stream. - properties: - country: - description: The country of the viewer of the live stream. - example: France - type: string - city: - description: The city of the viewer of the live stream. - example: Paris - type: string - title: LiveStreamSessionLocation - type: object - live-stream-session-referrer: - properties: - url: - description: The website the viewer of the live stream was referred to in - order to view the live stream. - example: https://api.video - type: string - medium: - description: The type of search that brought the viewer to the live stream. - Organic would be they found it on their own, paid would be they found - it via an advertisement. - example: organic - type: string - source: - description: Where the viewer came from to see the live stream (usually - where they searched from). - example: https://google.com - type: string - searchTerm: - description: What term they searched for that led them to the live stream. - example: video stream - type: string - title: LiveStreamSessionReferrer - type: object - live-stream-session-device: - description: What type of device the user is on when in the live stream session. - properties: - type: - description: What the type is like desktop, laptop, mobile. - example: desktop - type: string - vendor: - description: If known, what the brand of the device is, like Apple, Dell, - etc. - example: Dell - type: string - model: - description: The specific model of the device, if known. - example: unknown - type: string - title: LiveStreamSessionDevice - type: object - live-stream-session-client: - description: What kind of browser the viewer is using for the live stream session. - properties: - name: - description: The name of the browser used to view the live stream session. - example: Firefox - type: string - version: - description: The version of the browser used to view the live stream session. - example: "67.0" - type: string - type: - description: The type of client used to view the live stream session. - example: browser - type: string - title: LiveStreamSessionClient - type: object video-status-ingest: description: Details about the capturing, transferring, and storing of your video for use immediately or in the future. @@ -15775,6 +15542,177 @@ components: $ref: '#/components/schemas/video-status-encoding-metadata' title: VideoStatusEncoding type: object + filterBy: + properties: + mediaId: + description: Returns analytics based on the unique identifiers of a video + or a live stream. + example: vi4blUQJFrYWbaG44NChkH27 + type: string + mediaType: + enum: + - video + - live-stream + example: video + type: string + continent: + description: Returns analytics based on the viewers' continent. The list + of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `EU`. + enum: + - AS + - AF + - NA + - SA + - AN + - EU + - AZ + example: EU + type: string + country: + description: Returns analytics based on the viewers' country. The list of + supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `FR`. + example: FR + type: string + deviceType: + description: 'Returns analytics based on the type of device used by the + viewers. Possible response values are: `computer`, `phone`, `tablet`, + `tv`, `console`, `wearable`, `unknown`.' + example: computer + type: string + operatingSystem: + description: Returns analytics based on the operating system used by the + viewers. Response values include `windows`, `mac osx`, `android`, `ios`, + `linux`. + example: windows + type: string + browser: + description: Returns analytics based on the browser used by the viewers. + Response values include `chrome`, `firefox`, `edge`, `opera`. + example: firefox + type: string + tag: + description: Returns analytics for videos using this tag. This filter only + accepts a single value and is case sensitive. Read more about tagging + your videos [here](https://docs.api.video/vod/tags-metadata). + example: Cool videos + type: string + type: object + filterBy_1: + properties: + mediaId: + description: Returns analytics based on the unique identifiers of a video + or a live stream. + example: vi4blUQJFrYWbaG44NChkH27 + type: string + mediaType: + enum: + - video + - live-stream + example: video + type: string + continent: + description: Returns analytics based on the viewers' continent. The list + of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `EU`. + enum: + - AS + - AF + - NA + - SA + - AN + - EU + - AZ + example: EU + type: string + country: + description: Returns analytics based on the viewers' country. The list of + supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `FR`. + example: FR + type: string + deviceType: + description: 'Returns analytics based on the type of device used by the + viewers. Possible response values are: `computer`, `phone`, `tablet`, + `tv`, `console`, `wearable`, `unknown`.' + example: computer + type: string + operatingSystem: + description: Returns analytics based on the operating system used by the + viewers. Response values include `windows`, `mac osx`, `android`, `ios`, + `linux`. + example: windows + type: string + browser: + description: Returns analytics based on the browser used by the viewers. + Response values include `chrome`, `firefox`, `edge`, `opera`. + example: firefox + type: string + tag: + description: Returns analytics for videos using this tag. This filter only + accepts a single value and is case sensitive. Read more about tagging + your videos [here](https://docs.api.video/vod/tags-metadata). + example: Cool videos + type: string + type: object + filterBy_2: + properties: + mediaId: + description: Returns analytics based on the unique identifiers of a video + or a live stream. + example: vi4blUQJFrYWbaG44NChkH27 + type: string + mediaType: + enum: + - video + - live-stream + example: video + type: string + continent: + description: Returns analytics based on the viewers' continent. The list + of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `EU`. + enum: + - AS + - AF + - NA + - SA + - AN + - EU + - AZ + example: EU + type: string + country: + description: Returns analytics based on the viewers' country. The list of + supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + You must use the ISO-3166 alpha2 format, for example `FR`. + example: FR + type: string + deviceType: + description: 'Returns analytics based on the type of device used by the + viewers. Possible response values are: `computer`, `phone`, `tablet`, + `tv`, `console`, `wearable`, `unknown`.' + example: computer + type: string + operatingSystem: + description: Returns analytics based on the operating system used by the + viewers. Response values include `windows`, `mac osx`, `android`, `ios`, + `linux`. + example: windows + type: string + browser: + description: Returns analytics based on the browser used by the viewers. + Response values include `chrome`, `firefox`, `edge`, `opera`. + example: firefox + type: string + tag: + description: Returns analytics for videos using this tag. This filter only + accepts a single value and is case sensitive. Read more about tagging + your videos [here](https://docs.api.video/vod/tags-metadata). + example: Cool videos + type: string + type: object player_theme_assets: example: link: path/to/my/logo/mylogo.jpg @@ -15789,6 +15727,150 @@ components: example: path/to/my/logo/mylogo.jpg type: string type: object + analytics_aggregated_metrics_response_context_timeframe: + description: Returns the starting and ending date-times of the period you want + analytics for. + example: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + properties: + from: + description: Returns the starting date-time of the period you want analytics + for in ATOM date-time format. + example: 2024-05-28T11:15:07Z + format: date-time + type: string + to: + description: Returns the starting date-time of the period you want analytics + for in ATOM date-time format. + example: 2024-05-29T11:15:07Z + format: date-time + type: string + type: object + analytics_aggregated_metrics_response_context: + example: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + aggregation: count + properties: + metric: + description: Returns the metric you selected. + enum: + - play + - start + - end + - impression + - impression-time + - watch-time + example: impression + type: string + aggregation: + description: Returns the aggregation you selected. + enum: + - count + - rate + - total + - average + - sum + example: count + type: string + timeframe: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context_timeframe' + type: object + analytics_metrics_breakdown_response_context: + example: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + breakdown: country + properties: + metric: + description: Returns the metric you selected. + enum: + - play + - play-rate + - start + - end + - impression + example: impression + type: string + breakdown: + description: Returns the dimension you selected. + enum: + - media-id + - media-type + - continent + - country + - device-type + - operating-system + - browser + example: country + type: string + timeframe: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context_timeframe' + type: object + analytics_metrics_breakdown_response_data: + example: + dimensionValue: dimensionValue + metricValue: 0.8008282 + properties: + dimensionValue: + description: Returns a specific value for the dimension you selected, based + on the data. For example if you select `continent` as a dimension, then + `dimensionValue` returns values like `EU` or "AZ". + type: string + metricValue: + description: Returns the data for a specific dimension value. + format: float + type: number + type: object + analytics_metrics_over_time_response_context: + example: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + interval: day + properties: + metric: + description: Returns the metric you selected. + enum: + - play + - play-rate + - start + - end + - impression + example: impression + type: string + interval: + description: Returns the interval you selected. + enum: + - hour + - day + example: day + type: string + timeframe: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context_timeframe' + type: object + analytics_metrics_over_time_response_data: + example: + emittedAt: emittedAt + metricValue: 0.8008282 + properties: + emittedAt: + description: Returns the timestamp of the event that belongs to a specific + metric in ATOM date-time format. For example, if you set `play` with an + `hour` interval in your request, then `emittedAt` returns the hourly timestamps + of every play event within the timeframe you defined. + type: string + metricValue: + description: Returns the data for a specific metric value. + format: float + type: number + type: object video_status_ingest_receivedParts: properties: parts: diff --git a/build.gradle b/build.gradle index 6894998..24c30fb 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless' apply plugin: 'maven-publish' group = 'video.api' -version = '1.3.3' +version = '1.4.0' buildscript { repositories { diff --git a/docs/AnalyticsAggregatedMetricsResponse.md b/docs/AnalyticsAggregatedMetricsResponse.md new file mode 100644 index 0000000..e3805de --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponse.md @@ -0,0 +1,17 @@ + + +# AnalyticsAggregatedMetricsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**data** | **Float** | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsAggregatedMetricsResponseContext.md b/docs/AnalyticsAggregatedMetricsResponseContext.md new file mode 100644 index 0000000..c991a0b --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContext.md @@ -0,0 +1,43 @@ + + +# AnalyticsAggregatedMetricsResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | [**MetricEnum**](#MetricEnum) | Returns the metric you selected. | [optional] +**aggregation** | [**AggregationEnum**](#AggregationEnum) | Returns the aggregation you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + + + +## Enum: MetricEnum + +Name | Value +---- | ----- +PLAY | "play" +START | "start" +END | "end" +IMPRESSION | "impression" +IMPRESSION_TIME | "impression-time" +WATCH_TIME | "watch-time" + + + +## Enum: AggregationEnum + +Name | Value +---- | ----- +COUNT | "count" +RATE | "rate" +TOTAL | "total" +AVERAGE | "average" +SUM | "sum" + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md new file mode 100644 index 0000000..3184f36 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md @@ -0,0 +1,18 @@ + + +# AnalyticsAggregatedMetricsResponseContextTimeframe + +Returns the starting and ending date-times of the period you want analytics for. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **OffsetDateTime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] +**to** | **OffsetDateTime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsApi.md b/docs/AnalyticsApi.md index 97f7823..fa02e3f 100644 --- a/docs/AnalyticsApi.md +++ b/docs/AnalyticsApi.md @@ -4,19 +4,20 @@ All URIs are relative to *https://ws.api.video* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLiveStreamsPlays**](AnalyticsApi.md#getLiveStreamsPlays) | **GET** /analytics/live-streams/plays | Get play events for live stream -[**getVideosPlays**](AnalyticsApi.md#getVideosPlays) | **GET** /analytics/videos/plays | Get play events for video +[**getAggregatedMetrics**](AnalyticsApi.md#getAggregatedMetrics) | **GET** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics +[**getMetricsBreakdown**](AnalyticsApi.md#getMetricsBreakdown) | **GET** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](AnalyticsApi.md#getMetricsOverTime) | **GET** /data/timeseries/{metric} | Retrieve metrics over time - -# **getLiveStreamsPlays** -> AnalyticsPlaysResponse getLiveStreamsPlays(from, dimension).to(to).filter(filter).currentPage(currentPage).pageSize(pageSize).execute() + +# **getAggregatedMetrics** +> AnalyticsAggregatedMetricsResponse getAggregatedMetrics(metric, aggregation).from(from).to(to).filterBy(filterBy).execute() > okhttp3.Call executeAsync(callback) -> ApiResponse executeWithHttpInfo() +> ApiResponse executeWithHttpInfo() -Get play events for live stream +Retrieve aggregated metrics -Retrieve filtered analytics about the number of plays for your live streams in a project. +Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. ### Example ```java @@ -35,23 +36,126 @@ public class Example { AnalyticsApi apiInstance = client.analytics(); - LocalDate from = LocalDate.parse("2023-06-01"); // Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - String dimension = "liveStreamId"; // Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - LocalDate to = LocalDate.parse("2023-06-10"); // Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - String filter = "liveStreamId:li3q7HxhApxRF1c8F8r6VeaI"; // Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. + String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + String aggregation = "count"; // Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + OffsetDateTime from = OffsetDateTime.parse("2024-02-05T00:00:00+01:00"); // Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. + OffsetDateTime to = OffsetDateTime.parse("2024-02-06T00:00:00+01:00"); // Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + FilterBy2 filterBy = new HashMap(); // Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + filterBy.setMediaId("""vi4blUQJFrYWbaG44NChkH27"""); // Returns analytics based on the unique identifiers of a video or a live stream. + filterBy.setMediaType("""video"""); // + filterBy.setContinent("""EU"""); // Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + filterBy.setCountry("""FR"""); // Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + filterBy.setDeviceType("""computer"""); // Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + filterBy.setOperatingSystem("""windows"""); // Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + filterBy.setBrowser("""firefox"""); // Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + filterBy.setTag("""Cool videos"""); // Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + + + try { + AnalyticsAggregatedMetricsResponse result = apiInstance.getAggregatedMetrics(metric, aggregation) + .from(from) + .to(to) + .filterBy(filterBy) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnalyticsApi#getAggregatedMetrics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getMessage()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metric** | **String**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. | [enum: play, start, end, impression, impression-time, watch-time] + **aggregation** | **String**| Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. | [enum: count, rate, total, average, sum] + **from** | **OffsetDateTime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. | [optional] + **to** | **OffsetDateTime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | [**FilterBy2**](.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] + +### Return type + + +[**AnalyticsAggregatedMetricsResponse**](AnalyticsAggregatedMetricsResponse.md) + +### Authorization + +[API key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +**400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +**404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +**429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| + + +# **getMetricsBreakdown** +> AnalyticsMetricsBreakdownResponse getMetricsBreakdown(metric, breakdown).from(from).to(to).filterBy(filterBy).currentPage(currentPage).pageSize(pageSize).execute() +> okhttp3.Call executeAsync(callback) +> ApiResponse executeWithHttpInfo() + +Retrieve metrics in a breakdown of dimensions + +Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + +### Example +```java +// Import classes: +import video.api.client.ApiVideoClient; +import video.api.client.api.ApiException; +import video.api.client.api.models.*; +import video.api.client.api.clients.AnalyticsApi; +import java.util.*; + +public class Example { + public static void main(String[] args) { + ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY"); + // if you rather like to use the sandbox environment: + // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", Environment.SANDBOX); + + AnalyticsApi apiInstance = client.analytics(); + + String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + String breakdown = "media-id"; // Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + OffsetDateTime from = OffsetDateTime.parse("2024-02-05T00:00:00+01:00"); // Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + OffsetDateTime to = OffsetDateTime.parse("2024-02-06T00:00:00+01:00"); // Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + FilterBy2 filterBy = new HashMap(); // Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + filterBy.setMediaId("""vi4blUQJFrYWbaG44NChkH27"""); // Returns analytics based on the unique identifiers of a video or a live stream. + filterBy.setMediaType("""video"""); // + filterBy.setContinent("""EU"""); // Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + filterBy.setCountry("""FR"""); // Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + filterBy.setDeviceType("""computer"""); // Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + filterBy.setOperatingSystem("""windows"""); // Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + filterBy.setBrowser("""firefox"""); // Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + filterBy.setTag("""Cool videos"""); // Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1 Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25. try { - Page result = apiInstance.getLiveStreamsPlays(from, dimension) + Page result = apiInstance.getMetricsBreakdown(metric, breakdown) + .from(from) .to(to) - .filter(filter) + .filterBy(filterBy) .currentPage(currentPage) .pageSize(pageSize) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalyticsApi#getLiveStreamsPlays"); + System.err.println("Exception when calling AnalyticsApi#getMetricsBreakdown"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getMessage()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -65,16 +169,17 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **from** | **LocalDate**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | - **dimension** | **String**| Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. | [enum: liveStreamId, emittedAt, country, deviceType, operatingSystem, browser] - **to** | **LocalDate**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional] - **filter** | **String**| Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. | [optional] + **metric** | **String**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | [enum: play, play-rate, play-total, start, end, impression] + **breakdown** | **String**| Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [enum: media-id, media-type, continent, country, device-type, operating-system, browser] + **from** | **OffsetDateTime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] + **to** | **OffsetDateTime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | [**FilterBy2**](.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] **currentPage** | **Integer**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **Integer**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] ### Return type -[**Page**](pagination.md)<[**AnalyticsData**](AnalyticsData.md)> +[**Page**](pagination.md)<[**AnalyticsMetricsBreakdownResponseData**](AnalyticsMetricsBreakdownResponseData.md)> ### Authorization @@ -91,19 +196,18 @@ Name | Type | Description | Notes |-------------|-------------|------------------| **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -**403** | Forbidden - Disabled Analytics | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -**404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +**404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| - -# **getVideosPlays** -> AnalyticsPlaysResponse getVideosPlays(from, dimension).to(to).filter(filter).currentPage(currentPage).pageSize(pageSize).execute() + +# **getMetricsOverTime** +> AnalyticsMetricsOverTimeResponse getMetricsOverTime(metric).from(from).to(to).interval(interval).filterBy(filterBy).currentPage(currentPage).pageSize(pageSize).execute() > okhttp3.Call executeAsync(callback) -> ApiResponse executeWithHttpInfo() +> ApiResponse executeWithHttpInfo() -Get play events for video +Retrieve metrics over time -Retrieve filtered analytics about the number of plays for your videos in a project. +Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred ### Example ```java @@ -122,23 +226,35 @@ public class Example { AnalyticsApi apiInstance = client.analytics(); - LocalDate from = LocalDate.parse("2023-06-01"); // Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - String dimension = "videoId"; // Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - LocalDate to = LocalDate.parse("2023-06-10"); // Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - String filter = "videoId:vi3q7HxhApxRF1c8F8r6VeaI"; // Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. + String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + OffsetDateTime from = OffsetDateTime.parse("2024-02-05T00:00:00+01:00"); // Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + OffsetDateTime to = OffsetDateTime.parse("2024-02-06T00:00:00+01:00"); // Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + String interval = "hour"; // Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. + FilterBy2 filterBy = new HashMap(); // Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + filterBy.setMediaId("""vi4blUQJFrYWbaG44NChkH27"""); // Returns analytics based on the unique identifiers of a video or a live stream. + filterBy.setMediaType("""video"""); // + filterBy.setContinent("""EU"""); // Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. + filterBy.setCountry("""FR"""); // Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. + filterBy.setDeviceType("""computer"""); // Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + filterBy.setOperatingSystem("""windows"""); // Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + filterBy.setBrowser("""firefox"""); // Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + filterBy.setTag("""Cool videos"""); // Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1 Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25. try { - Page result = apiInstance.getVideosPlays(from, dimension) + Page result = apiInstance.getMetricsOverTime(metric) + .from(from) .to(to) - .filter(filter) + .interval(interval) + .filterBy(filterBy) .currentPage(currentPage) .pageSize(pageSize) .execute(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnalyticsApi#getVideosPlays"); + System.err.println("Exception when calling AnalyticsApi#getMetricsOverTime"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getMessage()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -152,16 +268,17 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **from** | **LocalDate**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | - **dimension** | **String**| Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. | [enum: videoId, emittedAt, country, deviceType, operatingSystem, browser] - **to** | **LocalDate**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional] - **filter** | **String**| Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. | [optional] + **metric** | **String**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | [enum: play, play-rate, start, end, impression] + **from** | **OffsetDateTime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] + **to** | **OffsetDateTime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **interval** | **String**| Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. | [optional] [enum: hour, day] + **filterBy** | [**FilterBy2**](.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] **currentPage** | **Integer**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **Integer**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] ### Return type -[**Page**](pagination.md)<[**AnalyticsData**](AnalyticsData.md)> +[**Page**](pagination.md)<[**AnalyticsMetricsOverTimeResponseData**](AnalyticsMetricsOverTimeResponseData.md)> ### Authorization @@ -178,7 +295,6 @@ Name | Type | Description | Notes |-------------|-------------|------------------| **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -**403** | Forbidden - Disabled Analytics | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -**404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +**404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| diff --git a/docs/AnalyticsMetricsBreakdownResponse.md b/docs/AnalyticsMetricsBreakdownResponse.md new file mode 100644 index 0000000..fae2983 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponse.md @@ -0,0 +1,18 @@ + + +# AnalyticsMetricsBreakdownResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | | +**data** | [**List<AnalyticsMetricsBreakdownResponseData>**](AnalyticsMetricsBreakdownResponseData.md) | Returns an array of dimensions and their respective metrics. | +**pagination** | [**Pagination**](Pagination.md) | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsMetricsBreakdownResponseContext.md b/docs/AnalyticsMetricsBreakdownResponseContext.md new file mode 100644 index 0000000..811184e --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseContext.md @@ -0,0 +1,44 @@ + + +# AnalyticsMetricsBreakdownResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | [**MetricEnum**](#MetricEnum) | Returns the metric you selected. | [optional] +**breakdown** | [**BreakdownEnum**](#BreakdownEnum) | Returns the dimension you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + + + +## Enum: MetricEnum + +Name | Value +---- | ----- +PLAY | "play" +PLAY_RATE | "play-rate" +START | "start" +END | "end" +IMPRESSION | "impression" + + + +## Enum: BreakdownEnum + +Name | Value +---- | ----- +MEDIA_ID | "media-id" +MEDIA_TYPE | "media-type" +CONTINENT | "continent" +COUNTRY | "country" +DEVICE_TYPE | "device-type" +OPERATING_SYSTEM | "operating-system" +BROWSER | "browser" + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsMetricsBreakdownResponseData.md b/docs/AnalyticsMetricsBreakdownResponseData.md new file mode 100644 index 0000000..3b8a18a --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseData.md @@ -0,0 +1,17 @@ + + +# AnalyticsMetricsBreakdownResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensionValue** | **String** | Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\". | [optional] +**metricValue** | **Float** | Returns the data for a specific dimension value. | [optional] + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsMetricsOverTimeResponse.md b/docs/AnalyticsMetricsOverTimeResponse.md new file mode 100644 index 0000000..a7b74c1 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponse.md @@ -0,0 +1,18 @@ + + +# AnalyticsMetricsOverTimeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | | +**data** | [**List<AnalyticsMetricsOverTimeResponseData>**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . | +**pagination** | [**Pagination**](Pagination.md) | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsMetricsOverTimeResponseContext.md b/docs/AnalyticsMetricsOverTimeResponseContext.md new file mode 100644 index 0000000..117eb1d --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseContext.md @@ -0,0 +1,39 @@ + + +# AnalyticsMetricsOverTimeResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | [**MetricEnum**](#MetricEnum) | Returns the metric you selected. | [optional] +**interval** | [**IntervalEnum**](#IntervalEnum) | Returns the interval you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + + + +## Enum: MetricEnum + +Name | Value +---- | ----- +PLAY | "play" +PLAY_RATE | "play-rate" +START | "start" +END | "end" +IMPRESSION | "impression" + + + +## Enum: IntervalEnum + +Name | Value +---- | ----- +HOUR | "hour" +DAY | "day" + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/AnalyticsMetricsOverTimeResponseData.md b/docs/AnalyticsMetricsOverTimeResponseData.md new file mode 100644 index 0000000..937fac8 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseData.md @@ -0,0 +1,17 @@ + + +# AnalyticsMetricsOverTimeResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emittedAt** | **String** | Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. | [optional] +**metricValue** | **Float** | Returns the data for a specific metric value. | [optional] + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/FilterBy.md b/docs/FilterBy.md new file mode 100644 index 0000000..3151acc --- /dev/null +++ b/docs/FilterBy.md @@ -0,0 +1,46 @@ + + +# FilterBy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mediaId** | **String** | Returns analytics based on the unique identifiers of a video or a live stream. | [optional] +**mediaType** | [**MediaTypeEnum**](#MediaTypeEnum) | | [optional] +**continent** | [**ContinentEnum**](#ContinentEnum) | Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. | [optional] +**country** | **String** | Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. | [optional] +**deviceType** | **String** | Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. | [optional] +**operatingSystem** | **String** | Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. | [optional] +**browser** | **String** | Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [optional] +**tag** | **String** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] + + + +## Enum: MediaTypeEnum + +Name | Value +---- | ----- +VIDEO | "video" +LIVE_STREAM | "live-stream" + + + +## Enum: ContinentEnum + +Name | Value +---- | ----- +AS | "AS" +AF | "AF" +NA | "NA" +SA | "SA" +AN | "AN" +EU | "EU" +AZ | "AZ" + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/FilterBy1.md b/docs/FilterBy1.md new file mode 100644 index 0000000..7692676 --- /dev/null +++ b/docs/FilterBy1.md @@ -0,0 +1,46 @@ + + +# FilterBy1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mediaId** | **String** | Returns analytics based on the unique identifiers of a video or a live stream. | [optional] +**mediaType** | [**MediaTypeEnum**](#MediaTypeEnum) | | [optional] +**continent** | [**ContinentEnum**](#ContinentEnum) | Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. | [optional] +**country** | **String** | Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. | [optional] +**deviceType** | **String** | Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. | [optional] +**operatingSystem** | **String** | Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. | [optional] +**browser** | **String** | Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [optional] +**tag** | **String** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] + + + +## Enum: MediaTypeEnum + +Name | Value +---- | ----- +VIDEO | "video" +LIVE_STREAM | "live-stream" + + + +## Enum: ContinentEnum + +Name | Value +---- | ----- +AS | "AS" +AF | "AF" +NA | "NA" +SA | "SA" +AN | "AN" +EU | "EU" +AZ | "AZ" + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/FilterBy2.md b/docs/FilterBy2.md new file mode 100644 index 0000000..8016b0a --- /dev/null +++ b/docs/FilterBy2.md @@ -0,0 +1,46 @@ + + +# FilterBy2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mediaId** | **String** | Returns analytics based on the unique identifiers of a video or a live stream. | [optional] +**mediaType** | [**MediaTypeEnum**](#MediaTypeEnum) | | [optional] +**continent** | [**ContinentEnum**](#ContinentEnum) | Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. | [optional] +**country** | **String** | Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. | [optional] +**deviceType** | **String** | Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. | [optional] +**operatingSystem** | **String** | Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. | [optional] +**browser** | **String** | Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [optional] +**tag** | **String** | Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] + + + +## Enum: MediaTypeEnum + +Name | Value +---- | ----- +VIDEO | "video" +LIVE_STREAM | "live-stream" + + + +## Enum: ContinentEnum + +Name | Value +---- | ----- +AS | "AS" +AF | "AF" +NA | "NA" +SA | "SA" +AN | "AN" +EU | "EU" +AZ | "AZ" + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/LiveStream.md b/docs/LiveStream.md index cc11841..8b3dfe3 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -9,11 +9,11 @@ Name | Type | Description | Notes **liveStreamId** | **String** | The unique identifier for the live stream. Live stream IDs begin with \"li.\" | **name** | **String** | The name of your live stream. | [optional] **streamKey** | **String** | The unique, private stream key that you use to begin streaming. | [optional] -**_public** | **Boolean** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional] +**_public** | **Boolean** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **assets** | [**LiveStreamAssets**](LiveStreamAssets.md) | | [optional] **playerId** | **String** | The unique identifier for the player. | [optional] **broadcasting** | **Boolean** | Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not. | [optional] -**restreams** | [**List<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of RTMP restream destinations. | +**restreams** | [**List<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of restream destinations. | **createdAt** | **OffsetDateTime** | When the player was created, presented in ISO-8601 format. | [optional] **updatedAt** | **OffsetDateTime** | When the player was last updated, presented in ISO-8601 format. | [optional] diff --git a/docs/LiveStreamCreationPayload.md b/docs/LiveStreamCreationPayload.md index 7041d1c..52e0cde 100644 --- a/docs/LiveStreamCreationPayload.md +++ b/docs/LiveStreamCreationPayload.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Add a name for your live stream here. | -**_public** | **Boolean** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional] +**_public** | **Boolean** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **playerId** | **String** | The unique identifier for the player. | [optional] -**restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. | [optional] +**restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. | [optional] ## Implemented Interfaces diff --git a/docs/LiveStreamSession.md b/docs/LiveStreamSession.md deleted file mode 100644 index 476b07b..0000000 --- a/docs/LiveStreamSession.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# LiveStreamSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**session** | [**LiveStreamSessionSession**](LiveStreamSessionSession.md) | | [optional] -**location** | [**LiveStreamSessionLocation**](LiveStreamSessionLocation.md) | | [optional] -**referrer** | [**LiveStreamSessionReferrer**](LiveStreamSessionReferrer.md) | | [optional] -**device** | [**LiveStreamSessionDevice**](LiveStreamSessionDevice.md) | | [optional] -**os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional] -**client** | [**LiveStreamSessionClient**](LiveStreamSessionClient.md) | | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/LiveStreamSessionClient.md b/docs/LiveStreamSessionClient.md deleted file mode 100644 index e0ab9a3..0000000 --- a/docs/LiveStreamSessionClient.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# LiveStreamSessionClient - -What kind of browser the viewer is using for the live stream session. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the browser used to view the live stream session. | [optional] -**version** | **String** | The version of the browser used to view the live stream session. | [optional] -**type** | **String** | The type of client used to view the live stream session. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/LiveStreamSessionDevice.md b/docs/LiveStreamSessionDevice.md deleted file mode 100644 index 915a4cd..0000000 --- a/docs/LiveStreamSessionDevice.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# LiveStreamSessionDevice - -What type of device the user is on when in the live stream session. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | What the type is like desktop, laptop, mobile. | [optional] -**vendor** | **String** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**model** | **String** | The specific model of the device, if known. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/LiveStreamSessionLocation.md b/docs/LiveStreamSessionLocation.md deleted file mode 100644 index fe1b3e2..0000000 --- a/docs/LiveStreamSessionLocation.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# LiveStreamSessionLocation - -The location of the viewer of the live stream. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**country** | **String** | The country of the viewer of the live stream. | [optional] -**city** | **String** | The city of the viewer of the live stream. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/LiveStreamSessionReferrer.md b/docs/LiveStreamSessionReferrer.md deleted file mode 100644 index 6e4767c..0000000 --- a/docs/LiveStreamSessionReferrer.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# LiveStreamSessionReferrer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | The website the viewer of the live stream was referred to in order to view the live stream. | [optional] -**medium** | **String** | The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. | [optional] -**source** | **String** | Where the viewer came from to see the live stream (usually where they searched from). | [optional] -**searchTerm** | **String** | What term they searched for that led them to the live stream. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/LiveStreamSessionSession.md b/docs/LiveStreamSessionSession.md deleted file mode 100644 index d213e79..0000000 --- a/docs/LiveStreamSessionSession.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# LiveStreamSessionSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sessionId** | **String** | A unique identifier for your session. You can use this to track what happens during a specific session. | [optional] -**loadedAt** | **OffsetDateTime** | When the session started, with the date and time presented in ISO-8601 format. | [optional] -**endedAt** | **OffsetDateTime** | When the session ended, with the date and time presented in ISO-8601 format. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/LiveStreamUpdatePayload.md b/docs/LiveStreamUpdatePayload.md index b5c8926..bd8b5d3 100644 --- a/docs/LiveStreamUpdatePayload.md +++ b/docs/LiveStreamUpdatePayload.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | The name you want to use for your live stream. | [optional] -**_public** | **Boolean** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). | [optional] +**_public** | **Boolean** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **playerId** | **String** | The unique ID for the player associated with a live stream that you want to update. | [optional] -**restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [optional] +**restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [optional] ## Implemented Interfaces diff --git a/docs/LiveStreamsApi.md b/docs/LiveStreamsApi.md index ba3f7cf..0355134 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**list**](LiveStreamsApi.md#list) | **GET** /live-streams | List all live streams [**uploadThumbnail**](LiveStreamsApi.md#uploadThumbnail) | **POST** /live-streams/{liveStreamId}/thumbnail | Upload a thumbnail [**deleteThumbnail**](LiveStreamsApi.md#deleteThumbnail) | **DELETE** /live-streams/{liveStreamId}/thumbnail | Delete a thumbnail +[**complete**](LiveStreamsApi.md#complete) | **PUT** /live-streams/{liveStreamId}/complete | Complete a live stream @@ -42,9 +43,9 @@ public class Example { LiveStreamCreationPayload liveStreamCreationPayload = new LiveStreamCreationPayload(); // liveStreamCreationPayload.setName("My Live Stream Video"); // Add a name for your live stream here. - liveStreamCreationPayload.setPublic(); // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + liveStreamCreationPayload.setPublic(); // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). liveStreamCreationPayload.setPlayerId("pl4f4ferf5erfr5zed4fsdd"); // The unique identifier for the player. - liveStreamCreationPayload.setRestreams(Collections.emptyList()); // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. + liveStreamCreationPayload.setRestreams(Collections.emptyList()); // Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. try { @@ -187,9 +188,9 @@ public class Example { String liveStreamId = "li400mYKSgQ6xs7taUeSaEKr"; // The unique ID for the live stream that you want to update information for such as player details. LiveStreamUpdatePayload liveStreamUpdatePayload = new LiveStreamUpdatePayload(); // liveStreamUpdatePayload.setName("My Live Stream Video"); // The name you want to use for your live stream. - liveStreamUpdatePayload.setPublic(); // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + liveStreamUpdatePayload.setPublic(); // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). liveStreamUpdatePayload.setPlayerId("pl45KFKdlddgk654dspkze"); // The unique ID for the player associated with a live stream that you want to update. - liveStreamUpdatePayload.setRestreams(Collections.emptyList()); // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. + liveStreamUpdatePayload.setRestreams(Collections.emptyList()); // Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. try { @@ -531,3 +532,72 @@ Name | Type | Description | Notes **404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| + +# **complete** +> complete(liveStreamId) +> okhttp3.Call completeAsync(liveStreamId, callback) +> ApiResponse completeWithHttpInfo(liveStreamId) + +Complete a live stream + +Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + +### Example +```java +// Import classes: +import video.api.client.ApiVideoClient; +import video.api.client.api.ApiException; +import video.api.client.api.models.*; +import video.api.client.api.clients.LiveStreamsApi; +import java.util.*; + +public class Example { + public static void main(String[] args) { + ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY"); + // if you rather like to use the sandbox environment: + // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", Environment.SANDBOX); + + LiveStreamsApi apiInstance = client.liveStreams(); + + String liveStreamId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique ID for the live stream you want to complete. + + try { + apiInstance.complete(liveStreamId); + } catch (ApiException e) { + System.err.println("Exception when calling LiveStreamsApi#complete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getMessage()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **liveStreamId** | **String**| The unique ID for the live stream you want to complete. | + +### Return type + + +null (empty response body) + +### Authorization + +[API key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Accepted | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +**404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +**429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| + diff --git a/docs/RestreamsRequestObject.md b/docs/RestreamsRequestObject.md index 12237e8..babe265 100644 --- a/docs/RestreamsRequestObject.md +++ b/docs/RestreamsRequestObject.md @@ -8,7 +8,7 @@ Adding restream destinations is optional. However, if you set a restream destina Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Use this parameter to define a name for the restream destination. | -**serverUrl** | **String** | Use this parameter to set the RTMP URL of the restream destination. | +**serverUrl** | **String** | Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination. | **streamKey** | **String** | Use this parameter to provide the unique key of the live stream that you want to restream. | diff --git a/docs/RestreamsResponseObject.md b/docs/RestreamsResponseObject.md index f45488c..0e100fb 100644 --- a/docs/RestreamsResponseObject.md +++ b/docs/RestreamsResponseObject.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Returns the name of a restream destination. | [optional] -**serverUrl** | **String** | Returns the RTMP URL of a restream destination. | [optional] +**serverUrl** | **String** | Returns the server URL of a restream destination. | [optional] **streamKey** | **String** | Returns the unique key of the live stream that is set up for restreaming. | [optional] diff --git a/docs/UnrecognizedRequestUrl.md b/docs/UnrecognizedRequestUrl.md new file mode 100644 index 0000000..1f08819 --- /dev/null +++ b/docs/UnrecognizedRequestUrl.md @@ -0,0 +1,18 @@ + + +# UnrecognizedRequestUrl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | A link to the error documentation. | [optional] +**title** | **String** | A description of the error that occurred. | [optional] +**status** | **Integer** | The HTTP status code. | [optional] + + +## Implemented Interfaces + +* Serializable + + diff --git a/docs/VideoCreationPayload.md b/docs/VideoCreationPayload.md index 0f4c79b..d12a827 100644 --- a/docs/VideoCreationPayload.md +++ b/docs/VideoCreationPayload.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **title** | **String** | The title of your new video. | **description** | **String** | A brief description of your video. | [optional] **source** | **String** | You can either add a video already on the web, by entering the URL of the video, or you can also enter the `videoId` of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create. | [optional] -**_public** | **Boolean** | Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management) | [optional] +**_public** | **Boolean** | Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management) | [optional] **panoramic** | **Boolean** | Indicates if your video is a 360/immersive video. | [optional] **mp4Support** | **Boolean** | Enables mp4 version in addition to streamed version. | [optional] **playerId** | **String** | The unique identification number for your video player. | [optional] diff --git a/docs/VideoSession.md b/docs/VideoSession.md deleted file mode 100644 index 1bdfeec..0000000 --- a/docs/VideoSession.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# VideoSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**session** | [**VideoSessionSession**](VideoSessionSession.md) | | [optional] -**location** | [**VideoSessionLocation**](VideoSessionLocation.md) | | [optional] -**referrer** | [**VideoSessionReferrer**](VideoSessionReferrer.md) | | [optional] -**device** | [**VideoSessionDevice**](VideoSessionDevice.md) | | [optional] -**os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional] -**client** | [**VideoSessionClient**](VideoSessionClient.md) | | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/VideoSessionClient.md b/docs/VideoSessionClient.md deleted file mode 100644 index 3b69cfd..0000000 --- a/docs/VideoSessionClient.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VideoSessionClient - -What kind of browser the viewer is using for the video session. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the browser used to view the video session. | [optional] -**version** | **String** | The version of the browser used to view the video session. | [optional] -**type** | **String** | The type of client used to view the video session. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/VideoSessionDevice.md b/docs/VideoSessionDevice.md deleted file mode 100644 index 2064211..0000000 --- a/docs/VideoSessionDevice.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VideoSessionDevice - -What type of device the user is on when in the video session. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | What the type is like desktop, laptop, mobile. | [optional] -**vendor** | **String** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**model** | **String** | The specific model of the device, if known. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/VideoSessionLocation.md b/docs/VideoSessionLocation.md deleted file mode 100644 index e40e243..0000000 --- a/docs/VideoSessionLocation.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# VideoSessionLocation - -The location of the viewer. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**country** | **String** | The country of the viewer. | [optional] -**city** | **String** | The city of the viewer. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/VideoSessionOs.md b/docs/VideoSessionOs.md deleted file mode 100644 index c948c2e..0000000 --- a/docs/VideoSessionOs.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VideoSessionOs - -The operating system the viewer is on. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the operating system. | [optional] -**shortname** | **String** | The nickname for the operating system, often representing the version. | [optional] -**version** | **String** | The version of the operating system. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/VideoSessionReferrer.md b/docs/VideoSessionReferrer.md deleted file mode 100644 index eb4784e..0000000 --- a/docs/VideoSessionReferrer.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VideoSessionReferrer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | The link the viewer used to reach the video session. | [optional] -**medium** | **String** | How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. | [optional] -**source** | **String** | The source the referrer came from to the video session. For example if they searched through google to find the stream. | [optional] -**searchTerm** | **String** | The search term they typed to arrive at the video session. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/VideoSessionSession.md b/docs/VideoSessionSession.md deleted file mode 100644 index dfb58ea..0000000 --- a/docs/VideoSessionSession.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VideoSessionSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sessionId** | **String** | The unique identifier for the session that you can use to track what happens during it. | [optional] -**loadedAt** | **OffsetDateTime** | When the video session started, presented in ISO-8601 format. | [optional] -**endedAt** | **OffsetDateTime** | When the video session ended, presented in ISO-8601 format. | [optional] -**metadata** | [**List<Metadata>**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. | [optional] - - -## Implemented Interfaces - -* Serializable - - diff --git a/docs/VideosApi.md b/docs/VideosApi.md index a3e58ea..b1fe173 100644 --- a/docs/VideosApi.md +++ b/docs/VideosApi.md @@ -47,7 +47,7 @@ public class Example { videoCreationPayload.setTitle("Maths video"); // The title of your new video. videoCreationPayload.setDescription("A video about string theory."); // A brief description of your video. videoCreationPayload.setSource("https://www.myvideo.url.com/video.mp4 OR vi4k0jvEUuaTdRAEjQ4JfOyl"); // You can either add a video already on the web, by entering the URL of the video, or you can also enter the `videoId` of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create. - videoCreationPayload.setPublic(true); // Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management) + videoCreationPayload.setPublic(true); // Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management) videoCreationPayload.setPanoramic(false); // Indicates if your video is a 360/immersive video. videoCreationPayload.setMp4Support(true); // Enables mp4 version in addition to streamed version. videoCreationPayload.setPlayerId("pl45KFKdlddgk654dspkze"); // The unique identification number for your video player. diff --git a/pom.xml b/pom.xml index 33c0e6d..a0eca62 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ java-api-client jar ${project.groupId}:${project.artifactId} - 1.3.3 + 1.4.0 https://github.com/apivideo/api.video-java-client api.video Java API client diff --git a/src/main/java/video/api/client/api/ApiClient.java b/src/main/java/video/api/client/api/ApiClient.java index d16cf5e..e4cdae8 100644 --- a/src/main/java/video/api/client/api/ApiClient.java +++ b/src/main/java/video/api/client/api/ApiClient.java @@ -39,6 +39,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +import java.time.ZoneId; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; @@ -118,7 +119,7 @@ private OkHttpClient initHttpClient(List interceptors) { private void init() { verifyingSsl = true; json = new JSON(); - addDefaultHeader("AV-Origin-Client", "java:1.3.3"); + addDefaultHeader("AV-Origin-Client", "java:1.4.0"); } private boolean isValid(String regex, String field) { @@ -452,9 +453,20 @@ private String parameterToString(Object param) { if (param == null) { return ""; } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { - // Serialize to json string and remove the " enclosing characters - String jsonStr = json.serialize(param); - return jsonStr.substring(1, jsonStr.length() - 1); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX"); + + String formattedDate; + if (param instanceof Date) { + OffsetDateTime odt = ((Date) param).toInstant().atZone(ZoneId.systemDefault()).toOffsetDateTime(); + formattedDate = odt.format(formatter); + } else if (param instanceof OffsetDateTime) { + formattedDate = ((OffsetDateTime) param).format(formatter); + } else { + OffsetDateTime odt = ((LocalDate) param).atStartOfDay(ZoneId.systemDefault()).toOffsetDateTime(); + formattedDate = odt.format(formatter); + } + + return formattedDate; } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); for (Object o : (Collection) param) { diff --git a/src/main/java/video/api/client/api/clients/AnalyticsApi.java b/src/main/java/video/api/client/api/clients/AnalyticsApi.java index 585a796..c6159f6 100644 --- a/src/main/java/video/api/client/api/clients/AnalyticsApi.java +++ b/src/main/java/video/api/client/api/clients/AnalyticsApi.java @@ -15,12 +15,14 @@ import java.io.IOException; +import video.api.client.api.models.AnalyticsAggregatedMetricsResponse; +import video.api.client.api.models.AnalyticsMetricsBreakdownResponse; +import video.api.client.api.models.AnalyticsMetricsOverTimeResponse; import video.api.client.api.models.AnalyticsPlays400Error; -import video.api.client.api.models.AnalyticsPlaysResponse; -import java.time.LocalDate; -import video.api.client.api.models.Model403ErrorSchema; -import video.api.client.api.models.NotFound; +import video.api.client.api.models.FilterBy2; +import java.time.OffsetDateTime; import video.api.client.api.models.TooManyRequests; +import video.api.client.api.models.UnrecognizedRequestUrl; import java.lang.reflect.Type; import java.util.ArrayList; @@ -98,12 +100,14 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } - private okhttp3.Call getLiveStreamsPlaysCall(LocalDate from, String dimension, LocalDate to, String filter, - Integer currentPage, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAggregatedMetricsCall(String metric, String aggregation, OffsetDateTime from, + OffsetDateTime to, FilterBy2 filterBy, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/analytics/live-streams/plays"; + String localVarPath = "/data/metrics/{metric}/{aggregation}" + .replaceAll("\\{" + "metric" + "\\}", localVarApiClient.escapeString(metric.toString())) + .replaceAll("\\{" + "aggregation" + "\\}", localVarApiClient.escapeString(aggregation.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -119,12 +123,518 @@ private okhttp3.Call getLiveStreamsPlaysCall(LocalDate from, String dimension, L localVarQueryParams.addAll(localVarApiClient.parameterToPair("to", to)); } - if (dimension != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("dimension", dimension)); + if (filterBy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterBy", filterBy)); } - if (filter != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); + final String[] localVarAccepts = { "application/json" }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, + localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAggregatedMetricsValidateBeforeCall(String metric, String aggregation, OffsetDateTime from, + OffsetDateTime to, FilterBy2 filterBy, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'metric' is set + if (metric == null) { + throw new ApiException("Missing the required parameter 'metric' when calling getAggregatedMetrics"); + } + + // verify the required parameter 'aggregation' is set + if (aggregation == null) { + throw new ApiException("Missing the required parameter 'aggregation' when calling getAggregatedMetrics"); + } + + okhttp3.Call localVarCall = getAggregatedMetricsCall(metric, aggregation, from, to, filterBy, _callback); + return localVarCall; + } + + private ApiResponse getAggregatedMetricsWithHttpInfo(String metric, + String aggregation, OffsetDateTime from, OffsetDateTime to, FilterBy2 filterBy) throws ApiException { + okhttp3.Call localVarCall = getAggregatedMetricsValidateBeforeCall(metric, aggregation, from, to, filterBy, + null); + Type localVarReturnType = new TypeToken() { + }.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAggregatedMetricsAsync(String metric, String aggregation, OffsetDateTime from, + OffsetDateTime to, FilterBy2 filterBy, final ApiCallback _callback) + throws ApiException { + okhttp3.Call localVarCall = getAggregatedMetricsValidateBeforeCall(metric, aggregation, from, to, filterBy, + _callback); + Type localVarReturnType = new TypeToken() { + }.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetAggregatedMetricsRequest { + private final String metric; + private final String aggregation; + private OffsetDateTime from; + private OffsetDateTime to; + private FilterBy2 filterBy; + + private APIgetAggregatedMetricsRequest(String metric, String aggregation) { + this.metric = metric; + this.aggregation = aggregation; + } + + /** + * Set from + * + * @param from + * Use this query parameter to define the starting date-time of the period you want analytics for. - + * If you do not set a value for `from`, the default assigned value is 1 day ago, based on + * the `to` parameter. - The maximum value is 30 days ago. - The value you provide should + * follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this + * parameter when you call `/data/metrics/play/total`. (optional) + * + * @return APIgetAggregatedMetricsRequest + */ + public APIgetAggregatedMetricsRequest from(OffsetDateTime from) { + this.from = from; + return this; + } + + /** + * Set to + * + * @param to + * Use this query parameter to define the ending date-time of the period you want analytics for. - If + * you do not set a value for `to`, the default assigned value is `now`. - The + * API ignores this parameter when you call `/data/metrics/play/total`. - The value for + * `to` is a non-inclusive value: the API returns data **before** the date-time that you + * set. (optional) + * + * @return APIgetAggregatedMetricsRequest + */ + public APIgetAggregatedMetricsRequest to(OffsetDateTime to) { + this.to = to; + return this; + } + + /** + * Set filterBy + * + * @param filterBy + * Use this parameter to filter the API's response based on different data dimensions. You can + * serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do + * not set a value for `filterBy`, the API returns the full dataset for your project. - The + * API only accepts the `mediaId` and `mediaType` filters when you call + * `/data/metrics/play/total`. These are the available breakdown dimensions: - + * `mediaId`: Returns analytics based on the unique identifiers of a video or a live + * stream. - `mediaType`: Returns analytics based on the type of content. Possible values: + * `video` and `live-stream`. - `continent`: Returns analytics based on + * the viewers' continent. The list of supported continents names are based on the [GeoNames + * public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, + * for example `EU`. Possible values are: `AS`, `AF`, `NA`, + * `SA`, `AN`, `EU`, `AZ`. - `country`: Returns + * analytics based on the viewers' country. The list of supported country names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 + * format, for example `FR`. - `deviceType`: Returns analytics based on the type + * of device used by the viewers. Possible response values are: `computer`, + * `phone`, `tablet`, `tv`, `console`, `wearable`, + * `unknown`. - `operatingSystem`: Returns analytics based on the operating + * system used by the viewers. Response values include `windows`, `mac osx`, + * `android`, `ios`, `linux`. - `browser`: Returns analytics + * based on the browser used by the viewers. Response values include `chrome`, + * `firefox`, `edge`, `opera`. - `tag`: Returns analytics for + * videos using this tag. This filter only accepts a single value and is case sensitive. Read more + * about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + * + * @return APIgetAggregatedMetricsRequest + */ + public APIgetAggregatedMetricsRequest filterBy(FilterBy2 filterBy) { + this.filterBy = filterBy; + return this; + } + + /** + * Build call for getAggregatedMetrics + * + * @param _callback + * ApiCallback API callback + * + * @return Call to execute + * + * @throws ApiException + * If fail to serialize the request body object + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
200Success* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
400Bad request error* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
404Unrecognized request URL* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getAggregatedMetricsCall(metric, aggregation, from, to, filterBy, _callback); + } + + /** + * Execute getAggregatedMetrics request + * + * @return AnalyticsAggregatedMetricsResponse + * + * @throws ApiException + * If fail to call the API, e.g. server error or cannot deserialize the response body + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
200Success* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
400Bad request error* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
404Unrecognized request URL* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
+ */ + public AnalyticsAggregatedMetricsResponse execute() throws ApiException { + ApiResponse localVarResp = getAggregatedMetricsWithHttpInfo(metric, + aggregation, from, to, filterBy); + return localVarResp.getData(); + } + + private APIgetAggregatedMetricsRequest copy() { + APIgetAggregatedMetricsRequest copy = new APIgetAggregatedMetricsRequest(metric, aggregation); + copy.from(from); + copy.to(to); + copy.filterBy(filterBy); + return copy; + } + + /** + * Execute getAggregatedMetrics request with HTTP info returned + * + * @return ApiResponse<AnalyticsAggregatedMetricsResponse> + * + * @throws ApiException + * If fail to call the API, e.g. server error or cannot deserialize the response body + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
200Success* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
400Bad request error* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
404Unrecognized request URL* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getAggregatedMetricsWithHttpInfo(metric, aggregation, from, to, filterBy); + } + + /** + * Execute getAggregatedMetrics request (asynchronously) + * + * @param _callback + * The callback to be executed when the API call finishes + * + * @return The request call + * + * @throws ApiException + * If fail to process the API call, e.g. serializing the request body object + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
200Success* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
400Bad request error* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
404Unrecognized request URL* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit + * window resets.
+ *
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) + throws ApiException { + return getAggregatedMetricsAsync(metric, aggregation, from, to, filterBy, _callback); + } + + } + + /** + * Retrieve aggregated metrics + * + * Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain + * period of time. + * + * @param metric + * Use this path parameter to select a metric that you want analytics for. - `play` is the + * number of times your content has been played. You can use the aggregations `count`, + * `rate`, and `total` with the `play` metric. - `start` is the + * number of times playback was started. You can use the aggregation `count` with this metric. + * - `end` is the number of times playback has ended with the content watch until the end. You + * can use the aggregation `count` with this metric. - `impression` is the number of + * times your content has been loaded and was ready for playback. You can use the aggregation + * `count` with this metric. - `impression-time` is the time in milliseconds that + * your content was loading for until the first video frame is displayed. You can use the aggregations + * `average` and `sum` with this metric. - `watch-time` is the cumulative + * time in seconds that the user has spent watching your content. You can use the aggregations + * `average` and `sum` with this metric. (required) + * @param aggregation + * Use this path parameter to define a way of collecting data for the metric that you want analytics for. + * - `count` returns the overall number of events for the `play` metric. - + * `rate` returns the ratio that calculates the number of plays your content receives divided + * by its impressions. This aggregation can be used only with the `play` metric. - + * `total` calculates the total number of events for the `play` metric. - + * `average` calculates an average value for the selected metric. - `sum` adds up the + * total value of the select metric. (required) + * + * @return APIgetAggregatedMetricsRequest + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
200Success* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
400Bad request error* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
404Unrecognized request URL* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
+ */ + public APIgetAggregatedMetricsRequest getAggregatedMetrics(String metric, String aggregation) { + return new APIgetAggregatedMetricsRequest(metric, aggregation); + } + + private okhttp3.Call getMetricsBreakdownCall(String metric, String breakdown, OffsetDateTime from, + OffsetDateTime to, FilterBy2 filterBy, Integer currentPage, Integer pageSize, final ApiCallback _callback) + throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/data/buckets/{metric}/{breakdown}" + .replaceAll("\\{" + "metric" + "\\}", localVarApiClient.escapeString(metric.toString())) + .replaceAll("\\{" + "breakdown" + "\\}", localVarApiClient.escapeString(breakdown.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (from != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("from", from)); + } + + if (to != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("to", to)); + } + + if (filterBy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterBy", filterBy)); } if (currentPage != null) { @@ -152,86 +662,125 @@ private okhttp3.Call getLiveStreamsPlaysCall(LocalDate from, String dimension, L } @SuppressWarnings("rawtypes") - private okhttp3.Call getLiveStreamsPlaysValidateBeforeCall(LocalDate from, String dimension, LocalDate to, - String filter, Integer currentPage, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMetricsBreakdownValidateBeforeCall(String metric, String breakdown, OffsetDateTime from, + OffsetDateTime to, FilterBy2 filterBy, Integer currentPage, Integer pageSize, final ApiCallback _callback) + throws ApiException { - // verify the required parameter 'from' is set - if (from == null) { - throw new ApiException("Missing the required parameter 'from' when calling getLiveStreamsPlays"); + // verify the required parameter 'metric' is set + if (metric == null) { + throw new ApiException("Missing the required parameter 'metric' when calling getMetricsBreakdown"); } - // verify the required parameter 'dimension' is set - if (dimension == null) { - throw new ApiException("Missing the required parameter 'dimension' when calling getLiveStreamsPlays"); + // verify the required parameter 'breakdown' is set + if (breakdown == null) { + throw new ApiException("Missing the required parameter 'breakdown' when calling getMetricsBreakdown"); } - okhttp3.Call localVarCall = getLiveStreamsPlaysCall(from, dimension, to, filter, currentPage, pageSize, - _callback); + okhttp3.Call localVarCall = getMetricsBreakdownCall(metric, breakdown, from, to, filterBy, currentPage, + pageSize, _callback); return localVarCall; } - private ApiResponse getLiveStreamsPlaysWithHttpInfo(LocalDate from, String dimension, - LocalDate to, String filter, Integer currentPage, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getLiveStreamsPlaysValidateBeforeCall(from, dimension, to, filter, currentPage, - pageSize, null); - Type localVarReturnType = new TypeToken() { + private ApiResponse getMetricsBreakdownWithHttpInfo(String metric, + String breakdown, OffsetDateTime from, OffsetDateTime to, FilterBy2 filterBy, Integer currentPage, + Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getMetricsBreakdownValidateBeforeCall(metric, breakdown, from, to, filterBy, + currentPage, pageSize, null); + Type localVarReturnType = new TypeToken() { }.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getLiveStreamsPlaysAsync(LocalDate from, String dimension, LocalDate to, String filter, - Integer currentPage, Integer pageSize, final ApiCallback _callback) - throws ApiException { - okhttp3.Call localVarCall = getLiveStreamsPlaysValidateBeforeCall(from, dimension, to, filter, currentPage, - pageSize, _callback); - Type localVarReturnType = new TypeToken() { + private okhttp3.Call getMetricsBreakdownAsync(String metric, String breakdown, OffsetDateTime from, + OffsetDateTime to, FilterBy2 filterBy, Integer currentPage, Integer pageSize, + final ApiCallback _callback) throws ApiException { + okhttp3.Call localVarCall = getMetricsBreakdownValidateBeforeCall(metric, breakdown, from, to, filterBy, + currentPage, pageSize, _callback); + Type localVarReturnType = new TypeToken() { }.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetLiveStreamsPlaysRequest { - private final LocalDate from; - private final String dimension; - private LocalDate to; - private String filter; + public class APIgetMetricsBreakdownRequest { + private final String metric; + private final String breakdown; + private OffsetDateTime from; + private OffsetDateTime to; + private FilterBy2 filterBy; private Integer currentPage; private Integer pageSize; - private APIgetLiveStreamsPlaysRequest(LocalDate from, String dimension) { + private APIgetMetricsBreakdownRequest(String metric, String breakdown) { + this.metric = metric; + this.breakdown = breakdown; + } + + /** + * Set from + * + * @param from + * Use this query parameter to define the starting date-time of the period you want analytics for. - + * If you do not set a value for `from`, the default assigned value is 1 day ago, based on + * the `to` parameter. - The maximum value is 30 days ago. - The value you provide should + * follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + * + * @return APIgetMetricsBreakdownRequest + */ + public APIgetMetricsBreakdownRequest from(OffsetDateTime from) { this.from = from; - this.dimension = dimension; + return this; } /** * Set to * * @param to - * Use this optional query parameter to set the end date for the time period that you want analytics - * for. - If you do not specify a `to` date, the API returns analytics data starting from - * the `from` date up until today, and excluding today. - The date you set must be **within - * the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - * (optional) + * Use this query parameter to define the ending date-time of the period you want analytics for. - If + * you do not set a value for `to`, the default assigned value is `now`. - The + * value for `to` is a non-inclusive value: the API returns data **before** the date-time + * that you set. (optional) * - * @return APIgetLiveStreamsPlaysRequest + * @return APIgetMetricsBreakdownRequest */ - public APIgetLiveStreamsPlaysRequest to(LocalDate to) { + public APIgetMetricsBreakdownRequest to(OffsetDateTime to) { this.to = to; return this; } /** - * Set filter + * Set filterBy * - * @param filter - * Use this query parameter to filter your results to a specific live stream in a project that you - * want analytics for. You must use the `liveStreamId:` prefix when specifying a live - * stream ID. (optional) + * @param filterBy + * Use this parameter to filter the API's response based on different data dimensions. You can + * serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do + * not set a value for `filterBy`, the API returns the full dataset for your project. - The + * API only accepts the `mediaId` and `mediaType` filters when you call + * `/data/metrics/play/total`. These are the available breakdown dimensions: - + * `mediaId`: Returns analytics based on the unique identifiers of a video or a live + * stream. - `mediaType`: Returns analytics based on the type of content. Possible values: + * `video` and `live-stream`. - `continent`: Returns analytics based on + * the viewers' continent. The list of supported continents names are based on the [GeoNames + * public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, + * for example `EU`. Possible values are: `AS`, `AF`, `NA`, + * `SA`, `AN`, `EU`, `AZ`. - `country`: Returns + * analytics based on the viewers' country. The list of supported country names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 + * format, for example `FR`. - `deviceType`: Returns analytics based on the type + * of device used by the viewers. Possible response values are: `computer`, + * `phone`, `tablet`, `tv`, `console`, `wearable`, + * `unknown`. - `operatingSystem`: Returns analytics based on the operating + * system used by the viewers. Response values include `windows`, `mac osx`, + * `android`, `ios`, `linux`. - `browser`: Returns analytics + * based on the browser used by the viewers. Response values include `chrome`, + * `firefox`, `edge`, `opera`. - `tag`: Returns analytics for + * videos using this tag. This filter only accepts a single value and is case sensitive. Read more + * about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) * - * @return APIgetLiveStreamsPlaysRequest + * @return APIgetMetricsBreakdownRequest */ - public APIgetLiveStreamsPlaysRequest filter(String filter) { - this.filter = filter; + public APIgetMetricsBreakdownRequest filterBy(FilterBy2 filterBy) { + this.filterBy = filterBy; return this; } @@ -241,9 +790,9 @@ public APIgetLiveStreamsPlaysRequest filter(String filter) { * @param currentPage * Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) * - * @return APIgetLiveStreamsPlaysRequest + * @return APIgetMetricsBreakdownRequest */ - public APIgetLiveStreamsPlaysRequest currentPage(Integer currentPage) { + public APIgetMetricsBreakdownRequest currentPage(Integer currentPage) { this.currentPage = currentPage; return this; } @@ -254,15 +803,15 @@ public APIgetLiveStreamsPlaysRequest currentPage(Integer currentPage) { * @param pageSize * Results per page. Allowed values 1-100, default is 25. (optional, default to 25) * - * @return APIgetLiveStreamsPlaysRequest + * @return APIgetMetricsBreakdownRequest */ - public APIgetLiveStreamsPlaysRequest pageSize(Integer pageSize) { + public APIgetMetricsBreakdownRequest pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** - * Build call for getLiveStreamsPlays + * Build call for getMetricsBreakdown * * @param _callback * ApiCallback API callback @@ -300,18 +849,8 @@ public APIgetLiveStreamsPlaysRequest pageSize(Integer pageSize) { * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -332,13 +871,13 @@ public APIgetLiveStreamsPlaysRequest pageSize(Integer pageSize) { * */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getLiveStreamsPlaysCall(from, dimension, to, filter, currentPage, pageSize, _callback); + return getMetricsBreakdownCall(metric, breakdown, from, to, filterBy, currentPage, pageSize, _callback); } /** - * Execute getLiveStreamsPlays request + * Execute getMetricsBreakdown request * - * @return AnalyticsPlaysResponse + * @return AnalyticsMetricsBreakdownResponse * * @throws ApiException * If fail to call the API, e.g. server error or cannot deserialize the response body @@ -371,18 +910,8 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -402,9 +931,9 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { * * */ - public Page execute() throws ApiException { - ApiResponse localVarResp = getLiveStreamsPlaysWithHttpInfo(from, dimension, to, - filter, currentPage, pageSize); + public Page execute() throws ApiException { + ApiResponse localVarResp = getMetricsBreakdownWithHttpInfo(metric, + breakdown, from, to, filterBy, currentPage, pageSize); return new Page<>(localVarResp.getData().getData(), localVarResp.getData().getPagination(), () -> { try { return copy().currentPage((currentPage == null ? 1 : currentPage) + 1).execute(); @@ -414,19 +943,20 @@ public Page execute() throws ApiException { }); // } - private APIgetLiveStreamsPlaysRequest copy() { - APIgetLiveStreamsPlaysRequest copy = new APIgetLiveStreamsPlaysRequest(from, dimension); + private APIgetMetricsBreakdownRequest copy() { + APIgetMetricsBreakdownRequest copy = new APIgetMetricsBreakdownRequest(metric, breakdown); + copy.from(from); copy.to(to); - copy.filter(filter); + copy.filterBy(filterBy); copy.currentPage(currentPage); copy.pageSize(pageSize); return copy; } /** - * Execute getLiveStreamsPlays request with HTTP info returned + * Execute getMetricsBreakdown request with HTTP info returned * - * @return ApiResponse<AnalyticsPlaysResponse> + * @return ApiResponse<AnalyticsMetricsBreakdownResponse> * * @throws ApiException * If fail to call the API, e.g. server error or cannot deserialize the response body @@ -459,18 +989,8 @@ private APIgetLiveStreamsPlaysRequest copy() { * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -490,12 +1010,12 @@ private APIgetLiveStreamsPlaysRequest copy() { * * */ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getLiveStreamsPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getMetricsBreakdownWithHttpInfo(metric, breakdown, from, to, filterBy, currentPage, pageSize); } /** - * Execute getLiveStreamsPlays request (asynchronously) + * Execute getMetricsBreakdown request (asynchronously) * * @param _callback * The callback to be executed when the API call finishes @@ -533,18 +1053,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcep * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -564,8 +1074,9 @@ public ApiResponse executeWithHttpInfo() throws ApiExcep * * */ - public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { - ApiCallback apiCallback = new ApiCallback() { + public okhttp3.Call executeAsync(final ApiCallback> _callback) + throws ApiException { + ApiCallback apiCallback = new ApiCallback() { @Override public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { @@ -573,7 +1084,7 @@ public void onFailure(ApiException e, int statusCode, Map> } @Override - public void onSuccess(AnalyticsPlaysResponse result, int statusCode, + public void onSuccess(AnalyticsMetricsBreakdownResponse result, int statusCode, Map> responseHeaders) { _callback.onSuccess(new Page<>(result.getData(), result.getPagination(), () -> { try { @@ -594,39 +1105,45 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - return getLiveStreamsPlaysAsync(from, dimension, to, filter, currentPage, pageSize, apiCallback); + return getMetricsBreakdownAsync(metric, breakdown, from, to, filterBy, currentPage, pageSize, apiCallback); } } /** - * Get play events for live stream + * Retrieve metrics in a breakdown of dimensions * - * Retrieve filtered analytics about the number of plays for your live streams in a project. + * Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device + * type. * - * @param from - * Use this query parameter to set the start date for the time period that you want analytics for. - The - * API returns analytics data including the day you set in `from`. - The date you set must be - * **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. + * @param metric + * Use this path parameter to select a metric that you want analytics for. - `play` is the + * number of times your content has been played. - `play-rate` is the ratio that calculates the + * number of plays your content receives divided by its impressions. - `play-total` is the + * total number of times a specific content has been played. You can only use the `media-id` + * breakdown with this metric. - `start` is the number of times playback was started. - + * `end` is the number of times playback has ended with the content watch until the end. - + * `impression` is the number of times your content has been loaded and was ready for playback. * (required) - * @param dimension - * Use this query parameter to define the dimension that you want analytics for. - - * `liveStreamId`: Returns analytics based on the public live stream identifiers. - - * `emittedAt`: Returns analytics based on the times of the play events. The API returns data - * in specific interval groups. When the date period you set in `from` and `to` is - * less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. - * Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the - * viewers' country. The list of supported country names are based on the [GeoNames public - * database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on - * the type of device used by the viewers during the play event. Possible response values are: + * @param breakdown + * Use this path parameter to define a dimension for segmenting analytics data. You must use + * `kebab-case` for path parameters. These are the available dimensions: - + * `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - + * `media-type`: Returns analytics based on the type of content. Possible values: + * `video` and `live-stream`. - `continent`: Returns analytics based on the + * viewers' continent. The list of supported continents names are based on the [GeoNames public + * database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, + * `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: + * Returns analytics based on the viewers' country. The list of supported country names are based on + * the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: + * Returns analytics based on the type of device used by the viewers. Possible response values are: * `computer`, `phone`, `tablet`, `tv`, `console`, - * `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on - * the operating system used by the viewers during the play event. Response values include - * `windows`, `mac osx`, `android`, `ios`, `linux`. - - * `browser`: Returns analytics based on the browser used by the viewers during the play event. - * Response values include `chrome`, `firefox`, `edge`, `opera`. - * (required) + * `wearable`, `unknown`. - `operating-system`: Returns analytics based on + * the operating system used by the viewers. Response values include `windows`, `mac + * osx`, `android`, `ios`, `linux`. - `browser`: Returns + * analytics based on the browser used by the viewers. Response values include `chrome`, + * `firefox`, `edge`, `opera`. (required) * - * @return APIgetLiveStreamsPlaysRequest + * @return APIgetMetricsBreakdownRequest * * @http.response.details * @@ -656,18 +1173,8 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) * * * - * - * - * - * - * * - * + * * *
403Forbidden - Disabled Analytics* X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window - * resets.
- *
404Not FoundUnrecognized request URL* X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -687,16 +1194,18 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) *
*/ - public APIgetLiveStreamsPlaysRequest getLiveStreamsPlays(LocalDate from, String dimension) { - return new APIgetLiveStreamsPlaysRequest(from, dimension); + public APIgetMetricsBreakdownRequest getMetricsBreakdown(String metric, String breakdown) { + return new APIgetMetricsBreakdownRequest(metric, breakdown); } - private okhttp3.Call getVideosPlaysCall(LocalDate from, String dimension, LocalDate to, String filter, - Integer currentPage, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMetricsOverTimeCall(String metric, OffsetDateTime from, OffsetDateTime to, String interval, + FilterBy2 filterBy, Integer currentPage, Integer pageSize, final ApiCallback _callback) + throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/analytics/videos/plays"; + String localVarPath = "/data/timeseries/{metric}".replaceAll("\\{" + "metric" + "\\}", + localVarApiClient.escapeString(metric.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -712,12 +1221,12 @@ private okhttp3.Call getVideosPlaysCall(LocalDate from, String dimension, LocalD localVarQueryParams.addAll(localVarApiClient.parameterToPair("to", to)); } - if (dimension != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("dimension", dimension)); + if (interval != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("interval", interval)); } - if (filter != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); + if (filterBy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterBy", filterBy)); } if (currentPage != null) { @@ -745,84 +1254,137 @@ private okhttp3.Call getVideosPlaysCall(LocalDate from, String dimension, LocalD } @SuppressWarnings("rawtypes") - private okhttp3.Call getVideosPlaysValidateBeforeCall(LocalDate from, String dimension, LocalDate to, String filter, - Integer currentPage, Integer pageSize, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'from' is set - if (from == null) { - throw new ApiException("Missing the required parameter 'from' when calling getVideosPlays"); - } + private okhttp3.Call getMetricsOverTimeValidateBeforeCall(String metric, OffsetDateTime from, OffsetDateTime to, + String interval, FilterBy2 filterBy, Integer currentPage, Integer pageSize, final ApiCallback _callback) + throws ApiException { - // verify the required parameter 'dimension' is set - if (dimension == null) { - throw new ApiException("Missing the required parameter 'dimension' when calling getVideosPlays"); + // verify the required parameter 'metric' is set + if (metric == null) { + throw new ApiException("Missing the required parameter 'metric' when calling getMetricsOverTime"); } - okhttp3.Call localVarCall = getVideosPlaysCall(from, dimension, to, filter, currentPage, pageSize, _callback); + okhttp3.Call localVarCall = getMetricsOverTimeCall(metric, from, to, interval, filterBy, currentPage, pageSize, + _callback); return localVarCall; } - private ApiResponse getVideosPlaysWithHttpInfo(LocalDate from, String dimension, - LocalDate to, String filter, Integer currentPage, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getVideosPlaysValidateBeforeCall(from, dimension, to, filter, currentPage, pageSize, - null); - Type localVarReturnType = new TypeToken() { + private ApiResponse getMetricsOverTimeWithHttpInfo(String metric, + OffsetDateTime from, OffsetDateTime to, String interval, FilterBy2 filterBy, Integer currentPage, + Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getMetricsOverTimeValidateBeforeCall(metric, from, to, interval, filterBy, + currentPage, pageSize, null); + Type localVarReturnType = new TypeToken() { }.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getVideosPlaysAsync(LocalDate from, String dimension, LocalDate to, String filter, - Integer currentPage, Integer pageSize, final ApiCallback _callback) - throws ApiException { - okhttp3.Call localVarCall = getVideosPlaysValidateBeforeCall(from, dimension, to, filter, currentPage, pageSize, - _callback); - Type localVarReturnType = new TypeToken() { + private okhttp3.Call getMetricsOverTimeAsync(String metric, OffsetDateTime from, OffsetDateTime to, String interval, + FilterBy2 filterBy, Integer currentPage, Integer pageSize, + final ApiCallback _callback) throws ApiException { + okhttp3.Call localVarCall = getMetricsOverTimeValidateBeforeCall(metric, from, to, interval, filterBy, + currentPage, pageSize, _callback); + Type localVarReturnType = new TypeToken() { }.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - public class APIgetVideosPlaysRequest { - private final LocalDate from; - private final String dimension; - private LocalDate to; - private String filter; + public class APIgetMetricsOverTimeRequest { + private final String metric; + private OffsetDateTime from; + private OffsetDateTime to; + private String interval; + private FilterBy2 filterBy; private Integer currentPage; private Integer pageSize; - private APIgetVideosPlaysRequest(LocalDate from, String dimension) { + private APIgetMetricsOverTimeRequest(String metric) { + this.metric = metric; + } + + /** + * Set from + * + * @param from + * Use this query parameter to define the starting date-time of the period you want analytics for. - + * If you do not set a value for `from`, the default assigned value is 1 day ago, based on + * the `to` parameter. - The maximum value is 30 days ago. - The value you provide should + * follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + * + * @return APIgetMetricsOverTimeRequest + */ + public APIgetMetricsOverTimeRequest from(OffsetDateTime from) { this.from = from; - this.dimension = dimension; + return this; } /** * Set to * * @param to - * Use this optional query parameter to set the end date for the time period that you want analytics - * for. - If you do not specify a `to` date, the API returns analytics data starting from - * the `from` date up until today, and excluding today. - The date you set must be **within - * the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - * (optional) + * Use this query parameter to define the ending date-time of the period you want analytics for. - If + * you do not set a value for `to`, the default assigned value is `now`. - The + * value for `to` is a non-inclusive value: the API returns data **before** the date-time + * that you set. (optional) * - * @return APIgetVideosPlaysRequest + * @return APIgetMetricsOverTimeRequest */ - public APIgetVideosPlaysRequest to(LocalDate to) { + public APIgetMetricsOverTimeRequest to(OffsetDateTime to) { this.to = to; return this; } /** - * Set filter + * Set interval * - * @param filter - * Use this query parameter to filter your results to a specific video in a project that you want - * analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + * @param interval + * Use this query parameter to define how granularity of the data. Possible values: `hour`, + * `day`. - Default: If no interval specified and the period (different between from and + * to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and + * the period you set using the `from` and `to` parameters is less than or equals + * to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to + * `day`. (optional) * - * @return APIgetVideosPlaysRequest + * @return APIgetMetricsOverTimeRequest */ - public APIgetVideosPlaysRequest filter(String filter) { - this.filter = filter; + public APIgetMetricsOverTimeRequest interval(String interval) { + this.interval = interval; + return this; + } + + /** + * Set filterBy + * + * @param filterBy + * Use this parameter to filter the API's response based on different data dimensions. You can + * serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do + * not set a value for `filterBy`, the API returns the full dataset for your project. - The + * API only accepts the `mediaId` and `mediaType` filters when you call + * `/data/metrics/play/total`. These are the available breakdown dimensions: - + * `mediaId`: Returns analytics based on the unique identifiers of a video or a live + * stream. - `mediaType`: Returns analytics based on the type of content. Possible values: + * `video` and `live-stream`. - `continent`: Returns analytics based on + * the viewers' continent. The list of supported continents names are based on the [GeoNames + * public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, + * for example `EU`. Possible values are: `AS`, `AF`, `NA`, + * `SA`, `AN`, `EU`, `AZ`. - `country`: Returns + * analytics based on the viewers' country. The list of supported country names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 + * format, for example `FR`. - `deviceType`: Returns analytics based on the type + * of device used by the viewers. Possible response values are: `computer`, + * `phone`, `tablet`, `tv`, `console`, `wearable`, + * `unknown`. - `operatingSystem`: Returns analytics based on the operating + * system used by the viewers. Response values include `windows`, `mac osx`, + * `android`, `ios`, `linux`. - `browser`: Returns analytics + * based on the browser used by the viewers. Response values include `chrome`, + * `firefox`, `edge`, `opera`. - `tag`: Returns analytics for + * videos using this tag. This filter only accepts a single value and is case sensitive. Read more + * about tagging your videos [here](https://docs.api.video/vod/tags-metadata). (optional) + * + * @return APIgetMetricsOverTimeRequest + */ + public APIgetMetricsOverTimeRequest filterBy(FilterBy2 filterBy) { + this.filterBy = filterBy; return this; } @@ -832,9 +1394,9 @@ public APIgetVideosPlaysRequest filter(String filter) { * @param currentPage * Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) * - * @return APIgetVideosPlaysRequest + * @return APIgetMetricsOverTimeRequest */ - public APIgetVideosPlaysRequest currentPage(Integer currentPage) { + public APIgetMetricsOverTimeRequest currentPage(Integer currentPage) { this.currentPage = currentPage; return this; } @@ -845,15 +1407,15 @@ public APIgetVideosPlaysRequest currentPage(Integer currentPage) { * @param pageSize * Results per page. Allowed values 1-100, default is 25. (optional, default to 25) * - * @return APIgetVideosPlaysRequest + * @return APIgetMetricsOverTimeRequest */ - public APIgetVideosPlaysRequest pageSize(Integer pageSize) { + public APIgetMetricsOverTimeRequest pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** - * Build call for getVideosPlays + * Build call for getMetricsOverTime * * @param _callback * ApiCallback API callback @@ -891,18 +1453,8 @@ public APIgetVideosPlaysRequest pageSize(Integer pageSize) { * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -923,13 +1475,13 @@ public APIgetVideosPlaysRequest pageSize(Integer pageSize) { * */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getVideosPlaysCall(from, dimension, to, filter, currentPage, pageSize, _callback); + return getMetricsOverTimeCall(metric, from, to, interval, filterBy, currentPage, pageSize, _callback); } /** - * Execute getVideosPlays request + * Execute getMetricsOverTime request * - * @return AnalyticsPlaysResponse + * @return AnalyticsMetricsOverTimeResponse * * @throws ApiException * If fail to call the API, e.g. server error or cannot deserialize the response body @@ -962,18 +1514,8 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -993,9 +1535,9 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { * * */ - public Page execute() throws ApiException { - ApiResponse localVarResp = getVideosPlaysWithHttpInfo(from, dimension, to, filter, - currentPage, pageSize); + public Page execute() throws ApiException { + ApiResponse localVarResp = getMetricsOverTimeWithHttpInfo(metric, from, + to, interval, filterBy, currentPage, pageSize); return new Page<>(localVarResp.getData().getData(), localVarResp.getData().getPagination(), () -> { try { return copy().currentPage((currentPage == null ? 1 : currentPage) + 1).execute(); @@ -1005,19 +1547,21 @@ public Page execute() throws ApiException { }); // } - private APIgetVideosPlaysRequest copy() { - APIgetVideosPlaysRequest copy = new APIgetVideosPlaysRequest(from, dimension); + private APIgetMetricsOverTimeRequest copy() { + APIgetMetricsOverTimeRequest copy = new APIgetMetricsOverTimeRequest(metric); + copy.from(from); copy.to(to); - copy.filter(filter); + copy.interval(interval); + copy.filterBy(filterBy); copy.currentPage(currentPage); copy.pageSize(pageSize); return copy; } /** - * Execute getVideosPlays request with HTTP info returned + * Execute getMetricsOverTime request with HTTP info returned * - * @return ApiResponse<AnalyticsPlaysResponse> + * @return ApiResponse<AnalyticsMetricsOverTimeResponse> * * @throws ApiException * If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1050,18 +1594,8 @@ private APIgetVideosPlaysRequest copy() { * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -1081,12 +1615,12 @@ private APIgetVideosPlaysRequest copy() { * * */ - public ApiResponse executeWithHttpInfo() throws ApiException { - return getVideosPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); + public ApiResponse executeWithHttpInfo() throws ApiException { + return getMetricsOverTimeWithHttpInfo(metric, from, to, interval, filterBy, currentPage, pageSize); } /** - * Execute getVideosPlays request (asynchronously) + * Execute getMetricsOverTime request (asynchronously) * * @param _callback * The callback to be executed when the API call finishes @@ -1124,18 +1658,8 @@ public ApiResponse executeWithHttpInfo() throws ApiExcep * * * - * 403 - * Forbidden - Disabled Analytics - * * X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit - * window resets.
- * - * - * * 404 - * Not Found + * Unrecognized request URL * * X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -1155,8 +1679,9 @@ public ApiResponse executeWithHttpInfo() throws ApiExcep * * */ - public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { - ApiCallback apiCallback = new ApiCallback() { + public okhttp3.Call executeAsync(final ApiCallback> _callback) + throws ApiException { + ApiCallback apiCallback = new ApiCallback() { @Override public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { @@ -1164,7 +1689,7 @@ public void onFailure(ApiException e, int statusCode, Map> } @Override - public void onSuccess(AnalyticsPlaysResponse result, int statusCode, + public void onSuccess(AnalyticsMetricsOverTimeResponse result, int statusCode, Map> responseHeaders) { _callback.onSuccess(new Page<>(result.getData(), result.getPagination(), () -> { try { @@ -1185,38 +1710,24 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - return getVideosPlaysAsync(from, dimension, to, filter, currentPage, pageSize, apiCallback); + return getMetricsOverTimeAsync(metric, from, to, interval, filterBy, currentPage, pageSize, apiCallback); } } /** - * Get play events for video + * Retrieve metrics over time * - * Retrieve filtered analytics about the number of plays for your videos in a project. + * Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred * - * @param from - * Use this query parameter to set the start date for the time period that you want analytics for. - The - * API returns analytics data including the day you set in `from`. - The date you set must be - * **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - * (required) - * @param dimension - * Use this query parameter to define the dimension that you want analytics for. - `videoId`: - * Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics - * based on the times of the play events. The API returns data in specific interval groups. When the date - * period you set in `from` and `to` is less than or equals to 2 days, the response - * for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - - * `country`: Returns analytics based on the viewers' country. The list of supported - * country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - - * `deviceType`: Returns analytics based on the type of device used by the viewers during the - * play event. Possible response values are: `computer`, `phone`, `tablet`, - * `tv`, `console`, `wearable`, `unknown`. - - * `operatingSystem`: Returns analytics based on the operating system used by the viewers - * during the play event. Response values include `windows`, `mac osx`, - * `android`, `ios`, `linux`. - `browser`: Returns analytics - * based on the browser used by the viewers during the play event. Response values include - * `chrome`, `firefox`, `edge`, `opera`. (required) + * @param metric + * Use this path parameter to select a metric that you want analytics for. - `play` is the + * number of times your content has been played. - `play-rate` is the ratio that calculates the + * number of plays your content receives divided by its impressions. - `start` is the number of + * times playback was started. - `end` is the number of times playback has ended with the + * content watch until the end. - `impression` is the number of times your content has been + * loaded and was ready for playback. (required) * - * @return APIgetVideosPlaysRequest + * @return APIgetMetricsOverTimeRequest * * @http.response.details * @@ -1246,18 +1757,8 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) * * * - * - * - * - * - * * - * + * * *
403Forbidden - Disabled Analytics* X-RateLimit-Limit - The request limit per minute.
- * * X-RateLimit-Remaining - The number of available requests left for the current time - * window.
- * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window - * resets.
- *
404Not FoundUnrecognized request URL* X-RateLimit-Limit - The request limit per minute.
* * X-RateLimit-Remaining - The number of available requests left for the current time * window.
@@ -1277,7 +1778,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) *
*/ - public APIgetVideosPlaysRequest getVideosPlays(LocalDate from, String dimension) { - return new APIgetVideosPlaysRequest(from, dimension); + public APIgetMetricsOverTimeRequest getMetricsOverTime(String metric) { + return new APIgetMetricsOverTimeRequest(metric); } } diff --git a/src/main/java/video/api/client/api/clients/LiveStreamsApi.java b/src/main/java/video/api/client/api/clients/LiveStreamsApi.java index 9d782a9..28c64e6 100644 --- a/src/main/java/video/api/client/api/clients/LiveStreamsApi.java +++ b/src/main/java/video/api/client/api/clients/LiveStreamsApi.java @@ -2154,4 +2154,277 @@ public okhttp3.Call deleteThumbnailAsync(String liveStreamId, final ApiCallback< return localVarCall; } + /** + * Build call for complete + * + * @param liveStreamId + * The unique ID for the live stream you want to complete. (required) + * @param _callback + * Callback for upload/download progress + * + * @return Call to execute + * + * @throws ApiException + * If fail to serialize the request body object + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
202Accepted* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
404Not Found* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
+ */ + private okhttp3.Call completeCall(String liveStreamId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/live-streams/{liveStreamId}/complete".replaceAll("\\{" + "liveStreamId" + "\\}", + localVarApiClient.escapeString(liveStreamId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { "application/json" }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, + localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call completeValidateBeforeCall(String liveStreamId, final ApiCallback _callback) + throws ApiException { + + // verify the required parameter 'liveStreamId' is set + if (liveStreamId == null) { + throw new ApiException("Missing the required parameter 'liveStreamId' when calling complete"); + } + + okhttp3.Call localVarCall = completeCall(liveStreamId, _callback); + return localVarCall; + } + + /** + * Complete a live stream + * + * Request the completion of a live stream that is currently running. This operation is asynchronous and the live + * stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS + * manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps + * the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + * + * @param liveStreamId + * The unique ID for the live stream you want to complete. (required) + * + * @throws ApiException + * If fail to call the API, e.g. server error or cannot deserialize the response body + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
202Accepted* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
404Not Found* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
+ */ + public void complete(String liveStreamId) throws ApiException { + completeWithHttpInfo(liveStreamId); + } + + /** + * Complete a live stream + * + * Request the completion of a live stream that is currently running. This operation is asynchronous and the live + * stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS + * manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps + * the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + * + * @param liveStreamId + * The unique ID for the live stream you want to complete. (required) + * + * @return ApiResponse<Void> + * + * @throws ApiException + * If fail to call the API, e.g. server error or cannot deserialize the response body + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
202Accepted* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
404Not Found* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
+ */ + public ApiResponse completeWithHttpInfo(String liveStreamId) throws ApiException { + okhttp3.Call localVarCall = completeValidateBeforeCall(liveStreamId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Complete a live stream (asynchronously) Request the completion of a live stream that is currently running. This + * operation is asynchronous and the live stream will stop after a few seconds. The API adds the + * `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and + * also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at + * most 1 minute, which can be used to terminate the stream. + * + * @param liveStreamId + * The unique ID for the live stream you want to complete. (required) + * @param _callback + * The callback to be executed when the API call finishes + * + * @return The request call + * + * @throws ApiException + * If fail to process the API call, e.g. serializing the request body object + * + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Status CodeDescriptionResponse Headers
202Accepted* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
404Not Found* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
429Too Many Requests* X-RateLimit-Limit - The request limit per minute.
+ * * X-RateLimit-Remaining - The number of available requests left for the current time + * window.
+ * * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window + * resets.
+ *
+ */ + public okhttp3.Call completeAsync(String liveStreamId, final ApiCallback _callback) throws ApiException { + okhttp3.Call localVarCall = completeValidateBeforeCall(liveStreamId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + } diff --git a/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponse.java b/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponse.java new file mode 100644 index 0000000..06f3132 --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponse.java @@ -0,0 +1,120 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import video.api.client.api.models.AnalyticsAggregatedMetricsResponseContext; +import java.io.Serializable; + +/** + * AnalyticsAggregatedMetricsResponse + */ + +public class AnalyticsAggregatedMetricsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONTEXT = "context"; + @SerializedName(SERIALIZED_NAME_CONTEXT) + private AnalyticsAggregatedMetricsResponseContext context; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private Float data; + + public AnalyticsAggregatedMetricsResponse context(AnalyticsAggregatedMetricsResponseContext context) { + this.context = context; + return this; + } + + /** + * Get context + * + * @return context + **/ + @ApiModelProperty(required = true, value = "") + + public AnalyticsAggregatedMetricsResponseContext getContext() { + return context; + } + + public void setContext(AnalyticsAggregatedMetricsResponseContext context) { + this.context = context; + } + + public AnalyticsAggregatedMetricsResponse data(Float data) { + this.data = data; + return this; + } + + /** + * Get data + * + * @return data + **/ + @ApiModelProperty(example = "356.2", required = true, value = "") + + public Float getData() { + return data; + } + + public void setData(Float data) { + this.data = data; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsAggregatedMetricsResponse analyticsAggregatedMetricsResponse = (AnalyticsAggregatedMetricsResponse) o; + return Objects.equals(this.context, analyticsAggregatedMetricsResponse.context) + && Objects.equals(this.data, analyticsAggregatedMetricsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(context, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsAggregatedMetricsResponse {\n"); + sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContext.java b/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContext.java new file mode 100644 index 0000000..c86de95 --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContext.java @@ -0,0 +1,258 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import video.api.client.api.models.AnalyticsAggregatedMetricsResponseContextTimeframe; +import java.io.Serializable; + +/** + * AnalyticsAggregatedMetricsResponseContext + */ + +public class AnalyticsAggregatedMetricsResponseContext implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Returns the metric you selected. + */ + @JsonAdapter(MetricEnum.Adapter.class) + public enum MetricEnum { + PLAY("play"), + + START("start"), + + END("end"), + + IMPRESSION("impression"), + + IMPRESSION_TIME("impression-time"), + + WATCH_TIME("watch-time"); + + private String value; + + MetricEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetricEnum fromValue(String value) { + for (MetricEnum b : MetricEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetricEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetricEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetricEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_METRIC = "metric"; + @SerializedName(SERIALIZED_NAME_METRIC) + private MetricEnum metric; + + /** + * Returns the aggregation you selected. + */ + @JsonAdapter(AggregationEnum.Adapter.class) + public enum AggregationEnum { + COUNT("count"), + + RATE("rate"), + + TOTAL("total"), + + AVERAGE("average"), + + SUM("sum"); + + private String value; + + AggregationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AggregationEnum fromValue(String value) { + for (AggregationEnum b : AggregationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AggregationEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AggregationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AggregationEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_AGGREGATION = "aggregation"; + @SerializedName(SERIALIZED_NAME_AGGREGATION) + private AggregationEnum aggregation; + + public static final String SERIALIZED_NAME_TIMEFRAME = "timeframe"; + @SerializedName(SERIALIZED_NAME_TIMEFRAME) + private AnalyticsAggregatedMetricsResponseContextTimeframe timeframe; + + public AnalyticsAggregatedMetricsResponseContext metric(MetricEnum metric) { + this.metric = metric; + return this; + } + + /** + * Returns the metric you selected. + * + * @return metric + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "impression", value = "Returns the metric you selected.") + + public MetricEnum getMetric() { + return metric; + } + + public void setMetric(MetricEnum metric) { + this.metric = metric; + } + + public AnalyticsAggregatedMetricsResponseContext aggregation(AggregationEnum aggregation) { + this.aggregation = aggregation; + return this; + } + + /** + * Returns the aggregation you selected. + * + * @return aggregation + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "count", value = "Returns the aggregation you selected.") + + public AggregationEnum getAggregation() { + return aggregation; + } + + public void setAggregation(AggregationEnum aggregation) { + this.aggregation = aggregation; + } + + public AnalyticsAggregatedMetricsResponseContext timeframe( + AnalyticsAggregatedMetricsResponseContextTimeframe timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * Get timeframe + * + * @return timeframe + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public AnalyticsAggregatedMetricsResponseContextTimeframe getTimeframe() { + return timeframe; + } + + public void setTimeframe(AnalyticsAggregatedMetricsResponseContextTimeframe timeframe) { + this.timeframe = timeframe; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsAggregatedMetricsResponseContext analyticsAggregatedMetricsResponseContext = (AnalyticsAggregatedMetricsResponseContext) o; + return Objects.equals(this.metric, analyticsAggregatedMetricsResponseContext.metric) + && Objects.equals(this.aggregation, analyticsAggregatedMetricsResponseContext.aggregation) + && Objects.equals(this.timeframe, analyticsAggregatedMetricsResponseContext.timeframe); + } + + @Override + public int hashCode() { + return Objects.hash(metric, aggregation, timeframe); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsAggregatedMetricsResponseContext {\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContextTimeframe.java b/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContextTimeframe.java new file mode 100644 index 0000000..e58b434 --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsAggregatedMetricsResponseContextTimeframe.java @@ -0,0 +1,123 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.io.Serializable; + +/** + * Returns the starting and ending date-times of the period you want analytics for. + */ +@ApiModel(description = "Returns the starting and ending date-times of the period you want analytics for.") + +public class AnalyticsAggregatedMetricsResponseContextTimeframe implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + private OffsetDateTime from; + + public static final String SERIALIZED_NAME_TO = "to"; + @SerializedName(SERIALIZED_NAME_TO) + private OffsetDateTime to; + + public AnalyticsAggregatedMetricsResponseContextTimeframe from(OffsetDateTime from) { + this.from = from; + return this; + } + + /** + * Returns the starting date-time of the period you want analytics for in ATOM date-time format. + * + * @return from + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2024-05-28T11:15:07Z", value = "Returns the starting date-time of the period you want analytics for in ATOM date-time format.") + + public OffsetDateTime getFrom() { + return from; + } + + public void setFrom(OffsetDateTime from) { + this.from = from; + } + + public AnalyticsAggregatedMetricsResponseContextTimeframe to(OffsetDateTime to) { + this.to = to; + return this; + } + + /** + * Returns the starting date-time of the period you want analytics for in ATOM date-time format. + * + * @return to + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2024-05-29T11:15:07Z", value = "Returns the starting date-time of the period you want analytics for in ATOM date-time format.") + + public OffsetDateTime getTo() { + return to; + } + + public void setTo(OffsetDateTime to) { + this.to = to; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsAggregatedMetricsResponseContextTimeframe analyticsAggregatedMetricsResponseContextTimeframe = (AnalyticsAggregatedMetricsResponseContextTimeframe) o; + return Objects.equals(this.from, analyticsAggregatedMetricsResponseContextTimeframe.from) + && Objects.equals(this.to, analyticsAggregatedMetricsResponseContextTimeframe.to); + } + + @Override + public int hashCode() { + return Objects.hash(from, to); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsAggregatedMetricsResponseContextTimeframe {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponse.java b/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponse.java new file mode 100644 index 0000000..79938a6 --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponse.java @@ -0,0 +1,155 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import video.api.client.api.models.AnalyticsMetricsBreakdownResponseContext; +import video.api.client.api.models.AnalyticsMetricsBreakdownResponseData; +import video.api.client.api.models.Pagination; +import java.io.Serializable; + +/** + * AnalyticsMetricsBreakdownResponse + */ + +public class AnalyticsMetricsBreakdownResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONTEXT = "context"; + @SerializedName(SERIALIZED_NAME_CONTEXT) + private AnalyticsMetricsBreakdownResponseContext context; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + private Pagination pagination; + + public AnalyticsMetricsBreakdownResponse context(AnalyticsMetricsBreakdownResponseContext context) { + this.context = context; + return this; + } + + /** + * Get context + * + * @return context + **/ + @ApiModelProperty(required = true, value = "") + + public AnalyticsMetricsBreakdownResponseContext getContext() { + return context; + } + + public void setContext(AnalyticsMetricsBreakdownResponseContext context) { + this.context = context; + } + + public AnalyticsMetricsBreakdownResponse data(List data) { + this.data = data; + return this; + } + + public AnalyticsMetricsBreakdownResponse addDataItem(AnalyticsMetricsBreakdownResponseData dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * Returns an array of dimensions and their respective metrics. + * + * @return data + **/ + @ApiModelProperty(required = true, value = "Returns an array of dimensions and their respective metrics.") + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public AnalyticsMetricsBreakdownResponse pagination(Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * + * @return pagination + **/ + @ApiModelProperty(required = true, value = "") + + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsMetricsBreakdownResponse analyticsMetricsBreakdownResponse = (AnalyticsMetricsBreakdownResponse) o; + return Objects.equals(this.context, analyticsMetricsBreakdownResponse.context) + && Objects.equals(this.data, analyticsMetricsBreakdownResponse.data) + && Objects.equals(this.pagination, analyticsMetricsBreakdownResponse.pagination); + } + + @Override + public int hashCode() { + return Objects.hash(context, data, pagination); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsMetricsBreakdownResponse {\n"); + sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseContext.java b/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseContext.java new file mode 100644 index 0000000..e76b75c --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseContext.java @@ -0,0 +1,260 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import video.api.client.api.models.AnalyticsAggregatedMetricsResponseContextTimeframe; +import java.io.Serializable; + +/** + * AnalyticsMetricsBreakdownResponseContext + */ + +public class AnalyticsMetricsBreakdownResponseContext implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Returns the metric you selected. + */ + @JsonAdapter(MetricEnum.Adapter.class) + public enum MetricEnum { + PLAY("play"), + + PLAY_RATE("play-rate"), + + START("start"), + + END("end"), + + IMPRESSION("impression"); + + private String value; + + MetricEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetricEnum fromValue(String value) { + for (MetricEnum b : MetricEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetricEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetricEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetricEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_METRIC = "metric"; + @SerializedName(SERIALIZED_NAME_METRIC) + private MetricEnum metric; + + /** + * Returns the dimension you selected. + */ + @JsonAdapter(BreakdownEnum.Adapter.class) + public enum BreakdownEnum { + MEDIA_ID("media-id"), + + MEDIA_TYPE("media-type"), + + CONTINENT("continent"), + + COUNTRY("country"), + + DEVICE_TYPE("device-type"), + + OPERATING_SYSTEM("operating-system"), + + BROWSER("browser"); + + private String value; + + BreakdownEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BreakdownEnum fromValue(String value) { + for (BreakdownEnum b : BreakdownEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BreakdownEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BreakdownEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BreakdownEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BREAKDOWN = "breakdown"; + @SerializedName(SERIALIZED_NAME_BREAKDOWN) + private BreakdownEnum breakdown; + + public static final String SERIALIZED_NAME_TIMEFRAME = "timeframe"; + @SerializedName(SERIALIZED_NAME_TIMEFRAME) + private AnalyticsAggregatedMetricsResponseContextTimeframe timeframe; + + public AnalyticsMetricsBreakdownResponseContext metric(MetricEnum metric) { + this.metric = metric; + return this; + } + + /** + * Returns the metric you selected. + * + * @return metric + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "impression", value = "Returns the metric you selected.") + + public MetricEnum getMetric() { + return metric; + } + + public void setMetric(MetricEnum metric) { + this.metric = metric; + } + + public AnalyticsMetricsBreakdownResponseContext breakdown(BreakdownEnum breakdown) { + this.breakdown = breakdown; + return this; + } + + /** + * Returns the dimension you selected. + * + * @return breakdown + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "country", value = "Returns the dimension you selected.") + + public BreakdownEnum getBreakdown() { + return breakdown; + } + + public void setBreakdown(BreakdownEnum breakdown) { + this.breakdown = breakdown; + } + + public AnalyticsMetricsBreakdownResponseContext timeframe( + AnalyticsAggregatedMetricsResponseContextTimeframe timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * Get timeframe + * + * @return timeframe + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public AnalyticsAggregatedMetricsResponseContextTimeframe getTimeframe() { + return timeframe; + } + + public void setTimeframe(AnalyticsAggregatedMetricsResponseContextTimeframe timeframe) { + this.timeframe = timeframe; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsMetricsBreakdownResponseContext analyticsMetricsBreakdownResponseContext = (AnalyticsMetricsBreakdownResponseContext) o; + return Objects.equals(this.metric, analyticsMetricsBreakdownResponseContext.metric) + && Objects.equals(this.breakdown, analyticsMetricsBreakdownResponseContext.breakdown) + && Objects.equals(this.timeframe, analyticsMetricsBreakdownResponseContext.timeframe); + } + + @Override + public int hashCode() { + return Objects.hash(metric, breakdown, timeframe); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsMetricsBreakdownResponseContext {\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" breakdown: ").append(toIndentedString(breakdown)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseData.java b/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseData.java new file mode 100644 index 0000000..abbe3c5 --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsMetricsBreakdownResponseData.java @@ -0,0 +1,123 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.io.Serializable; + +/** + * AnalyticsMetricsBreakdownResponseData + */ + +public class AnalyticsMetricsBreakdownResponseData implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_DIMENSION_VALUE = "dimensionValue"; + @SerializedName(SERIALIZED_NAME_DIMENSION_VALUE) + private String dimensionValue; + + public static final String SERIALIZED_NAME_METRIC_VALUE = "metricValue"; + @SerializedName(SERIALIZED_NAME_METRIC_VALUE) + private Float metricValue; + + public AnalyticsMetricsBreakdownResponseData dimensionValue(String dimensionValue) { + this.dimensionValue = dimensionValue; + return this; + } + + /** + * Returns a specific value for the dimension you selected, based on the data. For example if you select + * `continent` as a dimension, then `dimensionValue` returns values like `EU` or + * \"AZ\". + * + * @return dimensionValue + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\".") + + public String getDimensionValue() { + return dimensionValue; + } + + public void setDimensionValue(String dimensionValue) { + this.dimensionValue = dimensionValue; + } + + public AnalyticsMetricsBreakdownResponseData metricValue(Float metricValue) { + this.metricValue = metricValue; + return this; + } + + /** + * Returns the data for a specific dimension value. + * + * @return metricValue + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Returns the data for a specific dimension value.") + + public Float getMetricValue() { + return metricValue; + } + + public void setMetricValue(Float metricValue) { + this.metricValue = metricValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsMetricsBreakdownResponseData analyticsMetricsBreakdownResponseData = (AnalyticsMetricsBreakdownResponseData) o; + return Objects.equals(this.dimensionValue, analyticsMetricsBreakdownResponseData.dimensionValue) + && Objects.equals(this.metricValue, analyticsMetricsBreakdownResponseData.metricValue); + } + + @Override + public int hashCode() { + return Objects.hash(dimensionValue, metricValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsMetricsBreakdownResponseData {\n"); + sb.append(" dimensionValue: ").append(toIndentedString(dimensionValue)).append("\n"); + sb.append(" metricValue: ").append(toIndentedString(metricValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponse.java b/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponse.java new file mode 100644 index 0000000..cb3cc12 --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponse.java @@ -0,0 +1,155 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import video.api.client.api.models.AnalyticsMetricsOverTimeResponseContext; +import video.api.client.api.models.AnalyticsMetricsOverTimeResponseData; +import video.api.client.api.models.Pagination; +import java.io.Serializable; + +/** + * AnalyticsMetricsOverTimeResponse + */ + +public class AnalyticsMetricsOverTimeResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_CONTEXT = "context"; + @SerializedName(SERIALIZED_NAME_CONTEXT) + private AnalyticsMetricsOverTimeResponseContext context; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + private Pagination pagination; + + public AnalyticsMetricsOverTimeResponse context(AnalyticsMetricsOverTimeResponseContext context) { + this.context = context; + return this; + } + + /** + * Get context + * + * @return context + **/ + @ApiModelProperty(required = true, value = "") + + public AnalyticsMetricsOverTimeResponseContext getContext() { + return context; + } + + public void setContext(AnalyticsMetricsOverTimeResponseContext context) { + this.context = context; + } + + public AnalyticsMetricsOverTimeResponse data(List data) { + this.data = data; + return this; + } + + public AnalyticsMetricsOverTimeResponse addDataItem(AnalyticsMetricsOverTimeResponseData dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * Returns an array of metrics and the timestamps . + * + * @return data + **/ + @ApiModelProperty(required = true, value = "Returns an array of metrics and the timestamps .") + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public AnalyticsMetricsOverTimeResponse pagination(Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * + * @return pagination + **/ + @ApiModelProperty(required = true, value = "") + + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsMetricsOverTimeResponse analyticsMetricsOverTimeResponse = (AnalyticsMetricsOverTimeResponse) o; + return Objects.equals(this.context, analyticsMetricsOverTimeResponse.context) + && Objects.equals(this.data, analyticsMetricsOverTimeResponse.data) + && Objects.equals(this.pagination, analyticsMetricsOverTimeResponse.pagination); + } + + @Override + public int hashCode() { + return Objects.hash(context, data, pagination); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsMetricsOverTimeResponse {\n"); + sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseContext.java b/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseContext.java new file mode 100644 index 0000000..2a5831a --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseContext.java @@ -0,0 +1,250 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import video.api.client.api.models.AnalyticsAggregatedMetricsResponseContextTimeframe; +import java.io.Serializable; + +/** + * AnalyticsMetricsOverTimeResponseContext + */ + +public class AnalyticsMetricsOverTimeResponseContext implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * Returns the metric you selected. + */ + @JsonAdapter(MetricEnum.Adapter.class) + public enum MetricEnum { + PLAY("play"), + + PLAY_RATE("play-rate"), + + START("start"), + + END("end"), + + IMPRESSION("impression"); + + private String value; + + MetricEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetricEnum fromValue(String value) { + for (MetricEnum b : MetricEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetricEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetricEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetricEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_METRIC = "metric"; + @SerializedName(SERIALIZED_NAME_METRIC) + private MetricEnum metric; + + /** + * Returns the interval you selected. + */ + @JsonAdapter(IntervalEnum.Adapter.class) + public enum IntervalEnum { + HOUR("hour"), + + DAY("day"); + + private String value; + + IntervalEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IntervalEnum fromValue(String value) { + for (IntervalEnum b : IntervalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IntervalEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IntervalEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IntervalEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + @SerializedName(SERIALIZED_NAME_INTERVAL) + private IntervalEnum interval; + + public static final String SERIALIZED_NAME_TIMEFRAME = "timeframe"; + @SerializedName(SERIALIZED_NAME_TIMEFRAME) + private AnalyticsAggregatedMetricsResponseContextTimeframe timeframe; + + public AnalyticsMetricsOverTimeResponseContext metric(MetricEnum metric) { + this.metric = metric; + return this; + } + + /** + * Returns the metric you selected. + * + * @return metric + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "impression", value = "Returns the metric you selected.") + + public MetricEnum getMetric() { + return metric; + } + + public void setMetric(MetricEnum metric) { + this.metric = metric; + } + + public AnalyticsMetricsOverTimeResponseContext interval(IntervalEnum interval) { + this.interval = interval; + return this; + } + + /** + * Returns the interval you selected. + * + * @return interval + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "day", value = "Returns the interval you selected.") + + public IntervalEnum getInterval() { + return interval; + } + + public void setInterval(IntervalEnum interval) { + this.interval = interval; + } + + public AnalyticsMetricsOverTimeResponseContext timeframe( + AnalyticsAggregatedMetricsResponseContextTimeframe timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * Get timeframe + * + * @return timeframe + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public AnalyticsAggregatedMetricsResponseContextTimeframe getTimeframe() { + return timeframe; + } + + public void setTimeframe(AnalyticsAggregatedMetricsResponseContextTimeframe timeframe) { + this.timeframe = timeframe; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsMetricsOverTimeResponseContext analyticsMetricsOverTimeResponseContext = (AnalyticsMetricsOverTimeResponseContext) o; + return Objects.equals(this.metric, analyticsMetricsOverTimeResponseContext.metric) + && Objects.equals(this.interval, analyticsMetricsOverTimeResponseContext.interval) + && Objects.equals(this.timeframe, analyticsMetricsOverTimeResponseContext.timeframe); + } + + @Override + public int hashCode() { + return Objects.hash(metric, interval, timeframe); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsMetricsOverTimeResponseContext {\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseData.java b/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseData.java new file mode 100644 index 0000000..f4676a7 --- /dev/null +++ b/src/main/java/video/api/client/api/models/AnalyticsMetricsOverTimeResponseData.java @@ -0,0 +1,123 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.io.Serializable; + +/** + * AnalyticsMetricsOverTimeResponseData + */ + +public class AnalyticsMetricsOverTimeResponseData implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_EMITTED_AT = "emittedAt"; + @SerializedName(SERIALIZED_NAME_EMITTED_AT) + private String emittedAt; + + public static final String SERIALIZED_NAME_METRIC_VALUE = "metricValue"; + @SerializedName(SERIALIZED_NAME_METRIC_VALUE) + private Float metricValue; + + public AnalyticsMetricsOverTimeResponseData emittedAt(String emittedAt) { + this.emittedAt = emittedAt; + return this; + } + + /** + * Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if + * you set `play` with an `hour` interval in your request, then `emittedAt` returns + * the hourly timestamps of every play event within the timeframe you defined. + * + * @return emittedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined.") + + public String getEmittedAt() { + return emittedAt; + } + + public void setEmittedAt(String emittedAt) { + this.emittedAt = emittedAt; + } + + public AnalyticsMetricsOverTimeResponseData metricValue(Float metricValue) { + this.metricValue = metricValue; + return this; + } + + /** + * Returns the data for a specific metric value. + * + * @return metricValue + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Returns the data for a specific metric value.") + + public Float getMetricValue() { + return metricValue; + } + + public void setMetricValue(Float metricValue) { + this.metricValue = metricValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalyticsMetricsOverTimeResponseData analyticsMetricsOverTimeResponseData = (AnalyticsMetricsOverTimeResponseData) o; + return Objects.equals(this.emittedAt, analyticsMetricsOverTimeResponseData.emittedAt) + && Objects.equals(this.metricValue, analyticsMetricsOverTimeResponseData.metricValue); + } + + @Override + public int hashCode() { + return Objects.hash(emittedAt, metricValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalyticsMetricsOverTimeResponseData {\n"); + sb.append(" emittedAt: ").append(toIndentedString(emittedAt)).append("\n"); + sb.append(" metricValue: ").append(toIndentedString(metricValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/FilterBy.java b/src/main/java/video/api/client/api/models/FilterBy.java new file mode 100644 index 0000000..6c27a1f --- /dev/null +++ b/src/main/java/video/api/client/api/models/FilterBy.java @@ -0,0 +1,395 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.io.Serializable; + +/** + * FilterBy + */ + +public class FilterBy implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MEDIA_ID = "mediaId"; + @SerializedName(SERIALIZED_NAME_MEDIA_ID) + private String mediaId; + + /** + * Gets or Sets mediaType + */ + @JsonAdapter(MediaTypeEnum.Adapter.class) + public enum MediaTypeEnum { + VIDEO("video"), + + LIVE_STREAM("live-stream"); + + private String value; + + MediaTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MediaTypeEnum fromValue(String value) { + for (MediaTypeEnum b : MediaTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MediaTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MediaTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MediaTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_MEDIA_TYPE = "mediaType"; + @SerializedName(SERIALIZED_NAME_MEDIA_TYPE) + private MediaTypeEnum mediaType; + + /** + * Returns analytics based on the viewers' continent. The list of supported continents names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `EU`. + */ + @JsonAdapter(ContinentEnum.Adapter.class) + public enum ContinentEnum { + AS("AS"), + + AF("AF"), + + NA("NA"), + + SA("SA"), + + AN("AN"), + + EU("EU"), + + AZ("AZ"); + + private String value; + + ContinentEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContinentEnum fromValue(String value) { + for (ContinentEnum b : ContinentEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ContinentEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContinentEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ContinentEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CONTINENT = "continent"; + @SerializedName(SERIALIZED_NAME_CONTINENT) + private ContinentEnum continent; + + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + public static final String SERIALIZED_NAME_DEVICE_TYPE = "deviceType"; + @SerializedName(SERIALIZED_NAME_DEVICE_TYPE) + private String deviceType; + + public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operatingSystem"; + @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) + private String operatingSystem; + + public static final String SERIALIZED_NAME_BROWSER = "browser"; + @SerializedName(SERIALIZED_NAME_BROWSER) + private String browser; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + private String tag; + + public FilterBy mediaId(String mediaId) { + this.mediaId = mediaId; + return this; + } + + /** + * Returns analytics based on the unique identifiers of a video or a live stream. + * + * @return mediaId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "vi4blUQJFrYWbaG44NChkH27", value = "Returns analytics based on the unique identifiers of a video or a live stream.") + + public String getMediaId() { + return mediaId; + } + + public void setMediaId(String mediaId) { + this.mediaId = mediaId; + } + + public FilterBy mediaType(MediaTypeEnum mediaType) { + this.mediaType = mediaType; + return this; + } + + /** + * Get mediaType + * + * @return mediaType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "video", value = "") + + public MediaTypeEnum getMediaType() { + return mediaType; + } + + public void setMediaType(MediaTypeEnum mediaType) { + this.mediaType = mediaType; + } + + public FilterBy continent(ContinentEnum continent) { + this.continent = continent; + return this; + } + + /** + * Returns analytics based on the viewers' continent. The list of supported continents names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `EU`. + * + * @return continent + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "EU", value = "Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`.") + + public ContinentEnum getContinent() { + return continent; + } + + public void setContinent(ContinentEnum continent) { + this.continent = continent; + } + + public FilterBy country(String country) { + this.country = country; + return this; + } + + /** + * Returns analytics based on the viewers' country. The list of supported country names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `FR`. + * + * @return country + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "FR", value = "Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`.") + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public FilterBy deviceType(String deviceType) { + this.deviceType = deviceType; + return this; + } + + /** + * Returns analytics based on the type of device used by the viewers. Possible response values are: + * `computer`, `phone`, `tablet`, `tv`, `console`, + * `wearable`, `unknown`. + * + * @return deviceType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "computer", value = "Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`.") + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public FilterBy operatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + return this; + } + + /** + * Returns analytics based on the operating system used by the viewers. Response values include `windows`, + * `mac osx`, `android`, `ios`, `linux`. + * + * @return operatingSystem + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "windows", value = "Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`.") + + public String getOperatingSystem() { + return operatingSystem; + } + + public void setOperatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + } + + public FilterBy browser(String browser) { + this.browser = browser; + return this; + } + + /** + * Returns analytics based on the browser used by the viewers. Response values include `chrome`, + * `firefox`, `edge`, `opera`. + * + * @return browser + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "firefox", value = "Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`.") + + public String getBrowser() { + return browser; + } + + public void setBrowser(String browser) { + this.browser = browser; + } + + public FilterBy tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read + * more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + * + * @return tag + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Cool videos", value = "Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).") + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FilterBy filterBy = (FilterBy) o; + return Objects.equals(this.mediaId, filterBy.mediaId) && Objects.equals(this.mediaType, filterBy.mediaType) + && Objects.equals(this.continent, filterBy.continent) && Objects.equals(this.country, filterBy.country) + && Objects.equals(this.deviceType, filterBy.deviceType) + && Objects.equals(this.operatingSystem, filterBy.operatingSystem) + && Objects.equals(this.browser, filterBy.browser) && Objects.equals(this.tag, filterBy.tag); + } + + @Override + public int hashCode() { + return Objects.hash(mediaId, mediaType, continent, country, deviceType, operatingSystem, browser, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FilterBy {\n"); + sb.append(" mediaId: ").append(toIndentedString(mediaId)).append("\n"); + sb.append(" mediaType: ").append(toIndentedString(mediaType)).append("\n"); + sb.append(" continent: ").append(toIndentedString(continent)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" deviceType: ").append(toIndentedString(deviceType)).append("\n"); + sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); + sb.append(" browser: ").append(toIndentedString(browser)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/FilterBy1.java b/src/main/java/video/api/client/api/models/FilterBy1.java new file mode 100644 index 0000000..c36834f --- /dev/null +++ b/src/main/java/video/api/client/api/models/FilterBy1.java @@ -0,0 +1,396 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.io.Serializable; + +/** + * FilterBy1 + */ + +public class FilterBy1 implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MEDIA_ID = "mediaId"; + @SerializedName(SERIALIZED_NAME_MEDIA_ID) + private String mediaId; + + /** + * Gets or Sets mediaType + */ + @JsonAdapter(MediaTypeEnum.Adapter.class) + public enum MediaTypeEnum { + VIDEO("video"), + + LIVE_STREAM("live-stream"); + + private String value; + + MediaTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MediaTypeEnum fromValue(String value) { + for (MediaTypeEnum b : MediaTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MediaTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MediaTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MediaTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_MEDIA_TYPE = "mediaType"; + @SerializedName(SERIALIZED_NAME_MEDIA_TYPE) + private MediaTypeEnum mediaType; + + /** + * Returns analytics based on the viewers' continent. The list of supported continents names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `EU`. + */ + @JsonAdapter(ContinentEnum.Adapter.class) + public enum ContinentEnum { + AS("AS"), + + AF("AF"), + + NA("NA"), + + SA("SA"), + + AN("AN"), + + EU("EU"), + + AZ("AZ"); + + private String value; + + ContinentEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContinentEnum fromValue(String value) { + for (ContinentEnum b : ContinentEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ContinentEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContinentEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ContinentEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CONTINENT = "continent"; + @SerializedName(SERIALIZED_NAME_CONTINENT) + private ContinentEnum continent; + + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + public static final String SERIALIZED_NAME_DEVICE_TYPE = "deviceType"; + @SerializedName(SERIALIZED_NAME_DEVICE_TYPE) + private String deviceType; + + public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operatingSystem"; + @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) + private String operatingSystem; + + public static final String SERIALIZED_NAME_BROWSER = "browser"; + @SerializedName(SERIALIZED_NAME_BROWSER) + private String browser; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + private String tag; + + public FilterBy1 mediaId(String mediaId) { + this.mediaId = mediaId; + return this; + } + + /** + * Returns analytics based on the unique identifiers of a video or a live stream. + * + * @return mediaId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "vi4blUQJFrYWbaG44NChkH27", value = "Returns analytics based on the unique identifiers of a video or a live stream.") + + public String getMediaId() { + return mediaId; + } + + public void setMediaId(String mediaId) { + this.mediaId = mediaId; + } + + public FilterBy1 mediaType(MediaTypeEnum mediaType) { + this.mediaType = mediaType; + return this; + } + + /** + * Get mediaType + * + * @return mediaType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "video", value = "") + + public MediaTypeEnum getMediaType() { + return mediaType; + } + + public void setMediaType(MediaTypeEnum mediaType) { + this.mediaType = mediaType; + } + + public FilterBy1 continent(ContinentEnum continent) { + this.continent = continent; + return this; + } + + /** + * Returns analytics based on the viewers' continent. The list of supported continents names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `EU`. + * + * @return continent + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "EU", value = "Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`.") + + public ContinentEnum getContinent() { + return continent; + } + + public void setContinent(ContinentEnum continent) { + this.continent = continent; + } + + public FilterBy1 country(String country) { + this.country = country; + return this; + } + + /** + * Returns analytics based on the viewers' country. The list of supported country names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `FR`. + * + * @return country + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "FR", value = "Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`.") + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public FilterBy1 deviceType(String deviceType) { + this.deviceType = deviceType; + return this; + } + + /** + * Returns analytics based on the type of device used by the viewers. Possible response values are: + * `computer`, `phone`, `tablet`, `tv`, `console`, + * `wearable`, `unknown`. + * + * @return deviceType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "computer", value = "Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`.") + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public FilterBy1 operatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + return this; + } + + /** + * Returns analytics based on the operating system used by the viewers. Response values include `windows`, + * `mac osx`, `android`, `ios`, `linux`. + * + * @return operatingSystem + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "windows", value = "Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`.") + + public String getOperatingSystem() { + return operatingSystem; + } + + public void setOperatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + } + + public FilterBy1 browser(String browser) { + this.browser = browser; + return this; + } + + /** + * Returns analytics based on the browser used by the viewers. Response values include `chrome`, + * `firefox`, `edge`, `opera`. + * + * @return browser + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "firefox", value = "Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`.") + + public String getBrowser() { + return browser; + } + + public void setBrowser(String browser) { + this.browser = browser; + } + + public FilterBy1 tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read + * more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + * + * @return tag + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Cool videos", value = "Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).") + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FilterBy1 filterBy1 = (FilterBy1) o; + return Objects.equals(this.mediaId, filterBy1.mediaId) && Objects.equals(this.mediaType, filterBy1.mediaType) + && Objects.equals(this.continent, filterBy1.continent) + && Objects.equals(this.country, filterBy1.country) + && Objects.equals(this.deviceType, filterBy1.deviceType) + && Objects.equals(this.operatingSystem, filterBy1.operatingSystem) + && Objects.equals(this.browser, filterBy1.browser) && Objects.equals(this.tag, filterBy1.tag); + } + + @Override + public int hashCode() { + return Objects.hash(mediaId, mediaType, continent, country, deviceType, operatingSystem, browser, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FilterBy1 {\n"); + sb.append(" mediaId: ").append(toIndentedString(mediaId)).append("\n"); + sb.append(" mediaType: ").append(toIndentedString(mediaType)).append("\n"); + sb.append(" continent: ").append(toIndentedString(continent)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" deviceType: ").append(toIndentedString(deviceType)).append("\n"); + sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); + sb.append(" browser: ").append(toIndentedString(browser)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/FilterBy2.java b/src/main/java/video/api/client/api/models/FilterBy2.java new file mode 100644 index 0000000..ac49ff9 --- /dev/null +++ b/src/main/java/video/api/client/api/models/FilterBy2.java @@ -0,0 +1,396 @@ +/* + * api.video Java API client + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * The version of the OpenAPI document: 1 + * Contact: ecosystem@api.video + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +package video.api.client.api.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.io.Serializable; + +/** + * FilterBy2 + */ + +public class FilterBy2 implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_MEDIA_ID = "mediaId"; + @SerializedName(SERIALIZED_NAME_MEDIA_ID) + private String mediaId; + + /** + * Gets or Sets mediaType + */ + @JsonAdapter(MediaTypeEnum.Adapter.class) + public enum MediaTypeEnum { + VIDEO("video"), + + LIVE_STREAM("live-stream"); + + private String value; + + MediaTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MediaTypeEnum fromValue(String value) { + for (MediaTypeEnum b : MediaTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MediaTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MediaTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MediaTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_MEDIA_TYPE = "mediaType"; + @SerializedName(SERIALIZED_NAME_MEDIA_TYPE) + private MediaTypeEnum mediaType; + + /** + * Returns analytics based on the viewers' continent. The list of supported continents names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `EU`. + */ + @JsonAdapter(ContinentEnum.Adapter.class) + public enum ContinentEnum { + AS("AS"), + + AF("AF"), + + NA("NA"), + + SA("SA"), + + AN("AN"), + + EU("EU"), + + AZ("AZ"); + + private String value; + + ContinentEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContinentEnum fromValue(String value) { + for (ContinentEnum b : ContinentEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ContinentEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContinentEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ContinentEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CONTINENT = "continent"; + @SerializedName(SERIALIZED_NAME_CONTINENT) + private ContinentEnum continent; + + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + public static final String SERIALIZED_NAME_DEVICE_TYPE = "deviceType"; + @SerializedName(SERIALIZED_NAME_DEVICE_TYPE) + private String deviceType; + + public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operatingSystem"; + @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) + private String operatingSystem; + + public static final String SERIALIZED_NAME_BROWSER = "browser"; + @SerializedName(SERIALIZED_NAME_BROWSER) + private String browser; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + private String tag; + + public FilterBy2 mediaId(String mediaId) { + this.mediaId = mediaId; + return this; + } + + /** + * Returns analytics based on the unique identifiers of a video or a live stream. + * + * @return mediaId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "vi4blUQJFrYWbaG44NChkH27", value = "Returns analytics based on the unique identifiers of a video or a live stream.") + + public String getMediaId() { + return mediaId; + } + + public void setMediaId(String mediaId) { + this.mediaId = mediaId; + } + + public FilterBy2 mediaType(MediaTypeEnum mediaType) { + this.mediaType = mediaType; + return this; + } + + /** + * Get mediaType + * + * @return mediaType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "video", value = "") + + public MediaTypeEnum getMediaType() { + return mediaType; + } + + public void setMediaType(MediaTypeEnum mediaType) { + this.mediaType = mediaType; + } + + public FilterBy2 continent(ContinentEnum continent) { + this.continent = continent; + return this; + } + + /** + * Returns analytics based on the viewers' continent. The list of supported continents names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `EU`. + * + * @return continent + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "EU", value = "Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`.") + + public ContinentEnum getContinent() { + return continent; + } + + public void setContinent(ContinentEnum continent) { + this.continent = continent; + } + + public FilterBy2 country(String country) { + this.country = country; + return this; + } + + /** + * Returns analytics based on the viewers' country. The list of supported country names are based on the + * [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for + * example `FR`. + * + * @return country + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "FR", value = "Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`.") + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public FilterBy2 deviceType(String deviceType) { + this.deviceType = deviceType; + return this; + } + + /** + * Returns analytics based on the type of device used by the viewers. Possible response values are: + * `computer`, `phone`, `tablet`, `tv`, `console`, + * `wearable`, `unknown`. + * + * @return deviceType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "computer", value = "Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`.") + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public FilterBy2 operatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + return this; + } + + /** + * Returns analytics based on the operating system used by the viewers. Response values include `windows`, + * `mac osx`, `android`, `ios`, `linux`. + * + * @return operatingSystem + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "windows", value = "Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`.") + + public String getOperatingSystem() { + return operatingSystem; + } + + public void setOperatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + } + + public FilterBy2 browser(String browser) { + this.browser = browser; + return this; + } + + /** + * Returns analytics based on the browser used by the viewers. Response values include `chrome`, + * `firefox`, `edge`, `opera`. + * + * @return browser + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "firefox", value = "Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`.") + + public String getBrowser() { + return browser; + } + + public void setBrowser(String browser) { + this.browser = browser; + } + + public FilterBy2 tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read + * more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). + * + * @return tag + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Cool videos", value = "Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).") + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FilterBy2 filterBy2 = (FilterBy2) o; + return Objects.equals(this.mediaId, filterBy2.mediaId) && Objects.equals(this.mediaType, filterBy2.mediaType) + && Objects.equals(this.continent, filterBy2.continent) + && Objects.equals(this.country, filterBy2.country) + && Objects.equals(this.deviceType, filterBy2.deviceType) + && Objects.equals(this.operatingSystem, filterBy2.operatingSystem) + && Objects.equals(this.browser, filterBy2.browser) && Objects.equals(this.tag, filterBy2.tag); + } + + @Override + public int hashCode() { + return Objects.hash(mediaId, mediaType, continent, country, deviceType, operatingSystem, browser, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FilterBy2 {\n"); + sb.append(" mediaId: ").append(toIndentedString(mediaId)).append("\n"); + sb.append(" mediaType: ").append(toIndentedString(mediaType)).append("\n"); + sb.append(" continent: ").append(toIndentedString(continent)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" deviceType: ").append(toIndentedString(deviceType)).append("\n"); + sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); + sb.append(" browser: ").append(toIndentedString(browser)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/video/api/client/api/models/LiveStream.java b/src/main/java/video/api/client/api/models/LiveStream.java index eec6aab..6ec328e 100644 --- a/src/main/java/video/api/client/api/models/LiveStream.java +++ b/src/main/java/video/api/client/api/models/LiveStream.java @@ -145,12 +145,12 @@ public LiveStream _public(Boolean _public) { /** * Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will * require a unique token for each view. Learn more about the Private Video feature - * [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + * [here](https://docs.api.video/delivery/video-privacy-access-management). * * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).") + @ApiModelProperty(example = "true", value = "Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).") public Boolean getPublic() { return _public; @@ -235,11 +235,11 @@ public LiveStream addRestreamsItem(RestreamsResponseObject restreamsItem) { } /** - * Returns the list of RTMP restream destinations. + * Returns the list of restream destinations. * * @return restreams **/ - @ApiModelProperty(required = true, value = "Returns the list of RTMP restream destinations.") + @ApiModelProperty(required = true, value = "Returns the list of restream destinations.") public List getRestreams() { return restreams; diff --git a/src/main/java/video/api/client/api/models/LiveStreamCreationPayload.java b/src/main/java/video/api/client/api/models/LiveStreamCreationPayload.java index 2fb4c1d..eb80234 100644 --- a/src/main/java/video/api/client/api/models/LiveStreamCreationPayload.java +++ b/src/main/java/video/api/client/api/models/LiveStreamCreationPayload.java @@ -77,12 +77,12 @@ public LiveStreamCreationPayload _public(Boolean _public) { /** * Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will * require a unique token for each view. Learn more about the Private Video feature - * [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + * [here](https://docs.api.video/delivery/video-privacy-access-management). * * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).") + @ApiModelProperty(value = "Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).") public Boolean getPublic() { return _public; @@ -127,13 +127,13 @@ public LiveStreamCreationPayload addRestreamsItem(RestreamsRequestObject restrea } /** - * Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can - * only contain up to 5 destinations. + * Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to + * restream a live stream. The list can only contain up to 5 destinations. * * @return restreams **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.") + @ApiModelProperty(value = "Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations.") public List getRestreams() { return restreams; diff --git a/src/main/java/video/api/client/api/models/LiveStreamSession.java b/src/main/java/video/api/client/api/models/LiveStreamSession.java deleted file mode 100644 index 03c6a76..0000000 --- a/src/main/java/video/api/client/api/models/LiveStreamSession.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import video.api.client.api.models.LiveStreamSessionClient; -import video.api.client.api.models.LiveStreamSessionDevice; -import video.api.client.api.models.LiveStreamSessionLocation; -import video.api.client.api.models.LiveStreamSessionReferrer; -import video.api.client.api.models.LiveStreamSessionSession; -import video.api.client.api.models.VideoSessionOs; -import java.io.Serializable; - -/** - * LiveStreamSession - */ - -public class LiveStreamSession implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SESSION = "session"; - @SerializedName(SERIALIZED_NAME_SESSION) - private LiveStreamSessionSession session; - - public static final String SERIALIZED_NAME_LOCATION = "location"; - @SerializedName(SERIALIZED_NAME_LOCATION) - private LiveStreamSessionLocation location; - - public static final String SERIALIZED_NAME_REFERRER = "referrer"; - @SerializedName(SERIALIZED_NAME_REFERRER) - private LiveStreamSessionReferrer referrer; - - public static final String SERIALIZED_NAME_DEVICE = "device"; - @SerializedName(SERIALIZED_NAME_DEVICE) - private LiveStreamSessionDevice device; - - public static final String SERIALIZED_NAME_OS = "os"; - @SerializedName(SERIALIZED_NAME_OS) - private VideoSessionOs os; - - public static final String SERIALIZED_NAME_CLIENT = "client"; - @SerializedName(SERIALIZED_NAME_CLIENT) - private LiveStreamSessionClient client; - - public LiveStreamSession session(LiveStreamSessionSession session) { - this.session = session; - return this; - } - - /** - * Get session - * - * @return session - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public LiveStreamSessionSession getSession() { - return session; - } - - public void setSession(LiveStreamSessionSession session) { - this.session = session; - } - - public LiveStreamSession location(LiveStreamSessionLocation location) { - this.location = location; - return this; - } - - /** - * Get location - * - * @return location - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public LiveStreamSessionLocation getLocation() { - return location; - } - - public void setLocation(LiveStreamSessionLocation location) { - this.location = location; - } - - public LiveStreamSession referrer(LiveStreamSessionReferrer referrer) { - this.referrer = referrer; - return this; - } - - /** - * Get referrer - * - * @return referrer - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public LiveStreamSessionReferrer getReferrer() { - return referrer; - } - - public void setReferrer(LiveStreamSessionReferrer referrer) { - this.referrer = referrer; - } - - public LiveStreamSession device(LiveStreamSessionDevice device) { - this.device = device; - return this; - } - - /** - * Get device - * - * @return device - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public LiveStreamSessionDevice getDevice() { - return device; - } - - public void setDevice(LiveStreamSessionDevice device) { - this.device = device; - } - - public LiveStreamSession os(VideoSessionOs os) { - this.os = os; - return this; - } - - /** - * Get os - * - * @return os - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VideoSessionOs getOs() { - return os; - } - - public void setOs(VideoSessionOs os) { - this.os = os; - } - - public LiveStreamSession client(LiveStreamSessionClient client) { - this.client = client; - return this; - } - - /** - * Get client - * - * @return client - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public LiveStreamSessionClient getClient() { - return client; - } - - public void setClient(LiveStreamSessionClient client) { - this.client = client; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveStreamSession liveStreamSession = (LiveStreamSession) o; - return Objects.equals(this.session, liveStreamSession.session) - && Objects.equals(this.location, liveStreamSession.location) - && Objects.equals(this.referrer, liveStreamSession.referrer) - && Objects.equals(this.device, liveStreamSession.device) - && Objects.equals(this.os, liveStreamSession.os) - && Objects.equals(this.client, liveStreamSession.client); - } - - @Override - public int hashCode() { - return Objects.hash(session, location, referrer, device, os, client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveStreamSession {\n"); - sb.append(" session: ").append(toIndentedString(session)).append("\n"); - sb.append(" location: ").append(toIndentedString(location)).append("\n"); - sb.append(" referrer: ").append(toIndentedString(referrer)).append("\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" os: ").append(toIndentedString(os)).append("\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/LiveStreamSessionClient.java b/src/main/java/video/api/client/api/models/LiveStreamSessionClient.java deleted file mode 100644 index 393495e..0000000 --- a/src/main/java/video/api/client/api/models/LiveStreamSessionClient.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * What kind of browser the viewer is using for the live stream session. - */ -@ApiModel(description = "What kind of browser the viewer is using for the live stream session.") - -public class LiveStreamSessionClient implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_VERSION = "version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private String version; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public LiveStreamSessionClient name(String name) { - this.name = name; - return this; - } - - /** - * The name of the browser used to view the live stream session. - * - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Firefox", value = "The name of the browser used to view the live stream session.") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public LiveStreamSessionClient version(String version) { - this.version = version; - return this; - } - - /** - * The version of the browser used to view the live stream session. - * - * @return version - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "67.0", value = "The version of the browser used to view the live stream session.") - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public LiveStreamSessionClient type(String type) { - this.type = type; - return this; - } - - /** - * The type of client used to view the live stream session. - * - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "browser", value = "The type of client used to view the live stream session.") - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveStreamSessionClient liveStreamSessionClient = (LiveStreamSessionClient) o; - return Objects.equals(this.name, liveStreamSessionClient.name) - && Objects.equals(this.version, liveStreamSessionClient.version) - && Objects.equals(this.type, liveStreamSessionClient.type); - } - - @Override - public int hashCode() { - return Objects.hash(name, version, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveStreamSessionClient {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/LiveStreamSessionDevice.java b/src/main/java/video/api/client/api/models/LiveStreamSessionDevice.java deleted file mode 100644 index a88ce0d..0000000 --- a/src/main/java/video/api/client/api/models/LiveStreamSessionDevice.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * What type of device the user is on when in the live stream session. - */ -@ApiModel(description = "What type of device the user is on when in the live stream session.") - -public class LiveStreamSessionDevice implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_VENDOR = "vendor"; - @SerializedName(SERIALIZED_NAME_VENDOR) - private String vendor; - - public static final String SERIALIZED_NAME_MODEL = "model"; - @SerializedName(SERIALIZED_NAME_MODEL) - private String model; - - public LiveStreamSessionDevice type(String type) { - this.type = type; - return this; - } - - /** - * What the type is like desktop, laptop, mobile. - * - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "desktop", value = "What the type is like desktop, laptop, mobile.") - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public LiveStreamSessionDevice vendor(String vendor) { - this.vendor = vendor; - return this; - } - - /** - * If known, what the brand of the device is, like Apple, Dell, etc. - * - * @return vendor - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Dell", value = "If known, what the brand of the device is, like Apple, Dell, etc.") - - public String getVendor() { - return vendor; - } - - public void setVendor(String vendor) { - this.vendor = vendor; - } - - public LiveStreamSessionDevice model(String model) { - this.model = model; - return this; - } - - /** - * The specific model of the device, if known. - * - * @return model - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "unknown", value = "The specific model of the device, if known.") - - public String getModel() { - return model; - } - - public void setModel(String model) { - this.model = model; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveStreamSessionDevice liveStreamSessionDevice = (LiveStreamSessionDevice) o; - return Objects.equals(this.type, liveStreamSessionDevice.type) - && Objects.equals(this.vendor, liveStreamSessionDevice.vendor) - && Objects.equals(this.model, liveStreamSessionDevice.model); - } - - @Override - public int hashCode() { - return Objects.hash(type, vendor, model); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveStreamSessionDevice {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/LiveStreamSessionLocation.java b/src/main/java/video/api/client/api/models/LiveStreamSessionLocation.java deleted file mode 100644 index 33812c4..0000000 --- a/src/main/java/video/api/client/api/models/LiveStreamSessionLocation.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * The location of the viewer of the live stream. - */ -@ApiModel(description = "The location of the viewer of the live stream.") - -public class LiveStreamSessionLocation implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public LiveStreamSessionLocation country(String country) { - this.country = country; - return this; - } - - /** - * The country of the viewer of the live stream. - * - * @return country - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "France", value = "The country of the viewer of the live stream.") - - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - public LiveStreamSessionLocation city(String city) { - this.city = city; - return this; - } - - /** - * The city of the viewer of the live stream. - * - * @return city - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Paris", value = "The city of the viewer of the live stream.") - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveStreamSessionLocation liveStreamSessionLocation = (LiveStreamSessionLocation) o; - return Objects.equals(this.country, liveStreamSessionLocation.country) - && Objects.equals(this.city, liveStreamSessionLocation.city); - } - - @Override - public int hashCode() { - return Objects.hash(country, city); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveStreamSessionLocation {\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/LiveStreamSessionReferrer.java b/src/main/java/video/api/client/api/models/LiveStreamSessionReferrer.java deleted file mode 100644 index 4d52280..0000000 --- a/src/main/java/video/api/client/api/models/LiveStreamSessionReferrer.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * LiveStreamSessionReferrer - */ - -public class LiveStreamSessionReferrer implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) - private String url; - - public static final String SERIALIZED_NAME_MEDIUM = "medium"; - @SerializedName(SERIALIZED_NAME_MEDIUM) - private String medium; - - public static final String SERIALIZED_NAME_SOURCE = "source"; - @SerializedName(SERIALIZED_NAME_SOURCE) - private String source; - - public static final String SERIALIZED_NAME_SEARCH_TERM = "searchTerm"; - @SerializedName(SERIALIZED_NAME_SEARCH_TERM) - private String searchTerm; - - public LiveStreamSessionReferrer url(String url) { - this.url = url; - return this; - } - - /** - * The website the viewer of the live stream was referred to in order to view the live stream. - * - * @return url - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.video", value = "The website the viewer of the live stream was referred to in order to view the live stream.") - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public LiveStreamSessionReferrer medium(String medium) { - this.medium = medium; - return this; - } - - /** - * The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid - * would be they found it via an advertisement. - * - * @return medium - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "organic", value = "The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement.") - - public String getMedium() { - return medium; - } - - public void setMedium(String medium) { - this.medium = medium; - } - - public LiveStreamSessionReferrer source(String source) { - this.source = source; - return this; - } - - /** - * Where the viewer came from to see the live stream (usually where they searched from). - * - * @return source - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "https://google.com", value = "Where the viewer came from to see the live stream (usually where they searched from).") - - public String getSource() { - return source; - } - - public void setSource(String source) { - this.source = source; - } - - public LiveStreamSessionReferrer searchTerm(String searchTerm) { - this.searchTerm = searchTerm; - return this; - } - - /** - * What term they searched for that led them to the live stream. - * - * @return searchTerm - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "video stream", value = "What term they searched for that led them to the live stream.") - - public String getSearchTerm() { - return searchTerm; - } - - public void setSearchTerm(String searchTerm) { - this.searchTerm = searchTerm; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveStreamSessionReferrer liveStreamSessionReferrer = (LiveStreamSessionReferrer) o; - return Objects.equals(this.url, liveStreamSessionReferrer.url) - && Objects.equals(this.medium, liveStreamSessionReferrer.medium) - && Objects.equals(this.source, liveStreamSessionReferrer.source) - && Objects.equals(this.searchTerm, liveStreamSessionReferrer.searchTerm); - } - - @Override - public int hashCode() { - return Objects.hash(url, medium, source, searchTerm); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveStreamSessionReferrer {\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" medium: ").append(toIndentedString(medium)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" searchTerm: ").append(toIndentedString(searchTerm)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/LiveStreamSessionSession.java b/src/main/java/video/api/client/api/models/LiveStreamSessionSession.java deleted file mode 100644 index acf282a..0000000 --- a/src/main/java/video/api/client/api/models/LiveStreamSessionSession.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.io.Serializable; - -/** - * LiveStreamSessionSession - */ - -public class LiveStreamSessionSession implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SESSION_ID = "sessionId"; - @SerializedName(SERIALIZED_NAME_SESSION_ID) - private String sessionId; - - public static final String SERIALIZED_NAME_LOADED_AT = "loadedAt"; - @SerializedName(SERIALIZED_NAME_LOADED_AT) - private OffsetDateTime loadedAt; - - public static final String SERIALIZED_NAME_ENDED_AT = "endedAt"; - @SerializedName(SERIALIZED_NAME_ENDED_AT) - private OffsetDateTime endedAt; - - public LiveStreamSessionSession sessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * A unique identifier for your session. You can use this to track what happens during a specific session. - * - * @return sessionId - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "A unique identifier for your session. You can use this to track what happens during a specific session.") - - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public LiveStreamSessionSession loadedAt(OffsetDateTime loadedAt) { - this.loadedAt = loadedAt; - return this; - } - - /** - * When the session started, with the date and time presented in ISO-8601 format. - * - * @return loadedAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2019-06-24T11:45:01.109Z", value = "When the session started, with the date and time presented in ISO-8601 format.") - - public OffsetDateTime getLoadedAt() { - return loadedAt; - } - - public void setLoadedAt(OffsetDateTime loadedAt) { - this.loadedAt = loadedAt; - } - - public LiveStreamSessionSession endedAt(OffsetDateTime endedAt) { - this.endedAt = endedAt; - return this; - } - - /** - * When the session ended, with the date and time presented in ISO-8601 format. - * - * @return endedAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2019-06-24T12:45:01.109Z", value = "When the session ended, with the date and time presented in ISO-8601 format.") - - public OffsetDateTime getEndedAt() { - return endedAt; - } - - public void setEndedAt(OffsetDateTime endedAt) { - this.endedAt = endedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LiveStreamSessionSession liveStreamSessionSession = (LiveStreamSessionSession) o; - return Objects.equals(this.sessionId, liveStreamSessionSession.sessionId) - && Objects.equals(this.loadedAt, liveStreamSessionSession.loadedAt) - && Objects.equals(this.endedAt, liveStreamSessionSession.endedAt); - } - - @Override - public int hashCode() { - return Objects.hash(sessionId, loadedAt, endedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LiveStreamSessionSession {\n"); - sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); - sb.append(" loadedAt: ").append(toIndentedString(loadedAt)).append("\n"); - sb.append(" endedAt: ").append(toIndentedString(endedAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/LiveStreamUpdatePayload.java b/src/main/java/video/api/client/api/models/LiveStreamUpdatePayload.java index b5762a4..3f4d845 100644 --- a/src/main/java/video/api/client/api/models/LiveStreamUpdatePayload.java +++ b/src/main/java/video/api/client/api/models/LiveStreamUpdatePayload.java @@ -78,12 +78,12 @@ public LiveStreamUpdatePayload _public(Boolean _public) { /** * Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will * require a unique token for each view. Learn more about the Private Video feature - * [here](https://docs.api.video/delivery-analytics/video-privacy-access-management). + * [here](https://docs.api.video/delivery/video-privacy-access-management). * * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).") + @ApiModelProperty(value = "Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).") public Boolean getPublic() { return _public; @@ -128,15 +128,15 @@ public LiveStreamUpdatePayload addRestreamsItem(RestreamsRequestObject restreams } /** - * Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can - * only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you - * do not want to modify an existing restream destination, you need to include it in your request, otherwise it is - * removed. + * Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to + * restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream + * destinations in the same request. If you do not want to modify an existing restream destination, you need to + * include it in your request, otherwise it is removed. * * @return restreams **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.") + @ApiModelProperty(value = "Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.") public List getRestreams() { return restreams; diff --git a/src/main/java/video/api/client/api/models/RestreamsRequestObject.java b/src/main/java/video/api/client/api/models/RestreamsRequestObject.java index 8f5cc3e..c16cc34 100644 --- a/src/main/java/video/api/client/api/models/RestreamsRequestObject.java +++ b/src/main/java/video/api/client/api/models/RestreamsRequestObject.java @@ -54,7 +54,7 @@ public RestreamsRequestObject name(String name) { * * @return name **/ - @ApiModelProperty(example = "My RTMP server", required = true, value = "Use this parameter to define a name for the restream destination.") + @ApiModelProperty(example = "My restream server", required = true, value = "Use this parameter to define a name for the restream destination.") public String getName() { return name; @@ -70,11 +70,11 @@ public RestreamsRequestObject serverUrl(String serverUrl) { } /** - * Use this parameter to set the RTMP URL of the restream destination. + * Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination. * * @return serverUrl **/ - @ApiModelProperty(example = "rtmp://my.broadcast.example.com/app", required = true, value = "Use this parameter to set the RTMP URL of the restream destination.") + @ApiModelProperty(example = "rtmp://my.broadcast.example.com/app", required = true, value = "Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination.") public String getServerUrl() { return serverUrl; diff --git a/src/main/java/video/api/client/api/models/RestreamsResponseObject.java b/src/main/java/video/api/client/api/models/RestreamsResponseObject.java index 0384a4c..b55732d 100644 --- a/src/main/java/video/api/client/api/models/RestreamsResponseObject.java +++ b/src/main/java/video/api/client/api/models/RestreamsResponseObject.java @@ -53,7 +53,7 @@ public RestreamsResponseObject name(String name) { * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(example = "My RTMP server", value = "Returns the name of a restream destination.") + @ApiModelProperty(example = "My restream server", value = "Returns the name of a restream destination.") public String getName() { return name; @@ -69,12 +69,12 @@ public RestreamsResponseObject serverUrl(String serverUrl) { } /** - * Returns the RTMP URL of a restream destination. + * Returns the server URL of a restream destination. * * @return serverUrl **/ @javax.annotation.Nullable - @ApiModelProperty(example = "rtmp://my.broadcast.example.com/app", value = "Returns the RTMP URL of a restream destination.") + @ApiModelProperty(example = "rtmp://my.broadcast.example.com/app", value = "Returns the server URL of a restream destination.") public String getServerUrl() { return serverUrl; diff --git a/src/main/java/video/api/client/api/models/VideoSessionDevice.java b/src/main/java/video/api/client/api/models/UnrecognizedRequestUrl.java similarity index 53% rename from src/main/java/video/api/client/api/models/VideoSessionDevice.java rename to src/main/java/video/api/client/api/models/UnrecognizedRequestUrl.java index 7fad56a..996d93b 100644 --- a/src/main/java/video/api/client/api/models/VideoSessionDevice.java +++ b/src/main/java/video/api/client/api/models/UnrecognizedRequestUrl.java @@ -24,37 +24,36 @@ import java.io.Serializable; /** - * What type of device the user is on when in the video session. + * UnrecognizedRequestUrl */ -@ApiModel(description = "What type of device the user is on when in the video session.") -public class VideoSessionDevice implements Serializable { +public class UnrecognizedRequestUrl implements Serializable { private static final long serialVersionUID = 1L; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) private String type; - public static final String SERIALIZED_NAME_VENDOR = "vendor"; - @SerializedName(SERIALIZED_NAME_VENDOR) - private String vendor; + public static final String SERIALIZED_NAME_TITLE = "title"; + @SerializedName(SERIALIZED_NAME_TITLE) + private String title; - public static final String SERIALIZED_NAME_MODEL = "model"; - @SerializedName(SERIALIZED_NAME_MODEL) - private String model; + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private Integer status; - public VideoSessionDevice type(String type) { + public UnrecognizedRequestUrl type(String type) { this.type = type; return this; } /** - * What the type is like desktop, laptop, mobile. + * A link to the error documentation. * * @return type **/ @javax.annotation.Nullable - @ApiModelProperty(example = "desktop", value = "What the type is like desktop, laptop, mobile.") + @ApiModelProperty(value = "A link to the error documentation.") public String getType() { return type; @@ -64,46 +63,46 @@ public void setType(String type) { this.type = type; } - public VideoSessionDevice vendor(String vendor) { - this.vendor = vendor; + public UnrecognizedRequestUrl title(String title) { + this.title = title; return this; } /** - * If known, what the brand of the device is, like Apple, Dell, etc. + * A description of the error that occurred. * - * @return vendor + * @return title **/ @javax.annotation.Nullable - @ApiModelProperty(example = "Dell", value = "If known, what the brand of the device is, like Apple, Dell, etc.") + @ApiModelProperty(value = "A description of the error that occurred.") - public String getVendor() { - return vendor; + public String getTitle() { + return title; } - public void setVendor(String vendor) { - this.vendor = vendor; + public void setTitle(String title) { + this.title = title; } - public VideoSessionDevice model(String model) { - this.model = model; + public UnrecognizedRequestUrl status(Integer status) { + this.status = status; return this; } /** - * The specific model of the device, if known. + * The HTTP status code. * - * @return model + * @return status **/ @javax.annotation.Nullable - @ApiModelProperty(example = "unknown", value = "The specific model of the device, if known.") + @ApiModelProperty(value = "The HTTP status code.") - public String getModel() { - return model; + public Integer getStatus() { + return status; } - public void setModel(String model) { - this.model = model; + public void setStatus(Integer status) { + this.status = status; } @Override @@ -114,24 +113,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - VideoSessionDevice videoSessionDevice = (VideoSessionDevice) o; - return Objects.equals(this.type, videoSessionDevice.type) - && Objects.equals(this.vendor, videoSessionDevice.vendor) - && Objects.equals(this.model, videoSessionDevice.model); + UnrecognizedRequestUrl unrecognizedRequestUrl = (UnrecognizedRequestUrl) o; + return Objects.equals(this.type, unrecognizedRequestUrl.type) + && Objects.equals(this.title, unrecognizedRequestUrl.title) + && Objects.equals(this.status, unrecognizedRequestUrl.status); } @Override public int hashCode() { - return Objects.hash(type, vendor, model); + return Objects.hash(type, title, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class VideoSessionDevice {\n"); + sb.append("class UnrecognizedRequestUrl {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/video/api/client/api/models/VideoCreationPayload.java b/src/main/java/video/api/client/api/models/VideoCreationPayload.java index 95aeff0..6a77fe7 100644 --- a/src/main/java/video/api/client/api/models/VideoCreationPayload.java +++ b/src/main/java/video/api/client/api/models/VideoCreationPayload.java @@ -151,12 +151,12 @@ public VideoCreationPayload _public(Boolean _public) { /** * Default: True. If set to `false` the video will become private. More information on private videos can - * be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management) + * be found [here](https://docs.api.video/delivery/video-privacy-access-management) * * @return _public **/ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management)") + @ApiModelProperty(example = "true", value = "Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management)") public Boolean getPublic() { return _public; diff --git a/src/main/java/video/api/client/api/models/VideoSession.java b/src/main/java/video/api/client/api/models/VideoSession.java deleted file mode 100644 index 4f81618..0000000 --- a/src/main/java/video/api/client/api/models/VideoSession.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import video.api.client.api.models.VideoSessionClient; -import video.api.client.api.models.VideoSessionDevice; -import video.api.client.api.models.VideoSessionLocation; -import video.api.client.api.models.VideoSessionOs; -import video.api.client.api.models.VideoSessionReferrer; -import video.api.client.api.models.VideoSessionSession; -import java.io.Serializable; - -/** - * VideoSession - */ - -public class VideoSession implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SESSION = "session"; - @SerializedName(SERIALIZED_NAME_SESSION) - private VideoSessionSession session; - - public static final String SERIALIZED_NAME_LOCATION = "location"; - @SerializedName(SERIALIZED_NAME_LOCATION) - private VideoSessionLocation location; - - public static final String SERIALIZED_NAME_REFERRER = "referrer"; - @SerializedName(SERIALIZED_NAME_REFERRER) - private VideoSessionReferrer referrer; - - public static final String SERIALIZED_NAME_DEVICE = "device"; - @SerializedName(SERIALIZED_NAME_DEVICE) - private VideoSessionDevice device; - - public static final String SERIALIZED_NAME_OS = "os"; - @SerializedName(SERIALIZED_NAME_OS) - private VideoSessionOs os; - - public static final String SERIALIZED_NAME_CLIENT = "client"; - @SerializedName(SERIALIZED_NAME_CLIENT) - private VideoSessionClient client; - - public VideoSession session(VideoSessionSession session) { - this.session = session; - return this; - } - - /** - * Get session - * - * @return session - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VideoSessionSession getSession() { - return session; - } - - public void setSession(VideoSessionSession session) { - this.session = session; - } - - public VideoSession location(VideoSessionLocation location) { - this.location = location; - return this; - } - - /** - * Get location - * - * @return location - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VideoSessionLocation getLocation() { - return location; - } - - public void setLocation(VideoSessionLocation location) { - this.location = location; - } - - public VideoSession referrer(VideoSessionReferrer referrer) { - this.referrer = referrer; - return this; - } - - /** - * Get referrer - * - * @return referrer - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VideoSessionReferrer getReferrer() { - return referrer; - } - - public void setReferrer(VideoSessionReferrer referrer) { - this.referrer = referrer; - } - - public VideoSession device(VideoSessionDevice device) { - this.device = device; - return this; - } - - /** - * Get device - * - * @return device - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VideoSessionDevice getDevice() { - return device; - } - - public void setDevice(VideoSessionDevice device) { - this.device = device; - } - - public VideoSession os(VideoSessionOs os) { - this.os = os; - return this; - } - - /** - * Get os - * - * @return os - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VideoSessionOs getOs() { - return os; - } - - public void setOs(VideoSessionOs os) { - this.os = os; - } - - public VideoSession client(VideoSessionClient client) { - this.client = client; - return this; - } - - /** - * Get client - * - * @return client - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VideoSessionClient getClient() { - return client; - } - - public void setClient(VideoSessionClient client) { - this.client = client; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VideoSession videoSession = (VideoSession) o; - return Objects.equals(this.session, videoSession.session) - && Objects.equals(this.location, videoSession.location) - && Objects.equals(this.referrer, videoSession.referrer) - && Objects.equals(this.device, videoSession.device) && Objects.equals(this.os, videoSession.os) - && Objects.equals(this.client, videoSession.client); - } - - @Override - public int hashCode() { - return Objects.hash(session, location, referrer, device, os, client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VideoSession {\n"); - sb.append(" session: ").append(toIndentedString(session)).append("\n"); - sb.append(" location: ").append(toIndentedString(location)).append("\n"); - sb.append(" referrer: ").append(toIndentedString(referrer)).append("\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" os: ").append(toIndentedString(os)).append("\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/VideoSessionClient.java b/src/main/java/video/api/client/api/models/VideoSessionClient.java deleted file mode 100644 index c260507..0000000 --- a/src/main/java/video/api/client/api/models/VideoSessionClient.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * What kind of browser the viewer is using for the video session. - */ -@ApiModel(description = "What kind of browser the viewer is using for the video session.") - -public class VideoSessionClient implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_VERSION = "version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private String version; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public VideoSessionClient name(String name) { - this.name = name; - return this; - } - - /** - * The name of the browser used to view the video session. - * - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Firefox", value = "The name of the browser used to view the video session.") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public VideoSessionClient version(String version) { - this.version = version; - return this; - } - - /** - * The version of the browser used to view the video session. - * - * @return version - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "67.0", value = "The version of the browser used to view the video session.") - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public VideoSessionClient type(String type) { - this.type = type; - return this; - } - - /** - * The type of client used to view the video session. - * - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "browser", value = "The type of client used to view the video session.") - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VideoSessionClient videoSessionClient = (VideoSessionClient) o; - return Objects.equals(this.name, videoSessionClient.name) - && Objects.equals(this.version, videoSessionClient.version) - && Objects.equals(this.type, videoSessionClient.type); - } - - @Override - public int hashCode() { - return Objects.hash(name, version, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VideoSessionClient {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/VideoSessionLocation.java b/src/main/java/video/api/client/api/models/VideoSessionLocation.java deleted file mode 100644 index c54057f..0000000 --- a/src/main/java/video/api/client/api/models/VideoSessionLocation.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * The location of the viewer. - */ -@ApiModel(description = "The location of the viewer.") - -public class VideoSessionLocation implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public VideoSessionLocation country(String country) { - this.country = country; - return this; - } - - /** - * The country of the viewer. - * - * @return country - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "France", value = "The country of the viewer.") - - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - public VideoSessionLocation city(String city) { - this.city = city; - return this; - } - - /** - * The city of the viewer. - * - * @return city - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Paris", value = "The city of the viewer.") - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VideoSessionLocation videoSessionLocation = (VideoSessionLocation) o; - return Objects.equals(this.country, videoSessionLocation.country) - && Objects.equals(this.city, videoSessionLocation.city); - } - - @Override - public int hashCode() { - return Objects.hash(country, city); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VideoSessionLocation {\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/VideoSessionOs.java b/src/main/java/video/api/client/api/models/VideoSessionOs.java deleted file mode 100644 index 0d3f01a..0000000 --- a/src/main/java/video/api/client/api/models/VideoSessionOs.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * The operating system the viewer is on. - */ -@ApiModel(description = "The operating system the viewer is on.") - -public class VideoSessionOs implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_SHORTNAME = "shortname"; - @SerializedName(SERIALIZED_NAME_SHORTNAME) - private String shortname; - - public static final String SERIALIZED_NAME_VERSION = "version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private String version; - - public VideoSessionOs name(String name) { - this.name = name; - return this; - } - - /** - * The name of the operating system. - * - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Microsoft Windows", value = "The name of the operating system.") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public VideoSessionOs shortname(String shortname) { - this.shortname = shortname; - return this; - } - - /** - * The nickname for the operating system, often representing the version. - * - * @return shortname - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "W10", value = "The nickname for the operating system, often representing the version.") - - public String getShortname() { - return shortname; - } - - public void setShortname(String shortname) { - this.shortname = shortname; - } - - public VideoSessionOs version(String version) { - this.version = version; - return this; - } - - /** - * The version of the operating system. - * - * @return version - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Windows 10", value = "The version of the operating system.") - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VideoSessionOs videoSessionOs = (VideoSessionOs) o; - return Objects.equals(this.name, videoSessionOs.name) - && Objects.equals(this.shortname, videoSessionOs.shortname) - && Objects.equals(this.version, videoSessionOs.version); - } - - @Override - public int hashCode() { - return Objects.hash(name, shortname, version); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VideoSessionOs {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" shortname: ").append(toIndentedString(shortname)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/VideoSessionReferrer.java b/src/main/java/video/api/client/api/models/VideoSessionReferrer.java deleted file mode 100644 index e374874..0000000 --- a/src/main/java/video/api/client/api/models/VideoSessionReferrer.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.io.Serializable; - -/** - * VideoSessionReferrer - */ - -public class VideoSessionReferrer implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) - private String url; - - public static final String SERIALIZED_NAME_MEDIUM = "medium"; - @SerializedName(SERIALIZED_NAME_MEDIUM) - private String medium; - - public static final String SERIALIZED_NAME_SOURCE = "source"; - @SerializedName(SERIALIZED_NAME_SOURCE) - private String source; - - public static final String SERIALIZED_NAME_SEARCH_TERM = "searchTerm"; - @SerializedName(SERIALIZED_NAME_SEARCH_TERM) - private String searchTerm; - - public VideoSessionReferrer url(String url) { - this.url = url; - return this; - } - - /** - * The link the viewer used to reach the video session. - * - * @return url - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.video", value = "The link the viewer used to reach the video session.") - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public VideoSessionReferrer medium(String medium) { - this.medium = medium; - return this; - } - - /** - * How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid - * meaning they followed a link from an advertisement. - * - * @return medium - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "organic", value = "How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement.") - - public String getMedium() { - return medium; - } - - public void setMedium(String medium) { - this.medium = medium; - } - - public VideoSessionReferrer source(String source) { - this.source = source; - return this; - } - - /** - * The source the referrer came from to the video session. For example if they searched through google to find the - * stream. - * - * @return source - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "https://google.com", value = "The source the referrer came from to the video session. For example if they searched through google to find the stream.") - - public String getSource() { - return source; - } - - public void setSource(String source) { - this.source = source; - } - - public VideoSessionReferrer searchTerm(String searchTerm) { - this.searchTerm = searchTerm; - return this; - } - - /** - * The search term they typed to arrive at the video session. - * - * @return searchTerm - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The search term they typed to arrive at the video session.") - - public String getSearchTerm() { - return searchTerm; - } - - public void setSearchTerm(String searchTerm) { - this.searchTerm = searchTerm; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VideoSessionReferrer videoSessionReferrer = (VideoSessionReferrer) o; - return Objects.equals(this.url, videoSessionReferrer.url) - && Objects.equals(this.medium, videoSessionReferrer.medium) - && Objects.equals(this.source, videoSessionReferrer.source) - && Objects.equals(this.searchTerm, videoSessionReferrer.searchTerm); - } - - @Override - public int hashCode() { - return Objects.hash(url, medium, source, searchTerm); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VideoSessionReferrer {\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" medium: ").append(toIndentedString(medium)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" searchTerm: ").append(toIndentedString(searchTerm)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/main/java/video/api/client/api/models/VideoSessionSession.java b/src/main/java/video/api/client/api/models/VideoSessionSession.java deleted file mode 100644 index 0f08f44..0000000 --- a/src/main/java/video/api/client/api/models/VideoSessionSession.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * api.video Java API client - * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. - * - * The version of the OpenAPI document: 1 - * Contact: ecosystem@api.video - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -package video.api.client.api.models; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import video.api.client.api.models.Metadata; -import java.io.Serializable; - -/** - * VideoSessionSession - */ - -public class VideoSessionSession implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String SERIALIZED_NAME_SESSION_ID = "sessionId"; - @SerializedName(SERIALIZED_NAME_SESSION_ID) - private String sessionId; - - public static final String SERIALIZED_NAME_LOADED_AT = "loadedAt"; - @SerializedName(SERIALIZED_NAME_LOADED_AT) - private OffsetDateTime loadedAt; - - public static final String SERIALIZED_NAME_ENDED_AT = "endedAt"; - @SerializedName(SERIALIZED_NAME_ENDED_AT) - private OffsetDateTime endedAt; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - @SerializedName(SERIALIZED_NAME_METADATA) - private List metadata = null; - - public VideoSessionSession sessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * The unique identifier for the session that you can use to track what happens during it. - * - * @return sessionId - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "psEmFwGQUAXR2lFHj5nDOpy", value = "The unique identifier for the session that you can use to track what happens during it.") - - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public VideoSessionSession loadedAt(OffsetDateTime loadedAt) { - this.loadedAt = loadedAt; - return this; - } - - /** - * When the video session started, presented in ISO-8601 format. - * - * @return loadedAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2019-06-24T11:45:01.109Z", value = "When the video session started, presented in ISO-8601 format.") - - public OffsetDateTime getLoadedAt() { - return loadedAt; - } - - public void setLoadedAt(OffsetDateTime loadedAt) { - this.loadedAt = loadedAt; - } - - public VideoSessionSession endedAt(OffsetDateTime endedAt) { - this.endedAt = endedAt; - return this; - } - - /** - * When the video session ended, presented in ISO-8601 format. - * - * @return endedAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2019-06-24T12:45:01.109Z", value = "When the video session ended, presented in ISO-8601 format.") - - public OffsetDateTime getEndedAt() { - return endedAt; - } - - public void setEndedAt(OffsetDateTime endedAt) { - this.endedAt = endedAt; - } - - public VideoSessionSession metadata(List metadata) { - this.metadata = metadata; - return this; - } - - public VideoSessionSession addMetadataItem(Metadata metadataItem) { - if (this.metadata == null) { - this.metadata = new ArrayList<>(); - } - this.metadata.add(metadataItem); - return this; - } - - /** - * A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, - * allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your - * videos. - * - * @return metadata - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "[{\"key\": \"Author\", \"value\": \"John Doe\"}]", value = "A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.") - - public List getMetadata() { - return metadata; - } - - public void setMetadata(List metadata) { - this.metadata = metadata; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VideoSessionSession videoSessionSession = (VideoSessionSession) o; - return Objects.equals(this.sessionId, videoSessionSession.sessionId) - && Objects.equals(this.loadedAt, videoSessionSession.loadedAt) - && Objects.equals(this.endedAt, videoSessionSession.endedAt) - && Objects.equals(this.metadata, videoSessionSession.metadata); - } - - @Override - public int hashCode() { - return Objects.hash(sessionId, loadedAt, endedAt, metadata); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VideoSessionSession {\n"); - sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); - sb.append(" loadedAt: ").append(toIndentedString(loadedAt)).append("\n"); - sb.append(" endedAt: ").append(toIndentedString(endedAt)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} diff --git a/src/test/java/video/api/client/api/clients/AnalyticsApiTest.java b/src/test/java/video/api/client/api/clients/AnalyticsApiTest.java index 6baf8b6..3117fd7 100644 --- a/src/test/java/video/api/client/api/clients/AnalyticsApiTest.java +++ b/src/test/java/video/api/client/api/clients/AnalyticsApiTest.java @@ -11,22 +11,22 @@ package video.api.client.api.clients; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatNoException; -import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.jupiter.api.Assertions.assertThrows; +import video.api.client.api.ApiException; +import video.api.client.api.models.*; -import com.google.common.truth.Truth; +import java.time.OffsetDateTime; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; - -import java.time.LocalDate; - -import video.api.client.api.ApiException; -import video.api.client.api.models.AnalyticsData; -import video.api.client.api.models.Page; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatNoException; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * API tests for AnalyticsApi @@ -34,188 +34,250 @@ @DisplayName("AnalyticsApi") public class AnalyticsApiTest extends AbstractApiTest { - private final AnalyticsApi api = new AnalyticsApi(apiClientMock.getHttpClient()); + private final AnalyticsApi api = apiClientMock.analytics(); @Nested - @DisplayName("getLiveStreamsPlays") - class getLiveStreamsPlays { - private static final String PAYLOADS_PATH = "/payloads/analytics/getLiveStreamsPlays/"; + @DisplayName("getAggregatedMetrics") + class getAggregatedMetrics { + private static final String PAYLOADS_PATH = "/payloads/analytics/getAggregatedMetrics/"; @Test @DisplayName("required parameters") public void requiredParametersTest() { answerOnAnyRequest(201, "{}"); - assertThatThrownBy(() -> api.getLiveStreamsPlays(LocalDate.parse("2023-04-01"), null).execute()) - .isInstanceOf(ApiException.class) - .hasMessage("Missing the required parameter 'dimension' when calling getLiveStreamsPlays"); - assertThatThrownBy(() -> api.getLiveStreamsPlays(null, "liveStreamId").execute()) - .isInstanceOf(ApiException.class) - .hasMessage("Missing the required parameter 'from' when calling getLiveStreamsPlays"); - - assertThatNoException() - .isThrownBy(() -> api.getLiveStreamsPlays(LocalDate.parse("2023-04-01"), "liveStreamId").execute()); + assertThatNoException().isThrownBy(() -> api.getAggregatedMetrics("play", "count").execute()); + // String metric, String aggregation, OffsetDateTime from, OffsetDateTime to, String filterBy, Integer + // currentPage, Integer pageSize } @Test - @DisplayName("200 response by liveStreamId") - public void responseWithStatusByLiveStreamId200Test() throws ApiException { - answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200-0.json")); - - Page res = api.getLiveStreamsPlays(LocalDate.parse("2023-04-01"), "liveStreamId").execute(); - - AnalyticsData expected1 = new AnalyticsData().value("li3q7HxhApxRF1c8F8r6VeaI"); - expected1.setPlays(100); - AnalyticsData expected2 = new AnalyticsData().value("li3q7HxhApxRF1c8F8r6VeaB"); - expected2.setPlays(10); - AnalyticsData expected3 = new AnalyticsData().value("li3q7HxhApxRF1c8F8r6VeaD"); - expected3.setPlays(1); - assertThat(res.getItems()).containsExactlyInAnyOrder(expected1, expected2, expected3); - } + @DisplayName("200 response") + public void responseWithStatus200Test() throws ApiException { + answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200.json")); - @Test - @DisplayName("200 response by country") - public void responseWithStatusByCountry200Test() throws ApiException { - answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200-1.json")); - - Page res = api.getLiveStreamsPlays(LocalDate.parse("2023-04-01"), "country").execute(); - - AnalyticsData expected1 = new AnalyticsData().value("france"); - expected1.setPlays(100); - AnalyticsData expected2 = new AnalyticsData().value("united states"); - expected2.setPlays(10); - AnalyticsData expected3 = new AnalyticsData().value("spain"); - expected3.setPlays(1); - assertThat(res.getItems()).containsExactlyInAnyOrder(expected1, expected2, expected3); - } + AnalyticsAggregatedMetricsResponse res = api.getAggregatedMetrics("play", "count").execute(); - @Test - @DisplayName("200 response by emittedAt") - public void responseWithStatusByEmittedAt200Test() throws ApiException { - answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200-2.json")); - - Page res = api.getLiveStreamsPlays(LocalDate.parse("2023-04-01"), "emittedAt").execute(); - - AnalyticsData expected1 = new AnalyticsData().value("2023-06-10T10:00:00.000Z"); - expected1.setPlays(100); - AnalyticsData expected2 = new AnalyticsData().value("2023-06-10T11:00:00.000Z"); - expected2.setPlays(10); - AnalyticsData expected3 = new AnalyticsData().value("2023-06-10T12:00:00.000Z"); - expected3.setPlays(1); - assertThat(res.getItems()).containsExactlyInAnyOrder(expected1, expected2, expected3); + /* + * sample response: { "context" : { "metric" : "impression", "aggregation" : "count", "timeframe" : { "from" + * : "2024-05-28T11:15:07+00:00", "to" : "2024-05-29T11:15:07+00:00" } }, "data" : 346.5 } + */ } @Test @DisplayName("400 response") - public void responseWithStatus400ForUnknownDimensionTest() throws ApiException { - answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400-2.json")); + public void responseWithStatus400Test() throws ApiException { + answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400-0.json")); - ApiException e = assertThrows(ApiException.class, - () -> api.getLiveStreamsPlays(LocalDate.parse("2023-04-01"), "unknownDimension").execute()); - Truth.assertThat(e.getCode()).isEqualTo(400); - Truth.assertThat(e).hasMessageThat().contains("A query parameter is invalid."); + assertThatThrownBy(() -> api.getAggregatedMetrics("play", "count").execute()) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(400)) + .hasMessage("An attribute is invalid."); + + /* + * sample response: { "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : + * "A query parameter is invalid.", "status" : 400, "detail" : "This field was not expected.", "name" : + * "from:2024-05-20T09:15:05+02:00" } + */ } @Test @DisplayName("404 response") public void responseWithStatus404Test() throws ApiException { - answerOnAnyRequest(404, ""); + answerOnAnyRequest(404, readResourceFile(PAYLOADS_PATH + "responses/404.json")); + + assertThatThrownBy(() -> api.getAggregatedMetrics("play", "count").execute()) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(404)) + .hasMessage("Unrecognized request URL."); + + /* + * sample response: { "type" : "https://docs.api.video/reference/unrecognized-request-url", "title" : + * "Unrecognized request URL.", "status" : 404 } + */ + } + + @Test + @DisplayName("429 response") + public void responseWithStatus429Test() throws ApiException { + answerOnAnyRequest(429, readResourceFile(PAYLOADS_PATH + "responses/429.json")); - ApiException e = assertThrows(ApiException.class, - () -> api.getLiveStreamsPlays(LocalDate.parse("2023-04-01"), "country").execute()); - Truth.assertThat(e.getCode()).isEqualTo(404); - Truth.assertThat(e).hasMessageThat().contains(""); + assertThatThrownBy(() -> api.getAggregatedMetrics("play", "count").execute()) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(429)) + .hasMessage("Too many requests."); + + /* + * sample response: { "type" : "https://docs.api.video/reference/too-many-requests", "title" : + * "Too many requests.", "status" : 429 } + */ } } @Nested - @DisplayName("getVideosPlays") - class getVideosPlays { - private static final String PAYLOADS_PATH = "/payloads/analytics/getVideosPlays/"; + @DisplayName("getMetricsBreakdown") + class getMetricsBreakdown { + private static final String PAYLOADS_PATH = "/payloads/analytics/getMetricsBreakdown/"; @Test @DisplayName("required parameters") public void requiredParametersTest() { answerOnAnyRequest(201, "{}"); - assertThatThrownBy(() -> api.getVideosPlays(LocalDate.parse("2023-04-01"), null).execute()) + assertThatNoException().isThrownBy(() -> api.getMetricsBreakdown("play", "media-id").execute()); + // String metric, String breakdown, OffsetDateTime from, OffsetDateTime to, String filterBy, Integer + // currentPage, Integer pageSize + } + + @Test + @DisplayName("200 response") + public void responseWithStatus200Test() throws ApiException { + answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200.json")); + + Page res = api.getMetricsBreakdown("play", "media-id").execute(); + + /* + * sample response: { "context" : { "metric" : "play", "breakdown" : "country", "timeframe" : { "from" : + * "2024-04-28T07:15:05+00:00", "to" : "2024-05-29T11:25:37+00:00" } }, "data" : [ { "metricValue" : 7, + * "dimensionValue" : "FR" } ], "pagination" : { "currentPage" : 1, "currentPageItems" : 1, "pageSize" : 25, + * "pagesTotal" : 1, "itemsTotal" : 1, "links" : [ { "rel" : "self", "uri" : + * "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00&currentPage=1&pageSize=25" }, + * { "rel" : "first", "uri" : + * "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00&currentPage=1&pageSize=25" }, + * { "rel" : "last", "uri" : + * "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00&currentPage=1&pageSize=25" } ] + * } } + */ + } + + @Test + @DisplayName("400 response") + public void responseWithStatus400Test() throws ApiException { + answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400-0.json")); + + assertThatThrownBy(() -> api.getMetricsBreakdown("play", "media-id").execute()) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(400)) + .hasMessage("An attribute is invalid."); + + /* + * sample response: { "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : + * "A query parameter is invalid.", "status" : 400, "detail" : "This field was not expected.", "name" : + * "from:2024-05-20T09:15:05+02:00" } + */ + } + + @Test + @DisplayName("404 response") + public void responseWithStatus404Test() throws ApiException { + answerOnAnyRequest(404, readResourceFile(PAYLOADS_PATH + "responses/404.json")); + + assertThatThrownBy(() -> api.getMetricsBreakdown("play", "media-id").execute()) .isInstanceOf(ApiException.class) - .hasMessage("Missing the required parameter 'dimension' when calling getVideosPlays"); - assertThatThrownBy(() -> api.getVideosPlays(null, "videoId").execute()).isInstanceOf(ApiException.class) - .hasMessage("Missing the required parameter 'from' when calling getVideosPlays"); + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(404)) + .hasMessage("Unrecognized request URL."); - assertThatNoException() - .isThrownBy(() -> api.getVideosPlays(LocalDate.parse("2023-04-01"), "videoId").execute()); + /* + * sample response: { "type" : "https://docs.api.video/reference/unrecognized-request-url", "title" : + * "Unrecognized request URL.", "status" : 404 } + */ } @Test - @DisplayName("200 response by videoId") - public void responseWithStatusByVideoId200Test() throws ApiException { - answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200-0.json")); - - Page res = api.getVideosPlays(LocalDate.parse("2023-04-01"), "videoId").execute(); - - AnalyticsData expected1 = new AnalyticsData().value("vi3q7HxhApxRF1c8F8r6VeaI"); - expected1.setPlays(100); - AnalyticsData expected2 = new AnalyticsData().value("vi3q7HxhApxRF1c8F8r6VeaF"); - expected2.setPlays(10); - AnalyticsData expected3 = new AnalyticsData().value("vi3q7HxhApxRF1c8F8r6VeaH"); - expected3.setPlays(1); - assertThat(res.getItems()).containsExactlyInAnyOrder(expected1, expected2, expected3); + @DisplayName("429 response") + public void responseWithStatus429Test() throws ApiException { + answerOnAnyRequest(429, readResourceFile(PAYLOADS_PATH + "responses/429.json")); + + assertThatThrownBy(() -> api.getMetricsBreakdown("play", "media-id").execute()) + .isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(429)) + .hasMessage("Too many requests."); + + /* + * sample response: { "type" : "https://docs.api.video/reference/too-many-requests", "title" : + * "Too many requests.", "status" : 429 } + */ } + } + + @Nested + @DisplayName("getMetricsOverTime") + class getMetricsOverTime { + private static final String PAYLOADS_PATH = "/payloads/analytics/getMetricsOverTime/"; @Test - @DisplayName("200 response by country") - public void responseWithStatusByCountry200Test() throws ApiException { - answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200-1.json")); - - Page res = api.getVideosPlays(LocalDate.parse("2023-04-01"), "country").execute(); - - AnalyticsData expected1 = new AnalyticsData().value("france"); - expected1.setPlays(100); - AnalyticsData expected2 = new AnalyticsData().value("united states"); - expected2.setPlays(10); - AnalyticsData expected3 = new AnalyticsData().value("spain"); - expected3.setPlays(1); - assertThat(res.getItems()).containsExactlyInAnyOrder(expected1, expected2, expected3); + @DisplayName("required parameters") + public void requiredParametersTest() { + answerOnAnyRequest(201, "{}"); + + assertThatNoException().isThrownBy(() -> api.getMetricsOverTime("play").execute()); + // String metric, OffsetDateTime from, OffsetDateTime to, OffsetDateTime interval, String filterBy, Integer + // currentPage, Integer pageSize } @Test - @DisplayName("200 response by emittedAt") - public void responseWithStatusByEmittedAt200Test() throws ApiException { - answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200-2.json")); - - Page res = api.getVideosPlays(LocalDate.parse("2023-04-01"), "emittedAt").execute(); - - AnalyticsData expected1 = new AnalyticsData().value("2023-06-10T10:00:00.000Z"); - expected1.setPlays(100); - AnalyticsData expected2 = new AnalyticsData().value("2023-06-10T11:00:00.000Z"); - expected2.setPlays(10); - AnalyticsData expected3 = new AnalyticsData().value("2023-06-10T12:00:00.000Z"); - expected3.setPlays(1); - assertThat(res.getItems()).containsExactlyInAnyOrder(expected1, expected2, expected3); + @DisplayName("200 response") + public void responseWithStatus200Test() throws ApiException { + answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200.json")); + + Page res = api.getMetricsOverTime("play").execute(); + + /* + * sample response: { "context" : { "metric" : "play", "interval" : "hour", "timeframe" : { "from" : + * "2024-05-28T11:08:39+00:00", "to" : "2024-05-29T11:08:39+00:00" } }, "data" : [ { "emittedAt" : + * "2024-05-29T07:00:00+00:00", "metricValue" : 2 }, { "emittedAt" : "2024-05-29T08:00:00+00:00", + * "metricValue" : 1 }, { "emittedAt" : "2024-05-29T09:00:00+00:00", "metricValue" : 1 } ], "pagination" : { + * "currentPage" : 1, "currentPageItems" : 3, "pageSize" : 25, "pagesTotal" : 1, "itemsTotal" : 3, "links" : + * [ { "rel" : "self", "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" }, { "rel" : "first", + * "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" }, { "rel" : "last", "uri" : + * "/data/timeseries/play?currentPage=1&pageSize=25" } ] } } + */ } @Test @DisplayName("400 response") - public void responseWithStatus400ForUnknownDimensionTest() throws ApiException { - answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400-2.json")); - - ApiException e = assertThrows(ApiException.class, - () -> api.getVideosPlays(LocalDate.parse("2023-04-01"), "unknownDimension").execute()); - Truth.assertThat(e.getCode()).isEqualTo(400); - Truth.assertThat(e).hasMessageThat().contains("A query parameter is invalid."); + public void responseWithStatus400Test() throws ApiException { + answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400-0.json")); + + assertThatThrownBy(() -> api.getMetricsOverTime("play").execute()).isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(400)) + .hasMessage("An attribute is invalid."); + + /* + * sample response: { "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : + * "A query parameter is invalid.", "status" : 400, "detail" : "This field was not expected.", "name" : + * "from:2024-05-20T09:15:05+02:00" } + */ } @Test @DisplayName("404 response") public void responseWithStatus404Test() throws ApiException { - answerOnAnyRequest(404, ""); + answerOnAnyRequest(404, readResourceFile(PAYLOADS_PATH + "responses/404.json")); + + assertThatThrownBy(() -> api.getMetricsOverTime("play").execute()).isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(404)) + .hasMessage("Unrecognized request URL."); - ApiException e = assertThrows(ApiException.class, - () -> api.getVideosPlays(LocalDate.parse("2023-04-01"), "country").execute()); - Truth.assertThat(e.getCode()).isEqualTo(404); - Truth.assertThat(e).hasMessageThat().contains(""); + /* + * sample response: { "type" : "https://docs.api.video/reference/unrecognized-request-url", "title" : + * "Unrecognized request URL.", "status" : 404 } + */ + } + + @Test + @DisplayName("429 response") + public void responseWithStatus429Test() throws ApiException { + answerOnAnyRequest(429, readResourceFile(PAYLOADS_PATH + "responses/429.json")); + + assertThatThrownBy(() -> api.getMetricsOverTime("play").execute()).isInstanceOf(ApiException.class) + .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(429)) + .hasMessage("Too many requests."); + + /* + * sample response: { "type" : "https://docs.api.video/reference/too-many-requests", "title" : + * "Too many requests.", "status" : 429 } + */ } } diff --git a/src/test/java/video/api/client/api/clients/WebhooksApiTest.java b/src/test/java/video/api/client/api/clients/WebhooksApiTest.java index b675bed..8deead5 100644 --- a/src/test/java/video/api/client/api/clients/WebhooksApiTest.java +++ b/src/test/java/video/api/client/api/clients/WebhooksApiTest.java @@ -174,11 +174,11 @@ public void responseWithStatus400Test() throws ApiException { .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(400)).satisfies(e -> { ApiException apiException = (ApiException) e; assertThat(apiException.getProblems()).containsExactlyInAnyOrder( - new ApiException.ApiProblem("https://docs.api.video/docs/attributerequired", + new ApiException.ApiProblem("https://docs.api.video/reference/attribute-required", "This attribute is required.", "events"), - new ApiException.ApiProblem("https://docs.api.video/docs/attributerequired", + new ApiException.ApiProblem("https://docs.api.video/reference/attribute-required", "This attribute is required.", "url"), - new ApiException.ApiProblem("https://docs.api.video/docs/attributeinvalid", + new ApiException.ApiProblem("https://docs.api.video/reference/invalid-attribute", "This attribute must be an array.", "events")); }).hasMessage("This attribute is required."); } diff --git a/src/test/resources/payloads/advancedauthentication/authenticate/responses/400.json b/src/test/resources/payloads/advancedauthentication/authenticate/responses/400.json index 84cacbd..8d37eec 100644 --- a/src/test/resources/payloads/advancedauthentication/authenticate/responses/400.json +++ b/src/test/resources/payloads/advancedauthentication/authenticate/responses/400.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/authenticationinvalid_credentials", + "type" : "https://docs.api.video/reference/authentication-invalid-user-credentials", "title" : "The user credentials were incorrect.", "name" : "", "status" : 400 diff --git a/src/test/resources/payloads/advancedauthentication/refresh/responses/400.json b/src/test/resources/payloads/advancedauthentication/refresh/responses/400.json index 0c86651..b7e947e 100644 --- a/src/test/resources/payloads/advancedauthentication/refresh/responses/400.json +++ b/src/test/resources/payloads/advancedauthentication/refresh/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/authenticationinvalid_credentials", + "type" : "https://docs.api.video/reference/authentication-invalid-user-credentials", "title" : "The user credentials were incorrect.", "name" : "" } \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/200.json b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/200.json new file mode 100644 index 0000000..aad4f98 --- /dev/null +++ b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/200.json @@ -0,0 +1,11 @@ +{ + "context" : { + "metric" : "impression", + "aggregation" : "count", + "timeframe" : { + "from" : "2024-05-28T11:15:07+00:00", + "to" : "2024-05-29T11:15:07+00:00" + } + }, + "data" : 346.5 +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-0.json b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json similarity index 88% rename from src/test/resources/payloads/analytics/getVideosPlays/responses/400-0.json rename to src/test/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json index 84db8c3..4cbfb11 100644 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-0.json +++ b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json @@ -3,5 +3,5 @@ "title" : "An attribute is invalid.", "status" : 400, "detail" : "This value must be of type string.", - "name" : "dimension" + "name" : "metric" } \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-5.json b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json similarity index 61% rename from src/test/resources/payloads/analytics/getVideosPlays/responses/400-5.json rename to src/test/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json index 080db28..061e505 100644 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-5.json +++ b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must refer to an existing video", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/404.json b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/429.json b/src/test/resources/payloads/analytics/getAggregatedMetrics/responses/429.json similarity index 100% rename from src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/429.json rename to src/test/resources/payloads/analytics/getAggregatedMetrics/responses/429.json diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json deleted file mode 100644 index 833d2ff..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "li3q7HxhApxRF1c8F8r6VeaI", - "plays" : 100 - }, { - "value" : "li3q7HxhApxRF1c8F8r6VeaB", - "plays" : 10 - }, { - "value" : "li3q7HxhApxRF1c8F8r6VeaD", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json deleted file mode 100644 index cf2e9e5..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "france", - "plays" : 100 - }, { - "value" : "united states", - "plays" : 10 - }, { - "value" : "spain", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json deleted file mode 100644 index 4e08c61..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "2023-06-10T10:00:00.000Z", - "plays" : 100 - }, { - "value" : "2023-06-10T11:00:00.000Z", - "plays" : 10 - }, { - "value" : "2023-06-10T12:00:00.000Z", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json deleted file mode 100644 index eaf7c78..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}", - "name" : "filter" -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json deleted file mode 100644 index 282264f..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json deleted file mode 100644 index 282264f..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json deleted file mode 100644 index eaf7c78..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}", - "name" : "filter" -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json deleted file mode 100644 index cdd0425..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/authorization-disabled-analytics", - "title" : "You cannot get analytics from this project.", - "status" : 403 -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json b/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json deleted file mode 100644 index f366b6f..0000000 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/200.json b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/200.json new file mode 100644 index 0000000..f5cdba3 --- /dev/null +++ b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/200.json @@ -0,0 +1,31 @@ +{ + "context" : { + "metric" : "play", + "breakdown" : "country", + "timeframe" : { + "from" : "2024-04-28T07:15:05+00:00", + "to" : "2024-05-29T11:25:37+00:00" + } + }, + "data" : [ { + "metricValue" : 7, + "dimensionValue" : "FR" + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 1, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 1, + "links" : [ { + "rel" : "self", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json similarity index 88% rename from src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json rename to src/test/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json index 84db8c3..4cbfb11 100644 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json +++ b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json @@ -3,5 +3,5 @@ "title" : "An attribute is invalid.", "status" : 400, "detail" : "This value must be of type string.", - "name" : "dimension" + "name" : "metric" } \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json similarity index 61% rename from src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json rename to src/test/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json index 95b2f61..061e505 100644 --- a/src/test/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json +++ b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must refer to an existing live stream", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/404.json b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/429.json b/src/test/resources/payloads/analytics/getMetricsBreakdown/responses/429.json similarity index 100% rename from src/test/resources/payloads/analytics/getVideosPlays/responses/429.json rename to src/test/resources/payloads/analytics/getMetricsBreakdown/responses/429.json diff --git a/src/test/resources/payloads/analytics/getMetricsOverTime/responses/200.json b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/200.json new file mode 100644 index 0000000..b5a6342 --- /dev/null +++ b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/200.json @@ -0,0 +1,37 @@ +{ + "context" : { + "metric" : "play", + "interval" : "hour", + "timeframe" : { + "from" : "2024-05-28T11:08:39+00:00", + "to" : "2024-05-29T11:08:39+00:00" + } + }, + "data" : [ { + "emittedAt" : "2024-05-29T07:00:00+00:00", + "metricValue" : 2 + }, { + "emittedAt" : "2024-05-29T08:00:00+00:00", + "metricValue" : 1 + }, { + "emittedAt" : "2024-05-29T09:00:00+00:00", + "metricValue" : 1 + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 3, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 3, + "links" : [ { + "rel" : "self", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json new file mode 100644 index 0000000..4cbfb11 --- /dev/null +++ b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "This value must be of type string.", + "name" : "metric" +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-1.json b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json similarity index 58% rename from src/test/resources/payloads/analytics/getVideosPlays/responses/400-1.json rename to src/test/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json index b1044e2..061e505 100644 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-1.json +++ b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must be of the following structure(s): videoId:{videoId}", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getMetricsOverTime/responses/404.json b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getMetricsOverTime/responses/429.json b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/src/test/resources/payloads/analytics/getMetricsOverTime/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/200-0.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/200-0.json deleted file mode 100644 index f0d1e9a..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/200-0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "vi3q7HxhApxRF1c8F8r6VeaI", - "plays" : 100 - }, { - "value" : "vi3q7HxhApxRF1c8F8r6VeaF", - "plays" : 10 - }, { - "value" : "vi3q7HxhApxRF1c8F8r6VeaH", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/200-1.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/200-1.json deleted file mode 100644 index 7348fe2..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/200-1.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "data" : [ { - "value" : "france", - "plays" : 100 - }, { - "value" : "united states", - "plays" : 10 - }, { - "value" : "spain", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "next", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/200-2.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/200-2.json deleted file mode 100644 index ae770da..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/200-2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "2023-06-10T10:00:00.000Z", - "plays" : 100 - }, { - "value" : "2023-06-10T11:00:00.000Z", - "plays" : 10 - }, { - "value" : "2023-06-10T12:00:00.000Z", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-2.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/400-2.json deleted file mode 100644 index 3f739e6..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-3.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/400-3.json deleted file mode 100644 index 3f739e6..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-4.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/400-4.json deleted file mode 100644 index b1044e2..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/400-4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): videoId:{videoId}", - "name" : "filter" -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/403.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/403.json deleted file mode 100644 index cdd0425..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/403.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/authorization-disabled-analytics", - "title" : "You cannot get analytics from this project.", - "status" : 403 -} \ No newline at end of file diff --git a/src/test/resources/payloads/analytics/getVideosPlays/responses/404.json b/src/test/resources/payloads/analytics/getVideosPlays/responses/404.json deleted file mode 100644 index f366b6f..0000000 --- a/src/test/resources/payloads/analytics/getVideosPlays/responses/404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/complete/responses/404.json b/src/test/resources/payloads/livestreams/complete/responses/404.json new file mode 100644 index 0000000..87595d9 --- /dev/null +++ b/src/test/resources/payloads/livestreams/complete/responses/404.json @@ -0,0 +1,6 @@ +{ + "type" : "https://docs.api.video/reference/resource-not-found", + "title" : "The requested resource was not found.", + "name" : "liveStreamId", + "status" : 404 +} \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/complete/responses/429.json b/src/test/resources/payloads/livestreams/complete/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/src/test/resources/payloads/livestreams/complete/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/create/responses/400-1.json b/src/test/resources/payloads/livestreams/create/responses/400-1.json index 1350192..c3d6d42 100644 --- a/src/test/resources/payloads/livestreams/create/responses/400-1.json +++ b/src/test/resources/payloads/livestreams/create/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "Missing app name: rtmp://[host]/[app name].", + "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/create/responses/400-2.json b/src/test/resources/payloads/livestreams/create/responses/400-2.json index b05a8e3..ea329ab 100644 --- a/src/test/resources/payloads/livestreams/create/responses/400-2.json +++ b/src/test/resources/payloads/livestreams/create/responses/400-2.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].", + "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/deleteThumbnail/responses/404.json b/src/test/resources/payloads/livestreams/deleteThumbnail/responses/404.json index 9efa63b..87595d9 100644 --- a/src/test/resources/payloads/livestreams/deleteThumbnail/responses/404.json +++ b/src/test/resources/payloads/livestreams/deleteThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "liveStreamId", "status" : 404 diff --git a/src/test/resources/payloads/livestreams/update/responses/400-1.json b/src/test/resources/payloads/livestreams/update/responses/400-1.json index 1350192..c3d6d42 100644 --- a/src/test/resources/payloads/livestreams/update/responses/400-1.json +++ b/src/test/resources/payloads/livestreams/update/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "Missing app name: rtmp://[host]/[app name].", + "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/update/responses/400-2.json b/src/test/resources/payloads/livestreams/update/responses/400-2.json index b05a8e3..ea329ab 100644 --- a/src/test/resources/payloads/livestreams/update/responses/400-2.json +++ b/src/test/resources/payloads/livestreams/update/responses/400-2.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].", + "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/uploadThumbnail/responses/400.json b/src/test/resources/payloads/livestreams/uploadThumbnail/responses/400.json index 631e001..b581e38 100644 --- a/src/test/resources/payloads/livestreams/uploadThumbnail/responses/400.json +++ b/src/test/resources/payloads/livestreams/uploadThumbnail/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/src/test/resources/payloads/livestreams/uploadThumbnail/responses/404.json b/src/test/resources/payloads/livestreams/uploadThumbnail/responses/404.json index 9efa63b..87595d9 100644 --- a/src/test/resources/payloads/livestreams/uploadThumbnail/responses/404.json +++ b/src/test/resources/payloads/livestreams/uploadThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "liveStreamId", "status" : 404 diff --git a/src/test/resources/payloads/playerthemes/delete/responses/404.json b/src/test/resources/payloads/playerthemes/delete/responses/404.json index 719c18c..30decf6 100644 --- a/src/test/resources/payloads/playerthemes/delete/responses/404.json +++ b/src/test/resources/payloads/playerthemes/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/src/test/resources/payloads/playerthemes/deleteLogo/responses/404.json b/src/test/resources/payloads/playerthemes/deleteLogo/responses/404.json index 719c18c..30decf6 100644 --- a/src/test/resources/payloads/playerthemes/deleteLogo/responses/404.json +++ b/src/test/resources/payloads/playerthemes/deleteLogo/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/src/test/resources/payloads/playerthemes/get/responses/404.json b/src/test/resources/payloads/playerthemes/get/responses/404.json index 719c18c..30decf6 100644 --- a/src/test/resources/payloads/playerthemes/get/responses/404.json +++ b/src/test/resources/payloads/playerthemes/get/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/src/test/resources/payloads/playerthemes/update/responses/404.json b/src/test/resources/payloads/playerthemes/update/responses/404.json index 719c18c..30decf6 100644 --- a/src/test/resources/payloads/playerthemes/update/responses/404.json +++ b/src/test/resources/payloads/playerthemes/update/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/src/test/resources/payloads/playerthemes/uploadLogo/responses/400.json b/src/test/resources/payloads/playerthemes/uploadLogo/responses/400.json index a96e225..6ef950a 100644 --- a/src/test/resources/payloads/playerthemes/uploadLogo/responses/400.json +++ b/src/test/resources/payloads/playerthemes/uploadLogo/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/src/test/resources/payloads/playerthemes/uploadLogo/responses/404.json b/src/test/resources/payloads/playerthemes/uploadLogo/responses/404.json index 719c18c..30decf6 100644 --- a/src/test/resources/payloads/playerthemes/uploadLogo/responses/404.json +++ b/src/test/resources/payloads/playerthemes/uploadLogo/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/src/test/resources/payloads/videos/create/responses/400.json b/src/test/resources/payloads/videos/create/responses/400.json index fc789fc..c6358bf 100644 --- a/src/test/resources/payloads/videos/create/responses/400.json +++ b/src/test/resources/payloads/videos/create/responses/400.json @@ -1,22 +1,22 @@ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "title", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "title" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO8601 date.", "name" : "scheduledAt" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "tags" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "metadata" } ] diff --git a/src/test/resources/payloads/videos/delete/responses/404.json b/src/test/resources/payloads/videos/delete/responses/404.json index 69b4332..27275e1 100644 --- a/src/test/resources/payloads/videos/delete/responses/404.json +++ b/src/test/resources/payloads/videos/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/src/test/resources/payloads/videos/get/responses/404.json b/src/test/resources/payloads/videos/get/responses/404.json index 69b4332..27275e1 100644 --- a/src/test/resources/payloads/videos/get/responses/404.json +++ b/src/test/resources/payloads/videos/get/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/src/test/resources/payloads/videos/getStatus/responses/404.json b/src/test/resources/payloads/videos/getStatus/responses/404.json index 69b4332..27275e1 100644 --- a/src/test/resources/payloads/videos/getStatus/responses/404.json +++ b/src/test/resources/payloads/videos/getStatus/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/src/test/resources/payloads/videos/pickThumbnail/responses/404.json b/src/test/resources/payloads/videos/pickThumbnail/responses/404.json index 69b4332..27275e1 100644 --- a/src/test/resources/payloads/videos/pickThumbnail/responses/404.json +++ b/src/test/resources/payloads/videos/pickThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/src/test/resources/payloads/videos/update/responses/400.json b/src/test/resources/payloads/videos/update/responses/400.json index 65910b5..9115c98 100644 --- a/src/test/resources/payloads/videos/update/responses/400.json +++ b/src/test/resources/payloads/videos/update/responses/400.json @@ -1,18 +1,18 @@ { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO-8601 date.", "name" : "scheduledAt", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO-8601 date.", "name" : "scheduledAt" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "tags" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "metadata" } ] diff --git a/src/test/resources/payloads/videos/update/responses/404.json b/src/test/resources/payloads/videos/update/responses/404.json index 69b4332..27275e1 100644 --- a/src/test/resources/payloads/videos/update/responses/404.json +++ b/src/test/resources/payloads/videos/update/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/src/test/resources/payloads/videos/upload/responses/400.json b/src/test/resources/payloads/videos/upload/responses/400.json index b90e95e..09d2579 100644 --- a/src/test/resources/payloads/videos/upload/responses/400.json +++ b/src/test/resources/payloads/videos/upload/responses/400.json @@ -1,22 +1,22 @@ { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The source of the video is already uploaded.", "name" : "file", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The source of the video is already uploaded.", "name" : "file" }, { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The video xxxx has already been uploaded.", "name" : "video" }, { - "type" : "https://docs.api.video/docs/filemissing", + "type" : "https://docs.api.video/reference/uploaded-file-no-file", "title" : "There is no uploaded file in the request.", "name" : "file" }, { - "type" : "https://docs.api.video/docs/multiplefilesuploaded", + "type" : "https://docs.api.video/reference/uploaded-file-multiple-files", "title" : "There is more than one uploaded file in the request.", "name" : "file" } ] diff --git a/src/test/resources/payloads/videos/upload/responses/404.json b/src/test/resources/payloads/videos/upload/responses/404.json index 69b4332..27275e1 100644 --- a/src/test/resources/payloads/videos/upload/responses/404.json +++ b/src/test/resources/payloads/videos/upload/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/src/test/resources/payloads/videos/uploadThumbnail/responses/400.json b/src/test/resources/payloads/videos/uploadThumbnail/responses/400.json index 631e001..b581e38 100644 --- a/src/test/resources/payloads/videos/uploadThumbnail/responses/400.json +++ b/src/test/resources/payloads/videos/uploadThumbnail/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/src/test/resources/payloads/videos/uploadThumbnail/responses/404.json b/src/test/resources/payloads/videos/uploadThumbnail/responses/404.json index 69b4332..27275e1 100644 --- a/src/test/resources/payloads/videos/uploadThumbnail/responses/404.json +++ b/src/test/resources/payloads/videos/uploadThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/src/test/resources/payloads/watermarks/delete/responses/404.json b/src/test/resources/payloads/watermarks/delete/responses/404.json index 4ca04c5..c31a9d8 100644 --- a/src/test/resources/payloads/watermarks/delete/responses/404.json +++ b/src/test/resources/payloads/watermarks/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "watermarkId", "status" : 404 diff --git a/src/test/resources/payloads/watermarks/upload/responses/400.json b/src/test/resources/payloads/watermarks/upload/responses/400.json index 7d5c846..3b406ad 100644 --- a/src/test/resources/payloads/watermarks/upload/responses/400.json +++ b/src/test/resources/payloads/watermarks/upload/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/src/test/resources/payloads/webhooks/create/responses/400.json b/src/test/resources/payloads/webhooks/create/responses/400.json index 1878cc2..e7c9e89 100644 --- a/src/test/resources/payloads/webhooks/create/responses/400.json +++ b/src/test/resources/payloads/webhooks/create/responses/400.json @@ -1,18 +1,18 @@ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "events" : "This attribute is required.", "name" : "events", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "events" }, { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "url" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "events" } ] diff --git a/src/test/resources/payloads/webhooks/delete/responses/404.json b/src/test/resources/payloads/webhooks/delete/responses/404.json index 0721bb1..c97ea66 100644 --- a/src/test/resources/payloads/webhooks/delete/responses/404.json +++ b/src/test/resources/payloads/webhooks/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "webhookId", "status" : 404