From 6036ac8fc07eda20e01ba7a80fe2daa56d6b854d Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Tue, 23 Jul 2024 14:33:02 +0000 Subject: [PATCH] [DO NOT MERGE] Add Watch Data endpoints to OpenAPI spec --- CHANGELOG.md | 4 + README.md | 29 +- docs/api/AnalyticsApi.md | 65 +++- docs/api/LiveStreamsApi.md | 29 ++ .../AnalyticsAggregatedMetricsResponse.md | 12 + ...alyticsAggregatedMetricsResponseContext.md | 38 ++ ...gregatedMetricsResponseContextTimeframe.md | 13 + .../AnalyticsMetricsBreakdownResponse.md | 13 + ...nalyticsMetricsBreakdownResponseContext.md | 39 ++ .../AnalyticsMetricsBreakdownResponseData.md | 12 + .../model/AnalyticsMetricsOverTimeResponse.md | 13 + ...AnalyticsMetricsOverTimeResponseContext.md | 34 ++ .../AnalyticsMetricsOverTimeResponseData.md | 12 + docs/model/LiveStream.md | 4 +- docs/model/LiveStreamCreationPayload.md | 4 +- docs/model/LiveStreamSession.md | 16 - docs/model/LiveStreamSessionClient.md | 14 - docs/model/LiveStreamSessionDevice.md | 14 - docs/model/LiveStreamSessionLocation.md | 13 - docs/model/LiveStreamSessionReferrer.md | 14 - docs/model/LiveStreamSessionSession.md | 13 - docs/model/LiveStreamUpdatePayload.md | 4 +- docs/model/RestreamsRequestObject.md | 2 +- docs/model/RestreamsResponseObject.md | 2 +- docs/model/UnrecognizedRequestUrl.md | 13 + docs/model/VideoCreationPayload.md | 2 +- docs/model/VideoSession.md | 16 - docs/model/VideoSessionClient.md | 14 - docs/model/VideoSessionDevice.md | 14 - docs/model/VideoSessionLocation.md | 13 - docs/model/VideoSessionOs.md | 14 - docs/model/VideoSessionReferrer.md | 14 - docs/model/VideoSessionSession.md | 14 - package.json | 2 +- src/HttpClient.ts | 2 +- src/ObjectSerializer.ts | 58 +-- src/api/AnalyticsApi.ts | 368 ++++++++++++------ src/api/LiveStreamsApi.ts | 51 +++ ... => AnalyticsAggregatedMetricsResponse.ts} | 32 +- ...alyticsAggregatedMetricsResponseContext.ts | 66 ++++ ...regatedMetricsResponseContextTimeframe.ts} | 33 +- .../AnalyticsMetricsBreakdownResponse.ts | 51 +++ ...nalyticsMetricsBreakdownResponseContext.ts | 67 ++++ ... AnalyticsMetricsBreakdownResponseData.ts} | 27 +- src/model/AnalyticsMetricsOverTimeResponse.ts | 51 +++ ...AnalyticsMetricsOverTimeResponseContext.ts | 62 +++ ...> AnalyticsMetricsOverTimeResponseData.ts} | 37 +- src/model/LiveStream.ts | 4 +- src/model/LiveStreamCreationPayload.ts | 4 +- src/model/LiveStreamSession.ts | 72 ---- src/model/LiveStreamSessionClient.ts | 57 --- src/model/LiveStreamSessionReferrer.ts | 64 --- src/model/LiveStreamUpdatePayload.ts | 4 +- src/model/RestreamsRequestObject.ts | 2 +- src/model/RestreamsResponseObject.ts | 2 +- ...ionDevice.ts => UnrecognizedRequestUrl.ts} | 27 +- src/model/VideoCreationPayload.ts | 2 +- src/model/VideoSession.ts | 72 ---- src/model/VideoSessionClient.ts | 57 --- src/model/VideoSessionOs.ts | 57 --- src/model/VideoSessionReferrer.ts | 64 --- src/model/VideoSessionSession.ts | 65 ---- .../authenticate/responses400.json | 2 +- .../refresh/responses400.json | 2 +- .../getAggregatedMetrics/responses200.json | 11 + .../responses400-0.json | 2 +- .../responses400-1.json} | 4 +- .../getAggregatedMetrics/responses404.json | 5 + .../responses429.json | 0 .../getLiveStreamsPlays/responses200-0.json | 29 -- .../getLiveStreamsPlays/responses200-1.json | 29 -- .../getLiveStreamsPlays/responses200-2.json | 29 -- .../getLiveStreamsPlays/responses400-1.json | 7 - .../getLiveStreamsPlays/responses400-2.json | 7 - .../getLiveStreamsPlays/responses400-3.json | 7 - .../getLiveStreamsPlays/responses400-4.json | 7 - .../getLiveStreamsPlays/responses403.json | 5 - .../getLiveStreamsPlays/responses404.json | 3 - .../getMetricsBreakdown/responses200.json | 31 ++ .../responses400-0.json | 2 +- .../responses400-1.json} | 4 +- .../getMetricsBreakdown/responses404.json | 5 + .../responses429.json | 0 .../getMetricsOverTime/responses200.json | 37 ++ .../getMetricsOverTime/responses400-0.json | 7 + .../responses400-1.json | 4 +- .../getMetricsOverTime/responses404.json | 5 + .../getMetricsOverTime/responses429.json | 5 + .../getVideosPlays/responses200-0.json | 29 -- .../getVideosPlays/responses200-1.json | 32 -- .../getVideosPlays/responses200-2.json | 29 -- .../getVideosPlays/responses400-2.json | 7 - .../getVideosPlays/responses400-3.json | 7 - .../getVideosPlays/responses400-4.json | 7 - .../getVideosPlays/responses403.json | 5 - .../getVideosPlays/responses404.json | 3 - .../livestreams/complete/responses404.json | 6 + .../livestreams/complete/responses429.json | 5 + .../livestreams/create/responses400-1.json | 2 +- .../livestreams/create/responses400-2.json | 2 +- .../deleteThumbnail/responses404.json | 2 +- .../livestreams/update/responses400-1.json | 2 +- .../livestreams/update/responses400-2.json | 2 +- .../uploadThumbnail/responses400.json | 2 +- .../uploadThumbnail/responses404.json | 2 +- .../playerthemes/delete/responses404.json | 2 +- .../playerthemes/deleteLogo/responses404.json | 2 +- .../playerthemes/get/responses404.json | 2 +- .../playerthemes/update/responses404.json | 2 +- .../playerthemes/uploadLogo/responses400.json | 2 +- .../playerthemes/uploadLogo/responses404.json | 2 +- test/payloads/videos/create/responses400.json | 10 +- test/payloads/videos/delete/responses404.json | 2 +- test/payloads/videos/get/responses404.json | 2 +- .../videos/getStatus/responses404.json | 2 +- .../videos/pickThumbnail/responses404.json | 2 +- test/payloads/videos/update/responses400.json | 8 +- test/payloads/videos/update/responses404.json | 2 +- test/payloads/videos/upload/responses400.json | 10 +- test/payloads/videos/upload/responses404.json | 2 +- .../videos/uploadThumbnail/responses400.json | 2 +- .../videos/uploadThumbnail/responses404.json | 2 +- .../watermarks/delete/responses404.json | 2 +- .../watermarks/upload/responses400.json | 2 +- .../webhooks/create/responses400.json | 8 +- .../webhooks/delete/responses404.json | 2 +- 126 files changed, 1171 insertions(+), 1279 deletions(-) create mode 100644 docs/model/AnalyticsAggregatedMetricsResponse.md create mode 100644 docs/model/AnalyticsAggregatedMetricsResponseContext.md create mode 100644 docs/model/AnalyticsAggregatedMetricsResponseContextTimeframe.md create mode 100644 docs/model/AnalyticsMetricsBreakdownResponse.md create mode 100644 docs/model/AnalyticsMetricsBreakdownResponseContext.md create mode 100644 docs/model/AnalyticsMetricsBreakdownResponseData.md create mode 100644 docs/model/AnalyticsMetricsOverTimeResponse.md create mode 100644 docs/model/AnalyticsMetricsOverTimeResponseContext.md create mode 100644 docs/model/AnalyticsMetricsOverTimeResponseData.md delete mode 100644 docs/model/LiveStreamSession.md delete mode 100644 docs/model/LiveStreamSessionClient.md delete mode 100644 docs/model/LiveStreamSessionDevice.md delete mode 100644 docs/model/LiveStreamSessionLocation.md delete mode 100644 docs/model/LiveStreamSessionReferrer.md delete mode 100644 docs/model/LiveStreamSessionSession.md create mode 100644 docs/model/UnrecognizedRequestUrl.md delete mode 100644 docs/model/VideoSession.md delete mode 100644 docs/model/VideoSessionClient.md delete mode 100644 docs/model/VideoSessionDevice.md delete mode 100644 docs/model/VideoSessionLocation.md delete mode 100644 docs/model/VideoSessionOs.md delete mode 100644 docs/model/VideoSessionReferrer.md delete mode 100644 docs/model/VideoSessionSession.md rename src/model/{VideoSessionLocation.ts => AnalyticsAggregatedMetricsResponse.ts} (57%) create mode 100644 src/model/AnalyticsAggregatedMetricsResponseContext.ts rename src/model/{LiveStreamSessionSession.ts => AnalyticsAggregatedMetricsResponseContextTimeframe.ts} (53%) create mode 100644 src/model/AnalyticsMetricsBreakdownResponse.ts create mode 100644 src/model/AnalyticsMetricsBreakdownResponseContext.ts rename src/model/{LiveStreamSessionLocation.ts => AnalyticsMetricsBreakdownResponseData.ts} (54%) create mode 100644 src/model/AnalyticsMetricsOverTimeResponse.ts create mode 100644 src/model/AnalyticsMetricsOverTimeResponseContext.ts rename src/model/{LiveStreamSessionDevice.ts => AnalyticsMetricsOverTimeResponseData.ts} (51%) delete mode 100644 src/model/LiveStreamSession.ts delete mode 100644 src/model/LiveStreamSessionClient.ts delete mode 100644 src/model/LiveStreamSessionReferrer.ts rename src/model/{VideoSessionDevice.ts => UnrecognizedRequestUrl.ts} (63%) delete mode 100644 src/model/VideoSession.ts delete mode 100644 src/model/VideoSessionClient.ts delete mode 100644 src/model/VideoSessionOs.ts delete mode 100644 src/model/VideoSessionReferrer.ts delete mode 100644 src/model/VideoSessionSession.ts create mode 100644 test/payloads/analytics/getAggregatedMetrics/responses200.json rename test/payloads/analytics/{getVideosPlays => getAggregatedMetrics}/responses400-0.json (88%) rename test/payloads/analytics/{getVideosPlays/responses400-5.json => getAggregatedMetrics/responses400-1.json} (61%) create mode 100644 test/payloads/analytics/getAggregatedMetrics/responses404.json rename test/payloads/analytics/{getLiveStreamsPlays => getAggregatedMetrics}/responses429.json (100%) delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses200-0.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses200-1.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses200-2.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses400-1.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses400-2.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses400-3.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses400-4.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses403.json delete mode 100644 test/payloads/analytics/getLiveStreamsPlays/responses404.json create mode 100644 test/payloads/analytics/getMetricsBreakdown/responses200.json rename test/payloads/analytics/{getLiveStreamsPlays => getMetricsBreakdown}/responses400-0.json (88%) rename test/payloads/analytics/{getLiveStreamsPlays/responses400-5.json => getMetricsBreakdown/responses400-1.json} (61%) create mode 100644 test/payloads/analytics/getMetricsBreakdown/responses404.json rename test/payloads/analytics/{getVideosPlays => getMetricsBreakdown}/responses429.json (100%) create mode 100644 test/payloads/analytics/getMetricsOverTime/responses200.json create mode 100644 test/payloads/analytics/getMetricsOverTime/responses400-0.json rename test/payloads/analytics/{getVideosPlays => getMetricsOverTime}/responses400-1.json (58%) create mode 100644 test/payloads/analytics/getMetricsOverTime/responses404.json create mode 100644 test/payloads/analytics/getMetricsOverTime/responses429.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses200-0.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses200-1.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses200-2.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses400-2.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses400-3.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses400-4.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses403.json delete mode 100644 test/payloads/analytics/getVideosPlays/responses404.json create mode 100644 test/payloads/livestreams/complete/responses404.json create mode 100644 test/payloads/livestreams/complete/responses429.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f059ef..06c20b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All changes to this project will be documented in this file. +## [2.6.0] - 2024-07-29 +- Add new analytics methods +- Add livestream complete() method + ## [2.5.7] - 2024-04-23 - Add *WithResponseHeaders() methods diff --git a/README.md b/README.md index a895b36..1ea2e98 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,9 @@ const ApiVideoClient = require('@api.video/nodejs-client'); Method | Description | HTTP request ------------- | ------------- | ------------- -[**getLiveStreamsPlays()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/AnalyticsApi.md#getLiveStreamsPlays) | Get play events for live stream | **GET** `/analytics/live-streams/plays` -[**getVideosPlays()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/AnalyticsApi.md#getVideosPlays) | Get play events for video | **GET** `/analytics/videos/plays` +[**getAggregatedMetrics()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/AnalyticsApi.md#getAggregatedMetrics) | Retrieve aggregated metrics | **GET** `/data/metrics/{metric}/{aggregation}` +[**getMetricsBreakdown()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/AnalyticsApi.md#getMetricsBreakdown) | Retrieve metrics in a breakdown of dimensions | **GET** `/data/buckets/{metric}/{breakdown}` +[**getMetricsOverTime()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/AnalyticsApi.md#getMetricsOverTime) | Retrieve metrics over time | **GET** `/data/timeseries/{metric}` #### CaptionsApi @@ -144,6 +145,7 @@ Method | Description | HTTP request [**list()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/LiveStreamsApi.md#list) | List all live streams | **GET** `/live-streams` [**uploadThumbnail()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/LiveStreamsApi.md#uploadThumbnail) | Upload a thumbnail | **POST** `/live-streams/{liveStreamId}/thumbnail` [**deleteThumbnail()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/LiveStreamsApi.md#deleteThumbnail) | Delete a thumbnail | **DELETE** `/live-streams/{liveStreamId}/thumbnail` +[**complete()**](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/api/LiveStreamsApi.md#complete) | Complete a live stream | **PUT** `/live-streams/{liveStreamId}/complete` #### PlayerThemesApi @@ -209,7 +211,16 @@ Method | Description | HTTP request - [AccessToken](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AccessToken.md) - [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AdditionalBadRequestErrors.md) + - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsAggregatedMetricsResponse.md) + - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsAggregatedMetricsResponseContext.md) + - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsAggregatedMetricsResponseContextTimeframe.md) - [AnalyticsData](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsData.md) + - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsMetricsBreakdownResponse.md) + - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsMetricsBreakdownResponseContext.md) + - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsMetricsBreakdownResponseData.md) + - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsMetricsOverTimeResponse.md) + - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsMetricsOverTimeResponseContext.md) + - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsMetricsOverTimeResponseData.md) - [AnalyticsPlays400Error](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsPlays400Error.md) - [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AnalyticsPlaysResponse.md) - [AuthenticatePayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/AuthenticatePayload.md) @@ -225,12 +236,6 @@ Method | Description | HTTP request - [LiveStreamAssets](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamAssets.md) - [LiveStreamCreationPayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamCreationPayload.md) - [LiveStreamListResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamListResponse.md) - - [LiveStreamSession](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamSession.md) - - [LiveStreamSessionClient](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamSessionClient.md) - - [LiveStreamSessionDevice](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamSessionDevice.md) - - [LiveStreamSessionLocation](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamSessionLocation.md) - - [LiveStreamSessionReferrer](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamSessionReferrer.md) - - [LiveStreamSessionSession](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamSessionSession.md) - [LiveStreamUpdatePayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/LiveStreamUpdatePayload.md) - [Metadata](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/Metadata.md) - [Model403ErrorSchema](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/Model403ErrorSchema.md) @@ -250,18 +255,12 @@ Method | Description | HTTP request - [TokenCreationPayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TooManyRequests.md) + - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/UnrecognizedRequestUrl.md) - [UploadToken](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/UploadToken.md) - [Video](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoAssets.md) - [VideoClip](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoClip.md) - [VideoCreationPayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoCreationPayload.md) - - [VideoSession](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSession.md) - - [VideoSessionClient](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSessionClient.md) - - [VideoSessionDevice](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSessionDevice.md) - - [VideoSessionLocation](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSessionLocation.md) - - [VideoSessionOs](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSessionOs.md) - - [VideoSessionReferrer](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSessionReferrer.md) - - [VideoSessionSession](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSessionSession.md) - [VideoSource](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSource.md) - [VideoSourceLiveStream](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSourceLiveStream.md) - [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoSourceLiveStreamLink.md) diff --git a/docs/api/AnalyticsApi.md b/docs/api/AnalyticsApi.md index 25bad22..c6828fb 100644 --- a/docs/api/AnalyticsApi.md +++ b/docs/api/AnalyticsApi.md @@ -4,58 +4,87 @@ All URIs are relative to *https://ws.api.video* | Method | Description | HTTP request | | ------------- | ------------- | ------------- | -| [**getLiveStreamsPlays()**](AnalyticsApi.md#getLiveStreamsPlays) | Get play events for live stream | **GET** /analytics/live-streams/plays | -| [**getVideosPlays()**](AnalyticsApi.md#getVideosPlays) | Get play events for video | **GET** /analytics/videos/plays | +| [**getAggregatedMetrics()**](AnalyticsApi.md#getAggregatedMetrics) | Retrieve aggregated metrics | **GET** /data/metrics/{metric}/{aggregation} | +| [**getMetricsBreakdown()**](AnalyticsApi.md#getMetricsBreakdown) | Retrieve metrics in a breakdown of dimensions | **GET** /data/buckets/{metric}/{breakdown} | +| [**getMetricsOverTime()**](AnalyticsApi.md#getMetricsOverTime) | Retrieve metrics over time | **GET** /data/timeseries/{metric} | - -## **`getLiveStreamsPlays()` - Get play events for live stream** + +## **`getAggregatedMetrics()` - 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. ### Parameters | Name | Type | Required | Description | | ------------- | ------------- | ------------- | ------------- | - | **from** | **string**| **yes**| 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** | **'liveStreamId' \| 'emittedAt' \| 'country' \| 'deviceType' \| 'operatingSystem' \| 'browser'**| **yes**| 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`. | - | **to** | **string**| no| 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. | - | **filter** | **string**| no| 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. | + | **metric** | **'play' \| 'start' \| 'end' \| 'impression' \| 'impression-time' \| 'watch-time'**| **yes**| 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. | + | **aggregation** | **'count' \| 'rate' \| 'total' \| 'average' \| 'sum'**| **yes**| 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. | + | **from** | **Date**| no| 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`. | + | **to** | **Date**| no| 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. | + | **filterBy** | **string**| no| 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/). 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/). - `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`. | + + +### Return type + +Promise<[**AnalyticsAggregatedMetricsResponse**](../model/AnalyticsAggregatedMetricsResponse.md)>. + + + + +--- + + +## **`getMetricsBreakdown()` - Retrieve metrics in a breakdown of dimensions** + + +Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + +### Parameters + +| Name | Type | Required | Description | +| ------------- | ------------- | ------------- | ------------- | + | **metric** | **'play' \| 'play-rate' \| 'play-total' \| 'start' \| 'end' \| 'impression'**| **yes**| 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. | + | **breakdown** | **'media-id' \| 'media-type' \| 'continent' \| 'country' \| 'device-type' \| 'operating-system' \| 'browser'**| **yes**| 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`. | + | **from** | **Date**| no| 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` | + | **to** | **Date**| no| 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. | + | **filterBy** | **string**| no| 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. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. 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/). 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/). - `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`. | | **currentPage** | **number**| no| Choose the number of search results to return per page. Minimum value: 1 | | **pageSize** | **number**| no| Results per page. Allowed values 1-100, default is 25. | ### Return type -Promise<[**AnalyticsPlaysResponse**](../model/AnalyticsPlaysResponse.md)>. +Promise<[**AnalyticsMetricsBreakdownResponse**](../model/AnalyticsMetricsBreakdownResponse.md)>. --- - -## **`getVideosPlays()` - Get play events for video** + +## **`getMetricsOverTime()` - 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 ### Parameters | Name | Type | Required | Description | | ------------- | ------------- | ------------- | ------------- | - | **from** | **string**| **yes**| 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** | **'videoId' \| 'emittedAt' \| 'country' \| 'deviceType' \| 'operatingSystem' \| 'browser'**| **yes**| 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`. | - | **to** | **string**| no| 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. | - | **filter** | **string**| no| 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. | + | **metric** | **'play' \| 'play-rate' \| 'start' \| 'end' \| 'impression'**| **yes**| 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. | + | **from** | **Date**| no| 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` | + | **to** | **Date**| no| 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. | + | **interval** | **Date**| no| 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`. | + | **filterBy** | **string**| no| 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. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. 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/). 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/). - `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`. | | **currentPage** | **number**| no| Choose the number of search results to return per page. Minimum value: 1 | | **pageSize** | **number**| no| Results per page. Allowed values 1-100, default is 25. | ### Return type -Promise<[**AnalyticsPlaysResponse**](../model/AnalyticsPlaysResponse.md)>. +Promise<[**AnalyticsMetricsOverTimeResponse**](../model/AnalyticsMetricsOverTimeResponse.md)>. diff --git a/docs/api/LiveStreamsApi.md b/docs/api/LiveStreamsApi.md index cf2a188..8e5f267 100644 --- a/docs/api/LiveStreamsApi.md +++ b/docs/api/LiveStreamsApi.md @@ -11,6 +11,7 @@ All URIs are relative to *https://ws.api.video* | [**list()**](LiveStreamsApi.md#list) | List all live streams | **GET** /live-streams | | [**uploadThumbnail()**](LiveStreamsApi.md#uploadThumbnail) | Upload a thumbnail | **POST** /live-streams/{liveStreamId}/thumbnail | | [**deleteThumbnail()**](LiveStreamsApi.md#deleteThumbnail) | Delete a thumbnail | **DELETE** /live-streams/{liveStreamId}/thumbnail | +| [**complete()**](LiveStreamsApi.md#complete) | Complete a live stream | **PUT** /live-streams/{liveStreamId}/complete | @@ -172,5 +173,33 @@ Promise<[**LiveStream**](../model/LiveStream.md)>. +--- + + +## **`complete()` - 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. + + + +### Parameters + +| Name | Type | Required | Description | +| ------------- | ------------- | ------------- | ------------- | + | **liveStreamId** | **string**| **yes**| The unique ID for the live stream you want to complete. | + + +### Return type + +Promise<[**void**](../model/.md)>. + + + + --- diff --git a/docs/model/AnalyticsAggregatedMetricsResponse.md b/docs/model/AnalyticsAggregatedMetricsResponse.md new file mode 100644 index 0000000..b66883f --- /dev/null +++ b/docs/model/AnalyticsAggregatedMetricsResponse.md @@ -0,0 +1,12 @@ + +# AnalyticsAggregatedMetricsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**data** | **number** | | + + + diff --git a/docs/model/AnalyticsAggregatedMetricsResponseContext.md b/docs/model/AnalyticsAggregatedMetricsResponseContext.md new file mode 100644 index 0000000..f674467 --- /dev/null +++ b/docs/model/AnalyticsAggregatedMetricsResponseContext.md @@ -0,0 +1,38 @@ + +# AnalyticsAggregatedMetricsResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | [**AnalyticsAggregatedMetricsResponseContextMetricEnum**](#AnalyticsAggregatedMetricsResponseContextMetricEnum) | Returns the metric you selected. | [optional] +**aggregation** | [**AnalyticsAggregatedMetricsResponseContextAggregationEnum**](#AnalyticsAggregatedMetricsResponseContextAggregationEnum) | Returns the aggregation you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + + + +## Enum: AnalyticsAggregatedMetricsResponseContextMetricEnum + +Name | Value +---- | ----- +Play | 'play' +Start | 'start' +End | 'end' +Impression | 'impression' +ImpressionTime | 'impression-time' +WatchTime | 'watch-time' + + + +## Enum: AnalyticsAggregatedMetricsResponseContextAggregationEnum + +Name | Value +---- | ----- +Count | 'count' +Rate | 'rate' +Total | 'total' +Average | 'average' +Sum | 'sum' + + + diff --git a/docs/model/AnalyticsAggregatedMetricsResponseContextTimeframe.md b/docs/model/AnalyticsAggregatedMetricsResponseContextTimeframe.md new file mode 100644 index 0000000..3682e42 --- /dev/null +++ b/docs/model/AnalyticsAggregatedMetricsResponseContextTimeframe.md @@ -0,0 +1,13 @@ + +# AnalyticsAggregatedMetricsResponseContextTimeframe + +Returns the starting and ending date-times of the period you want analytics for. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **Date** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] +**to** | **Date** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] + + + diff --git a/docs/model/AnalyticsMetricsBreakdownResponse.md b/docs/model/AnalyticsMetricsBreakdownResponse.md new file mode 100644 index 0000000..6543742 --- /dev/null +++ b/docs/model/AnalyticsMetricsBreakdownResponse.md @@ -0,0 +1,13 @@ + +# AnalyticsMetricsBreakdownResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | | +**data** | [**Array<AnalyticsMetricsBreakdownResponseData>**](AnalyticsMetricsBreakdownResponseData.md) | Returns an array of dimensions and their respective metrics. | +**pagination** | [**Pagination**](Pagination.md) | | + + + diff --git a/docs/model/AnalyticsMetricsBreakdownResponseContext.md b/docs/model/AnalyticsMetricsBreakdownResponseContext.md new file mode 100644 index 0000000..f3b0e50 --- /dev/null +++ b/docs/model/AnalyticsMetricsBreakdownResponseContext.md @@ -0,0 +1,39 @@ + +# AnalyticsMetricsBreakdownResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | [**AnalyticsMetricsBreakdownResponseContextMetricEnum**](#AnalyticsMetricsBreakdownResponseContextMetricEnum) | Returns the metric you selected. | [optional] +**breakdown** | [**AnalyticsMetricsBreakdownResponseContextBreakdownEnum**](#AnalyticsMetricsBreakdownResponseContextBreakdownEnum) | Returns the dimension you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + + + +## Enum: AnalyticsMetricsBreakdownResponseContextMetricEnum + +Name | Value +---- | ----- +Play | 'play' +PlayRate | 'play-rate' +Start | 'start' +End | 'end' +Impression | 'impression' + + + +## Enum: AnalyticsMetricsBreakdownResponseContextBreakdownEnum + +Name | Value +---- | ----- +MediaId | 'media-id' +MediaType | 'media-type' +Continent | 'continent' +Country | 'country' +DeviceType | 'device-type' +OperatingSystem | 'operating-system' +Browser | 'browser' + + + diff --git a/docs/model/AnalyticsMetricsBreakdownResponseData.md b/docs/model/AnalyticsMetricsBreakdownResponseData.md new file mode 100644 index 0000000..ff381e6 --- /dev/null +++ b/docs/model/AnalyticsMetricsBreakdownResponseData.md @@ -0,0 +1,12 @@ + +# 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** | **number** | Returns the data for a specific dimension value. | [optional] + + + diff --git a/docs/model/AnalyticsMetricsOverTimeResponse.md b/docs/model/AnalyticsMetricsOverTimeResponse.md new file mode 100644 index 0000000..083b163 --- /dev/null +++ b/docs/model/AnalyticsMetricsOverTimeResponse.md @@ -0,0 +1,13 @@ + +# AnalyticsMetricsOverTimeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | | +**data** | [**Array<AnalyticsMetricsOverTimeResponseData>**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . | +**pagination** | [**Pagination**](Pagination.md) | | + + + diff --git a/docs/model/AnalyticsMetricsOverTimeResponseContext.md b/docs/model/AnalyticsMetricsOverTimeResponseContext.md new file mode 100644 index 0000000..d3775b6 --- /dev/null +++ b/docs/model/AnalyticsMetricsOverTimeResponseContext.md @@ -0,0 +1,34 @@ + +# AnalyticsMetricsOverTimeResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | [**AnalyticsMetricsOverTimeResponseContextMetricEnum**](#AnalyticsMetricsOverTimeResponseContextMetricEnum) | Returns the metric you selected. | [optional] +**interval** | [**AnalyticsMetricsOverTimeResponseContextIntervalEnum**](#AnalyticsMetricsOverTimeResponseContextIntervalEnum) | Returns the interval you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + + + +## Enum: AnalyticsMetricsOverTimeResponseContextMetricEnum + +Name | Value +---- | ----- +Play | 'play' +PlayRate | 'play-rate' +Start | 'start' +End | 'end' +Impression | 'impression' + + + +## Enum: AnalyticsMetricsOverTimeResponseContextIntervalEnum + +Name | Value +---- | ----- +Hour | 'hour' +Day | 'day' + + + diff --git a/docs/model/AnalyticsMetricsOverTimeResponseData.md b/docs/model/AnalyticsMetricsOverTimeResponseData.md new file mode 100644 index 0000000..1a6712c --- /dev/null +++ b/docs/model/AnalyticsMetricsOverTimeResponseData.md @@ -0,0 +1,12 @@ + +# 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** | **number** | Returns the data for a specific metric value. | [optional] + + + diff --git a/docs/model/LiveStream.md b/docs/model/LiveStream.md index c2b013b..6a763e4 100644 --- a/docs/model/LiveStream.md +++ b/docs/model/LiveStream.md @@ -8,11 +8,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** | [**Array<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of RTMP restream destinations. | +**restreams** | [**Array<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of restream destinations. | **createdAt** | **Date** | When the player was created, presented in ISO-8601 format. | [optional] **updatedAt** | **Date** | When the player was last updated, presented in ISO-8601 format. | [optional] diff --git a/docs/model/LiveStreamCreationPayload.md b/docs/model/LiveStreamCreationPayload.md index 1be91df..b04be58 100644 --- a/docs/model/LiveStreamCreationPayload.md +++ b/docs/model/LiveStreamCreationPayload.md @@ -6,9 +6,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** | [**Array<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** | [**Array<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] diff --git a/docs/model/LiveStreamSession.md b/docs/model/LiveStreamSession.md deleted file mode 100644 index 52d25a6..0000000 --- a/docs/model/LiveStreamSession.md +++ /dev/null @@ -1,16 +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] - - - diff --git a/docs/model/LiveStreamSessionClient.md b/docs/model/LiveStreamSessionClient.md deleted file mode 100644 index 012d4f4..0000000 --- a/docs/model/LiveStreamSessionClient.md +++ /dev/null @@ -1,14 +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] - - - diff --git a/docs/model/LiveStreamSessionDevice.md b/docs/model/LiveStreamSessionDevice.md deleted file mode 100644 index e288e62..0000000 --- a/docs/model/LiveStreamSessionDevice.md +++ /dev/null @@ -1,14 +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] - - - diff --git a/docs/model/LiveStreamSessionLocation.md b/docs/model/LiveStreamSessionLocation.md deleted file mode 100644 index 01fa46e..0000000 --- a/docs/model/LiveStreamSessionLocation.md +++ /dev/null @@ -1,13 +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] - - - diff --git a/docs/model/LiveStreamSessionReferrer.md b/docs/model/LiveStreamSessionReferrer.md deleted file mode 100644 index 4173b81..0000000 --- a/docs/model/LiveStreamSessionReferrer.md +++ /dev/null @@ -1,14 +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] - - - diff --git a/docs/model/LiveStreamSessionSession.md b/docs/model/LiveStreamSessionSession.md deleted file mode 100644 index 50032b7..0000000 --- a/docs/model/LiveStreamSessionSession.md +++ /dev/null @@ -1,13 +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** | **Date** | When the session started, with the date and time presented in ISO-8601 format. | [optional] -**endedAt** | **Date** | When the session ended, with the date and time presented in ISO-8601 format. | [optional] - - - diff --git a/docs/model/LiveStreamUpdatePayload.md b/docs/model/LiveStreamUpdatePayload.md index 7381f7d..ba831bf 100644 --- a/docs/model/LiveStreamUpdatePayload.md +++ b/docs/model/LiveStreamUpdatePayload.md @@ -6,9 +6,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** | [**Array<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** | [**Array<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] diff --git a/docs/model/RestreamsRequestObject.md b/docs/model/RestreamsRequestObject.md index 4220aa2..712be94 100644 --- a/docs/model/RestreamsRequestObject.md +++ b/docs/model/RestreamsRequestObject.md @@ -7,7 +7,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/model/RestreamsResponseObject.md b/docs/model/RestreamsResponseObject.md index 311d699..d6d619b 100644 --- a/docs/model/RestreamsResponseObject.md +++ b/docs/model/RestreamsResponseObject.md @@ -6,7 +6,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/model/UnrecognizedRequestUrl.md b/docs/model/UnrecognizedRequestUrl.md new file mode 100644 index 0000000..b44c75c --- /dev/null +++ b/docs/model/UnrecognizedRequestUrl.md @@ -0,0 +1,13 @@ + +# 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** | **number** | The HTTP status code. | [optional] + + + diff --git a/docs/model/VideoCreationPayload.md b/docs/model/VideoCreationPayload.md index edd5219..d6c4d3d 100644 --- a/docs/model/VideoCreationPayload.md +++ b/docs/model/VideoCreationPayload.md @@ -8,7 +8,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/model/VideoSession.md b/docs/model/VideoSession.md deleted file mode 100644 index 2ee8027..0000000 --- a/docs/model/VideoSession.md +++ /dev/null @@ -1,16 +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] - - - diff --git a/docs/model/VideoSessionClient.md b/docs/model/VideoSessionClient.md deleted file mode 100644 index f68b762..0000000 --- a/docs/model/VideoSessionClient.md +++ /dev/null @@ -1,14 +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] - - - diff --git a/docs/model/VideoSessionDevice.md b/docs/model/VideoSessionDevice.md deleted file mode 100644 index ede79b1..0000000 --- a/docs/model/VideoSessionDevice.md +++ /dev/null @@ -1,14 +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] - - - diff --git a/docs/model/VideoSessionLocation.md b/docs/model/VideoSessionLocation.md deleted file mode 100644 index c8b411b..0000000 --- a/docs/model/VideoSessionLocation.md +++ /dev/null @@ -1,13 +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] - - - diff --git a/docs/model/VideoSessionOs.md b/docs/model/VideoSessionOs.md deleted file mode 100644 index 640df9e..0000000 --- a/docs/model/VideoSessionOs.md +++ /dev/null @@ -1,14 +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] - - - diff --git a/docs/model/VideoSessionReferrer.md b/docs/model/VideoSessionReferrer.md deleted file mode 100644 index 7d39a8d..0000000 --- a/docs/model/VideoSessionReferrer.md +++ /dev/null @@ -1,14 +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] - - - diff --git a/docs/model/VideoSessionSession.md b/docs/model/VideoSessionSession.md deleted file mode 100644 index ac947ac..0000000 --- a/docs/model/VideoSessionSession.md +++ /dev/null @@ -1,14 +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** | **Date** | When the video session started, presented in ISO-8601 format. | [optional] -**endedAt** | **Date** | When the video session ended, presented in ISO-8601 format. | [optional] -**metadata** | [**Array<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] - - - diff --git a/package.json b/package.json index 0b7106d..0d9e70a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@api.video/nodejs-client", - "version": "2.5.7", + "version": "2.6.0", "description": "api.video nodejs API client", "keywords": [ "api.video", diff --git a/src/HttpClient.ts b/src/HttpClient.ts index e0fe5ae..4c2e90b 100644 --- a/src/HttpClient.ts +++ b/src/HttpClient.ts @@ -59,7 +59,7 @@ export default class HttpClient { this.chunkSize = params.chunkSize; this.headers = new AxiosHeaders({ Accept: 'application/json, */*;q=0.8', - 'AV-Origin-Client': 'nodejs:2.5.7', + 'AV-Origin-Client': 'nodejs:2.6.0', Authorization: this.apiKey ? `Basic ${encode(`${this.apiKey}:`)}` : '', ...(params.applicationName && params.applicationVersion ? { diff --git a/src/ObjectSerializer.ts b/src/ObjectSerializer.ts index 3ce5832..25d0104 100644 --- a/src/ObjectSerializer.ts +++ b/src/ObjectSerializer.ts @@ -12,7 +12,16 @@ import AccessToken from './model/AccessToken'; import AdditionalBadRequestErrors from './model/AdditionalBadRequestErrors'; +import AnalyticsAggregatedMetricsResponse from './model/AnalyticsAggregatedMetricsResponse'; +import AnalyticsAggregatedMetricsResponseContext from './model/AnalyticsAggregatedMetricsResponseContext'; +import AnalyticsAggregatedMetricsResponseContextTimeframe from './model/AnalyticsAggregatedMetricsResponseContextTimeframe'; import AnalyticsData from './model/AnalyticsData'; +import AnalyticsMetricsBreakdownResponse from './model/AnalyticsMetricsBreakdownResponse'; +import AnalyticsMetricsBreakdownResponseContext from './model/AnalyticsMetricsBreakdownResponseContext'; +import AnalyticsMetricsBreakdownResponseData from './model/AnalyticsMetricsBreakdownResponseData'; +import AnalyticsMetricsOverTimeResponse from './model/AnalyticsMetricsOverTimeResponse'; +import AnalyticsMetricsOverTimeResponseContext from './model/AnalyticsMetricsOverTimeResponseContext'; +import AnalyticsMetricsOverTimeResponseData from './model/AnalyticsMetricsOverTimeResponseData'; import AnalyticsPlays400Error from './model/AnalyticsPlays400Error'; import AnalyticsPlaysResponse from './model/AnalyticsPlaysResponse'; import AuthenticatePayload from './model/AuthenticatePayload'; @@ -28,12 +37,6 @@ import LiveStream from './model/LiveStream'; import LiveStreamAssets from './model/LiveStreamAssets'; import LiveStreamCreationPayload from './model/LiveStreamCreationPayload'; import LiveStreamListResponse from './model/LiveStreamListResponse'; -import LiveStreamSession from './model/LiveStreamSession'; -import LiveStreamSessionClient from './model/LiveStreamSessionClient'; -import LiveStreamSessionDevice from './model/LiveStreamSessionDevice'; -import LiveStreamSessionLocation from './model/LiveStreamSessionLocation'; -import LiveStreamSessionReferrer from './model/LiveStreamSessionReferrer'; -import LiveStreamSessionSession from './model/LiveStreamSessionSession'; import LiveStreamUpdatePayload from './model/LiveStreamUpdatePayload'; import Metadata from './model/Metadata'; import Model403ErrorSchema from './model/Model403ErrorSchema'; @@ -53,18 +56,12 @@ import RestreamsResponseObject from './model/RestreamsResponseObject'; import TokenCreationPayload from './model/TokenCreationPayload'; import TokenListResponse from './model/TokenListResponse'; import TooManyRequests from './model/TooManyRequests'; +import UnrecognizedRequestUrl from './model/UnrecognizedRequestUrl'; import UploadToken from './model/UploadToken'; import Video from './model/Video'; import VideoAssets from './model/VideoAssets'; import VideoClip from './model/VideoClip'; import VideoCreationPayload from './model/VideoCreationPayload'; -import VideoSession from './model/VideoSession'; -import VideoSessionClient from './model/VideoSessionClient'; -import VideoSessionDevice from './model/VideoSessionDevice'; -import VideoSessionLocation from './model/VideoSessionLocation'; -import VideoSessionOs from './model/VideoSessionOs'; -import VideoSessionReferrer from './model/VideoSessionReferrer'; -import VideoSessionSession from './model/VideoSessionSession'; import VideoSource from './model/VideoSource'; import VideoSourceLiveStream from './model/VideoSourceLiveStream'; import VideoSourceLiveStreamLink from './model/VideoSourceLiveStreamLink'; @@ -101,6 +98,12 @@ const supportedMediaTypes: { [mediaType: string]: number } = { }; const enumsMap: Set = new Set([ + 'AnalyticsAggregatedMetricsResponseContextMetricEnum', + 'AnalyticsAggregatedMetricsResponseContextAggregationEnum', + 'AnalyticsMetricsBreakdownResponseContextMetricEnum', + 'AnalyticsMetricsBreakdownResponseContextBreakdownEnum', + 'AnalyticsMetricsOverTimeResponseContextMetricEnum', + 'AnalyticsMetricsOverTimeResponseContextIntervalEnum', 'QualityTypeEnum', 'QualityQualityEnum', 'QualityStatusEnum', @@ -110,7 +113,20 @@ const enumsMap: Set = new Set([ const typeMap: { [index: string]: any } = { AccessToken: AccessToken, AdditionalBadRequestErrors: AdditionalBadRequestErrors, + AnalyticsAggregatedMetricsResponse: AnalyticsAggregatedMetricsResponse, + AnalyticsAggregatedMetricsResponseContext: + AnalyticsAggregatedMetricsResponseContext, + AnalyticsAggregatedMetricsResponseContextTimeframe: + AnalyticsAggregatedMetricsResponseContextTimeframe, AnalyticsData: AnalyticsData, + AnalyticsMetricsBreakdownResponse: AnalyticsMetricsBreakdownResponse, + AnalyticsMetricsBreakdownResponseContext: + AnalyticsMetricsBreakdownResponseContext, + AnalyticsMetricsBreakdownResponseData: AnalyticsMetricsBreakdownResponseData, + AnalyticsMetricsOverTimeResponse: AnalyticsMetricsOverTimeResponse, + AnalyticsMetricsOverTimeResponseContext: + AnalyticsMetricsOverTimeResponseContext, + AnalyticsMetricsOverTimeResponseData: AnalyticsMetricsOverTimeResponseData, AnalyticsPlays400Error: AnalyticsPlays400Error, AnalyticsPlaysResponse: AnalyticsPlaysResponse, AuthenticatePayload: AuthenticatePayload, @@ -126,12 +142,6 @@ const typeMap: { [index: string]: any } = { LiveStreamAssets: LiveStreamAssets, LiveStreamCreationPayload: LiveStreamCreationPayload, LiveStreamListResponse: LiveStreamListResponse, - LiveStreamSession: LiveStreamSession, - LiveStreamSessionClient: LiveStreamSessionClient, - LiveStreamSessionDevice: LiveStreamSessionDevice, - LiveStreamSessionLocation: LiveStreamSessionLocation, - LiveStreamSessionReferrer: LiveStreamSessionReferrer, - LiveStreamSessionSession: LiveStreamSessionSession, LiveStreamUpdatePayload: LiveStreamUpdatePayload, Metadata: Metadata, Model403ErrorSchema: Model403ErrorSchema, @@ -151,18 +161,12 @@ const typeMap: { [index: string]: any } = { TokenCreationPayload: TokenCreationPayload, TokenListResponse: TokenListResponse, TooManyRequests: TooManyRequests, + UnrecognizedRequestUrl: UnrecognizedRequestUrl, UploadToken: UploadToken, Video: Video, VideoAssets: VideoAssets, VideoClip: VideoClip, VideoCreationPayload: VideoCreationPayload, - VideoSession: VideoSession, - VideoSessionClient: VideoSessionClient, - VideoSessionDevice: VideoSessionDevice, - VideoSessionLocation: VideoSessionLocation, - VideoSessionOs: VideoSessionOs, - VideoSessionReferrer: VideoSessionReferrer, - VideoSessionSession: VideoSessionSession, VideoSource: VideoSource, VideoSourceLiveStream: VideoSourceLiveStream, VideoSourceLiveStreamLink: VideoSourceLiveStreamLink, @@ -231,7 +235,7 @@ export default class ObjectSerializer { return data.getFullYear() + '-' + month + '-' + day; } else { - return data.toISOString(); + return data.toISOString().split('.')[0] + 'Z'; } } else { if (enumsMap.has(type)) { diff --git a/src/api/AnalyticsApi.ts b/src/api/AnalyticsApi.ts index 903c825..e066f54 100644 --- a/src/api/AnalyticsApi.ts +++ b/src/api/AnalyticsApi.ts @@ -12,7 +12,9 @@ import { URLSearchParams } from 'url'; import ObjectSerializer from '../ObjectSerializer'; import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient'; -import AnalyticsPlaysResponse from '../model/AnalyticsPlaysResponse'; +import AnalyticsAggregatedMetricsResponse from '../model/AnalyticsAggregatedMetricsResponse'; +import AnalyticsMetricsBreakdownResponse from '../model/AnalyticsMetricsBreakdownResponse'; +import AnalyticsMetricsOverTimeResponse from '../model/AnalyticsMetricsOverTimeResponse'; /** * no description @@ -25,81 +27,228 @@ export default class AnalyticsApi { } /** - * Retrieve filtered analytics about the number of plays for your live streams in a project. - * Get play events for live stream + * Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + * Retrieve aggregated metrics * @param {Object} searchParams - * @param { string } searchParams.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 { 'liveStreamId' | 'emittedAt' | 'country' | 'deviceType' | 'operatingSystem' | 'browser' } searchParams.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: `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`. - * @param { string } searchParams.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. - * @param { string } searchParams.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. + * @param { 'play' | 'start' | 'end' | 'impression' | 'impression-time' | 'watch-time' } searchParams.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. + * @param { 'count' | 'rate' | 'total' | 'average' | 'sum' } searchParams.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. + * @param { Date } searchParams.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`. + * @param { Date } searchParams.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. + * @param { string } searchParams.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/). 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/). - `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`. + */ + public async getAggregatedMetrics(args: { + metric: + | 'play' + | 'start' + | 'end' + | 'impression' + | 'impression-time' + | 'watch-time'; + aggregation: 'count' | 'rate' | 'total' | 'average' | 'sum'; + from?: Date; + to?: Date; + filterBy?: string; + }): Promise { + return this.getAggregatedMetricsWithResponseHeaders(args).then( + (res) => res.body + ); + } + + /** + * Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + * Retrieve aggregated metrics + * @param {Object} searchParams + * @param { 'play' | 'start' | 'end' | 'impression' | 'impression-time' | 'watch-time' } searchParams.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. + * @param { 'count' | 'rate' | 'total' | 'average' | 'sum' } searchParams.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. + * @param { Date } searchParams.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`. + * @param { Date } searchParams.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. + * @param { string } searchParams.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/). 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/). - `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`. + */ + public async getAggregatedMetricsWithResponseHeaders({ + metric, + aggregation, + from, + to, + filterBy, + }: { + metric: + | 'play' + | 'start' + | 'end' + | 'impression' + | 'impression-time' + | 'watch-time'; + aggregation: 'count' | 'rate' | 'total' | 'average' | 'sum'; + from?: Date; + to?: Date; + filterBy?: string; + }): Promise<{ + headers: ApiResponseHeaders; + body: AnalyticsAggregatedMetricsResponse; + }> { + const queryParams: QueryOptions = {}; + queryParams.headers = {}; + if (metric === null || metric === undefined) { + throw new Error( + 'Required parameter metric was null or undefined when calling getAggregatedMetrics.' + ); + } + if (aggregation === null || aggregation === undefined) { + throw new Error( + 'Required parameter aggregation was null or undefined when calling getAggregatedMetrics.' + ); + } + // Path Params + const localVarPath = '/data/metrics/{metric}/{aggregation}' + .substring(1) + .replace('{' + 'metric' + '}', encodeURIComponent(String(metric))) + .replace( + '{' + 'aggregation' + '}', + encodeURIComponent(String(aggregation)) + ); + + // Query Params + const urlSearchParams = new URLSearchParams(); + + if (from !== undefined) { + urlSearchParams.append( + 'from', + ObjectSerializer.serialize(from, 'Date', 'date-time') + ); + } + if (to !== undefined) { + urlSearchParams.append( + 'to', + ObjectSerializer.serialize(to, 'Date', 'date-time') + ); + } + if (filterBy !== undefined) { + urlSearchParams.append( + 'filterBy', + ObjectSerializer.serialize(filterBy, 'string', '') + ); + } + + queryParams.searchParams = urlSearchParams; + + queryParams.method = 'GET'; + + return this.httpClient.call(localVarPath, queryParams).then((response) => { + return { + headers: response.headers, + body: ObjectSerializer.deserialize( + ObjectSerializer.parse( + response.body, + response.headers['content-type'] + ), + 'AnalyticsAggregatedMetricsResponse', + '' + ) as AnalyticsAggregatedMetricsResponse, + }; + }); + } + + /** + * Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + * Retrieve metrics in a breakdown of dimensions + * @param {Object} searchParams + * @param { 'play' | 'play-rate' | 'play-total' | 'start' | 'end' | 'impression' } searchParams.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. + * @param { 'media-id' | 'media-type' | 'continent' | 'country' | 'device-type' | 'operating-system' | 'browser' } searchParams.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`. - `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`. + * @param { Date } searchParams.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` + * @param { Date } searchParams.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 value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + * @param { string } searchParams.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. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. 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/). 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/). - `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`. * @param { number } searchParams.currentPage Choose the number of search results to return per page. Minimum value: 1 * @param { number } searchParams.pageSize Results per page. Allowed values 1-100, default is 25. */ - public async getLiveStreamsPlays(args: { - from: string; - dimension: - | 'liveStreamId' - | 'emittedAt' + public async getMetricsBreakdown(args: { + metric: + | 'play' + | 'play-rate' + | 'play-total' + | 'start' + | 'end' + | 'impression'; + breakdown: + | 'media-id' + | 'media-type' + | 'continent' | 'country' - | 'deviceType' - | 'operatingSystem' + | 'device-type' + | 'operating-system' | 'browser'; - to?: string; - filter?: string; + from?: Date; + to?: Date; + filterBy?: string; currentPage?: number; pageSize?: number; - }): Promise { - return this.getLiveStreamsPlaysWithResponseHeaders(args).then( + }): Promise { + return this.getMetricsBreakdownWithResponseHeaders(args).then( (res) => res.body ); } /** - * Retrieve filtered analytics about the number of plays for your live streams in a project. - * Get play events for live stream + * Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + * Retrieve metrics in a breakdown of dimensions * @param {Object} searchParams - * @param { string } searchParams.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 { 'liveStreamId' | 'emittedAt' | 'country' | 'deviceType' | 'operatingSystem' | 'browser' } searchParams.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: `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`. - * @param { string } searchParams.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. - * @param { string } searchParams.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. + * @param { 'play' | 'play-rate' | 'play-total' | 'start' | 'end' | 'impression' } searchParams.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. + * @param { 'media-id' | 'media-type' | 'continent' | 'country' | 'device-type' | 'operating-system' | 'browser' } searchParams.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`. - `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`. + * @param { Date } searchParams.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` + * @param { Date } searchParams.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 value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + * @param { string } searchParams.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. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. 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/). 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/). - `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`. * @param { number } searchParams.currentPage Choose the number of search results to return per page. Minimum value: 1 * @param { number } searchParams.pageSize Results per page. Allowed values 1-100, default is 25. */ - public async getLiveStreamsPlaysWithResponseHeaders({ + public async getMetricsBreakdownWithResponseHeaders({ + metric, + breakdown, from, - dimension, to, - filter, + filterBy, currentPage, pageSize, }: { - from: string; - dimension: - | 'liveStreamId' - | 'emittedAt' + metric: + | 'play' + | 'play-rate' + | 'play-total' + | 'start' + | 'end' + | 'impression'; + breakdown: + | 'media-id' + | 'media-type' + | 'continent' | 'country' - | 'deviceType' - | 'operatingSystem' + | 'device-type' + | 'operating-system' | 'browser'; - to?: string; - filter?: string; + from?: Date; + to?: Date; + filterBy?: string; currentPage?: number; pageSize?: number; - }): Promise<{ headers: ApiResponseHeaders; body: AnalyticsPlaysResponse }> { + }): Promise<{ + headers: ApiResponseHeaders; + body: AnalyticsMetricsBreakdownResponse; + }> { const queryParams: QueryOptions = {}; queryParams.headers = {}; - if (from === null || from === undefined) { + if (metric === null || metric === undefined) { throw new Error( - 'Required parameter from was null or undefined when calling getLiveStreamsPlays.' + 'Required parameter metric was null or undefined when calling getMetricsBreakdown.' ); } - if (dimension === null || dimension === undefined) { + if (breakdown === null || breakdown === undefined) { throw new Error( - 'Required parameter dimension was null or undefined when calling getLiveStreamsPlays.' + 'Required parameter breakdown was null or undefined when calling getMetricsBreakdown.' ); } // Path Params - const localVarPath = '/analytics/live-streams/plays'.substring(1); + const localVarPath = '/data/buckets/{metric}/{breakdown}' + .substring(1) + .replace('{' + 'metric' + '}', encodeURIComponent(String(metric))) + .replace('{' + 'breakdown' + '}', encodeURIComponent(String(breakdown))); // Query Params const urlSearchParams = new URLSearchParams(); @@ -107,29 +256,19 @@ export default class AnalyticsApi { if (from !== undefined) { urlSearchParams.append( 'from', - ObjectSerializer.serialize(from, 'string', 'date') + ObjectSerializer.serialize(from, 'Date', 'date-time') ); } if (to !== undefined) { urlSearchParams.append( 'to', - ObjectSerializer.serialize(to, 'string', 'date') + ObjectSerializer.serialize(to, 'Date', 'date-time') ); } - if (dimension !== undefined) { + if (filterBy !== undefined) { urlSearchParams.append( - 'dimension', - ObjectSerializer.serialize( - dimension, - "'liveStreamId' | 'emittedAt' | 'country' | 'deviceType' | 'operatingSystem' | 'browser'", - '' - ) - ); - } - if (filter !== undefined) { - urlSearchParams.append( - 'filter', - ObjectSerializer.serialize(filter, 'string', '') + 'filterBy', + ObjectSerializer.serialize(filterBy, 'string', '') ); } if (currentPage !== undefined) { @@ -157,87 +296,82 @@ export default class AnalyticsApi { response.body, response.headers['content-type'] ), - 'AnalyticsPlaysResponse', + 'AnalyticsMetricsBreakdownResponse', '' - ) as AnalyticsPlaysResponse, + ) as AnalyticsMetricsBreakdownResponse, }; }); } /** - * Retrieve filtered analytics about the number of plays for your videos in a project. - * Get play events for video + * Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred + * Retrieve metrics over time * @param {Object} searchParams - * @param { string } searchParams.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 { 'videoId' | 'emittedAt' | 'country' | 'deviceType' | 'operatingSystem' | 'browser' } searchParams.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`. - * @param { string } searchParams.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. - * @param { string } searchParams.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. + * @param { 'play' | 'play-rate' | 'start' | 'end' | 'impression' } searchParams.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. + * @param { Date } searchParams.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` + * @param { Date } searchParams.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 value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + * @param { Date } searchParams.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`. + * @param { string } searchParams.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. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. 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/). 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/). - `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`. * @param { number } searchParams.currentPage Choose the number of search results to return per page. Minimum value: 1 * @param { number } searchParams.pageSize Results per page. Allowed values 1-100, default is 25. */ - public async getVideosPlays(args: { - from: string; - dimension: - | 'videoId' - | 'emittedAt' - | 'country' - | 'deviceType' - | 'operatingSystem' - | 'browser'; - to?: string; - filter?: string; + public async getMetricsOverTime(args: { + metric: 'play' | 'play-rate' | 'start' | 'end' | 'impression'; + from?: Date; + to?: Date; + interval?: Date; + filterBy?: string; currentPage?: number; pageSize?: number; - }): Promise { - return this.getVideosPlaysWithResponseHeaders(args).then((res) => res.body); + }): Promise { + return this.getMetricsOverTimeWithResponseHeaders(args).then( + (res) => res.body + ); } /** - * Retrieve filtered analytics about the number of plays for your videos in a project. - * Get play events for video + * Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred + * Retrieve metrics over time * @param {Object} searchParams - * @param { string } searchParams.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 { 'videoId' | 'emittedAt' | 'country' | 'deviceType' | 'operatingSystem' | 'browser' } searchParams.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`. - * @param { string } searchParams.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. - * @param { string } searchParams.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. + * @param { 'play' | 'play-rate' | 'start' | 'end' | 'impression' } searchParams.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. + * @param { Date } searchParams.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` + * @param { Date } searchParams.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 value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + * @param { Date } searchParams.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`. + * @param { string } searchParams.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. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. 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/). 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/). - `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`. * @param { number } searchParams.currentPage Choose the number of search results to return per page. Minimum value: 1 * @param { number } searchParams.pageSize Results per page. Allowed values 1-100, default is 25. */ - public async getVideosPlaysWithResponseHeaders({ + public async getMetricsOverTimeWithResponseHeaders({ + metric, from, - dimension, to, - filter, + interval, + filterBy, currentPage, pageSize, }: { - from: string; - dimension: - | 'videoId' - | 'emittedAt' - | 'country' - | 'deviceType' - | 'operatingSystem' - | 'browser'; - to?: string; - filter?: string; + metric: 'play' | 'play-rate' | 'start' | 'end' | 'impression'; + from?: Date; + to?: Date; + interval?: Date; + filterBy?: string; currentPage?: number; pageSize?: number; - }): Promise<{ headers: ApiResponseHeaders; body: AnalyticsPlaysResponse }> { + }): Promise<{ + headers: ApiResponseHeaders; + body: AnalyticsMetricsOverTimeResponse; + }> { const queryParams: QueryOptions = {}; queryParams.headers = {}; - if (from === null || from === undefined) { + if (metric === null || metric === undefined) { throw new Error( - 'Required parameter from was null or undefined when calling getVideosPlays.' - ); - } - if (dimension === null || dimension === undefined) { - throw new Error( - 'Required parameter dimension was null or undefined when calling getVideosPlays.' + 'Required parameter metric was null or undefined when calling getMetricsOverTime.' ); } // Path Params - const localVarPath = '/analytics/videos/plays'.substring(1); + const localVarPath = '/data/timeseries/{metric}' + .substring(1) + .replace('{' + 'metric' + '}', encodeURIComponent(String(metric))); // Query Params const urlSearchParams = new URLSearchParams(); @@ -245,29 +379,25 @@ export default class AnalyticsApi { if (from !== undefined) { urlSearchParams.append( 'from', - ObjectSerializer.serialize(from, 'string', 'date') + ObjectSerializer.serialize(from, 'Date', 'date-time') ); } if (to !== undefined) { urlSearchParams.append( 'to', - ObjectSerializer.serialize(to, 'string', 'date') + ObjectSerializer.serialize(to, 'Date', 'date-time') ); } - if (dimension !== undefined) { + if (interval !== undefined) { urlSearchParams.append( - 'dimension', - ObjectSerializer.serialize( - dimension, - "'videoId' | 'emittedAt' | 'country' | 'deviceType' | 'operatingSystem' | 'browser'", - '' - ) + 'interval', + ObjectSerializer.serialize(interval, 'Date', 'date-time') ); } - if (filter !== undefined) { + if (filterBy !== undefined) { urlSearchParams.append( - 'filter', - ObjectSerializer.serialize(filter, 'string', '') + 'filterBy', + ObjectSerializer.serialize(filterBy, 'string', '') ); } if (currentPage !== undefined) { @@ -295,9 +425,9 @@ export default class AnalyticsApi { response.body, response.headers['content-type'] ), - 'AnalyticsPlaysResponse', + 'AnalyticsMetricsOverTimeResponse', '' - ) as AnalyticsPlaysResponse, + ) as AnalyticsMetricsOverTimeResponse, }; }); } diff --git a/src/api/LiveStreamsApi.ts b/src/api/LiveStreamsApi.ts index 0764416..0ca6ff5 100644 --- a/src/api/LiveStreamsApi.ts +++ b/src/api/LiveStreamsApi.ts @@ -520,4 +520,55 @@ export default class LiveStreamsApi { }; }); } + + /** + * 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. + * Complete a live stream + * @param liveStreamId The unique ID for the live stream you want to complete. + */ + public async complete(liveStreamId: string): Promise { + return this.completeWithResponseHeaders(liveStreamId).then( + (res) => res.body + ); + } + + /** + * 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. + * Complete a live stream + * @param liveStreamId The unique ID for the live stream you want to complete. + */ + public async completeWithResponseHeaders( + liveStreamId: string + ): Promise<{ headers: ApiResponseHeaders; body: void }> { + const queryParams: QueryOptions = {}; + queryParams.headers = {}; + if (liveStreamId === null || liveStreamId === undefined) { + throw new Error( + 'Required parameter liveStreamId was null or undefined when calling complete.' + ); + } + // Path Params + const localVarPath = '/live-streams/{liveStreamId}/complete' + .substring(1) + .replace( + '{' + 'liveStreamId' + '}', + encodeURIComponent(String(liveStreamId)) + ); + + queryParams.method = 'PUT'; + + return this.httpClient.call(localVarPath, queryParams).then((response) => { + return { + headers: response.headers, + body: ObjectSerializer.deserialize( + ObjectSerializer.parse( + response.body, + response.headers['content-type'] + ), + 'void', + '' + ) as void, + }; + }); + } } diff --git a/src/model/VideoSessionLocation.ts b/src/model/AnalyticsAggregatedMetricsResponse.ts similarity index 57% rename from src/model/VideoSessionLocation.ts rename to src/model/AnalyticsAggregatedMetricsResponse.ts index b23bab9..e04969b 100644 --- a/src/model/VideoSessionLocation.ts +++ b/src/model/AnalyticsAggregatedMetricsResponse.ts @@ -10,38 +10,30 @@ */ import AttributeType from './AttributeType.js'; +import AnalyticsAggregatedMetricsResponseContext from './AnalyticsAggregatedMetricsResponseContext.js'; -/** - * The location of the viewer. - */ -export default class VideoSessionLocation { - /** - * The country of the viewer. - */ - 'country'?: string; - /** - * The city of the viewer. - */ - 'city'?: string; +export default class AnalyticsAggregatedMetricsResponse { + 'context': AnalyticsAggregatedMetricsResponseContext; + 'data': number; static readonly discriminator?: string = undefined; static readonly attributeTypeMap: Array = [ { - name: 'country', - baseName: 'country', - type: 'string', + name: 'context', + baseName: 'context', + type: 'AnalyticsAggregatedMetricsResponseContext', format: '', }, { - name: 'city', - baseName: 'city', - type: 'string', - format: '', + name: 'data', + baseName: 'data', + type: 'number', + format: 'float', }, ]; static getAttributeTypeMap(): Array { - return VideoSessionLocation.attributeTypeMap; + return AnalyticsAggregatedMetricsResponse.attributeTypeMap; } } diff --git a/src/model/AnalyticsAggregatedMetricsResponseContext.ts b/src/model/AnalyticsAggregatedMetricsResponseContext.ts new file mode 100644 index 0000000..b02c32d --- /dev/null +++ b/src/model/AnalyticsAggregatedMetricsResponseContext.ts @@ -0,0 +1,66 @@ +/** + * @api.video/nodejs-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 + * + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +import AttributeType from './AttributeType.js'; +import AnalyticsAggregatedMetricsResponseContextTimeframe from './AnalyticsAggregatedMetricsResponseContextTimeframe.js'; + +export default class AnalyticsAggregatedMetricsResponseContext { + /** + * Returns the metric you selected. + */ + 'metric'?: AnalyticsAggregatedMetricsResponseContextMetricEnum; + /** + * Returns the aggregation you selected. + */ + 'aggregation'?: AnalyticsAggregatedMetricsResponseContextAggregationEnum; + 'timeframe'?: AnalyticsAggregatedMetricsResponseContextTimeframe; + + static readonly discriminator?: string = undefined; + + static readonly attributeTypeMap: Array = [ + { + name: 'metric', + baseName: 'metric', + type: 'AnalyticsAggregatedMetricsResponseContextMetricEnum', + format: '', + }, + { + name: 'aggregation', + baseName: 'aggregation', + type: 'AnalyticsAggregatedMetricsResponseContextAggregationEnum', + format: '', + }, + { + name: 'timeframe', + baseName: 'timeframe', + type: 'AnalyticsAggregatedMetricsResponseContextTimeframe', + format: '', + }, + ]; + + static getAttributeTypeMap(): Array { + return AnalyticsAggregatedMetricsResponseContext.attributeTypeMap; + } +} + +export type AnalyticsAggregatedMetricsResponseContextMetricEnum = + | 'play' + | 'start' + | 'end' + | 'impression' + | 'impression-time' + | 'watch-time'; +export type AnalyticsAggregatedMetricsResponseContextAggregationEnum = + | 'count' + | 'rate' + | 'total' + | 'average' + | 'sum'; diff --git a/src/model/LiveStreamSessionSession.ts b/src/model/AnalyticsAggregatedMetricsResponseContextTimeframe.ts similarity index 53% rename from src/model/LiveStreamSessionSession.ts rename to src/model/AnalyticsAggregatedMetricsResponseContextTimeframe.ts index ac1c3aa..8677aa3 100644 --- a/src/model/LiveStreamSessionSession.ts +++ b/src/model/AnalyticsAggregatedMetricsResponseContextTimeframe.ts @@ -11,44 +11,37 @@ import AttributeType from './AttributeType.js'; -export default class LiveStreamSessionSession { - /** - * A unique identifier for your session. You can use this to track what happens during a specific session. - */ - 'sessionId'?: string; +/** + * Returns the starting and ending date-times of the period you want analytics for. + */ +export default class AnalyticsAggregatedMetricsResponseContextTimeframe { /** - * When the session started, with the date and time presented in ISO-8601 format. + * Returns the starting date-time of the period you want analytics for in ATOM date-time format. */ - 'loadedAt'?: Date; + 'from'?: Date; /** - * When the session ended, with the date and time presented in ISO-8601 format. + * Returns the starting date-time of the period you want analytics for in ATOM date-time format. */ - 'endedAt'?: Date; + 'to'?: Date; static readonly discriminator?: string = undefined; static readonly attributeTypeMap: Array = [ { - name: 'sessionId', - baseName: 'sessionId', - type: 'string', - format: '', - }, - { - name: 'loadedAt', - baseName: 'loadedAt', + name: 'from', + baseName: 'from', type: 'Date', format: 'date-time', }, { - name: 'endedAt', - baseName: 'endedAt', + name: 'to', + baseName: 'to', type: 'Date', format: 'date-time', }, ]; static getAttributeTypeMap(): Array { - return LiveStreamSessionSession.attributeTypeMap; + return AnalyticsAggregatedMetricsResponseContextTimeframe.attributeTypeMap; } } diff --git a/src/model/AnalyticsMetricsBreakdownResponse.ts b/src/model/AnalyticsMetricsBreakdownResponse.ts new file mode 100644 index 0000000..d21ef6b --- /dev/null +++ b/src/model/AnalyticsMetricsBreakdownResponse.ts @@ -0,0 +1,51 @@ +/** + * @api.video/nodejs-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 + * + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +import AttributeType from './AttributeType.js'; +import AnalyticsMetricsBreakdownResponseContext from './AnalyticsMetricsBreakdownResponseContext.js'; +import AnalyticsMetricsBreakdownResponseData from './AnalyticsMetricsBreakdownResponseData.js'; +import Pagination from './Pagination.js'; + +export default class AnalyticsMetricsBreakdownResponse { + 'context': AnalyticsMetricsBreakdownResponseContext; + /** + * Returns an array of dimensions and their respective metrics. + */ + 'data': Array; + 'pagination': Pagination; + + static readonly discriminator?: string = undefined; + + static readonly attributeTypeMap: Array = [ + { + name: 'context', + baseName: 'context', + type: 'AnalyticsMetricsBreakdownResponseContext', + format: '', + }, + { + name: 'data', + baseName: 'data', + type: 'Array', + format: '', + }, + { + name: 'pagination', + baseName: 'pagination', + type: 'Pagination', + format: '', + }, + ]; + + static getAttributeTypeMap(): Array { + return AnalyticsMetricsBreakdownResponse.attributeTypeMap; + } +} diff --git a/src/model/AnalyticsMetricsBreakdownResponseContext.ts b/src/model/AnalyticsMetricsBreakdownResponseContext.ts new file mode 100644 index 0000000..be016a6 --- /dev/null +++ b/src/model/AnalyticsMetricsBreakdownResponseContext.ts @@ -0,0 +1,67 @@ +/** + * @api.video/nodejs-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 + * + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +import AttributeType from './AttributeType.js'; +import AnalyticsAggregatedMetricsResponseContextTimeframe from './AnalyticsAggregatedMetricsResponseContextTimeframe.js'; + +export default class AnalyticsMetricsBreakdownResponseContext { + /** + * Returns the metric you selected. + */ + 'metric'?: AnalyticsMetricsBreakdownResponseContextMetricEnum; + /** + * Returns the dimension you selected. + */ + 'breakdown'?: AnalyticsMetricsBreakdownResponseContextBreakdownEnum; + 'timeframe'?: AnalyticsAggregatedMetricsResponseContextTimeframe; + + static readonly discriminator?: string = undefined; + + static readonly attributeTypeMap: Array = [ + { + name: 'metric', + baseName: 'metric', + type: 'AnalyticsMetricsBreakdownResponseContextMetricEnum', + format: '', + }, + { + name: 'breakdown', + baseName: 'breakdown', + type: 'AnalyticsMetricsBreakdownResponseContextBreakdownEnum', + format: '', + }, + { + name: 'timeframe', + baseName: 'timeframe', + type: 'AnalyticsAggregatedMetricsResponseContextTimeframe', + format: '', + }, + ]; + + static getAttributeTypeMap(): Array { + return AnalyticsMetricsBreakdownResponseContext.attributeTypeMap; + } +} + +export type AnalyticsMetricsBreakdownResponseContextMetricEnum = + | 'play' + | 'play-rate' + | 'start' + | 'end' + | 'impression'; +export type AnalyticsMetricsBreakdownResponseContextBreakdownEnum = + | 'media-id' + | 'media-type' + | 'continent' + | 'country' + | 'device-type' + | 'operating-system' + | 'browser'; diff --git a/src/model/LiveStreamSessionLocation.ts b/src/model/AnalyticsMetricsBreakdownResponseData.ts similarity index 54% rename from src/model/LiveStreamSessionLocation.ts rename to src/model/AnalyticsMetricsBreakdownResponseData.ts index 671122d..88b735e 100644 --- a/src/model/LiveStreamSessionLocation.ts +++ b/src/model/AnalyticsMetricsBreakdownResponseData.ts @@ -11,37 +11,34 @@ import AttributeType from './AttributeType.js'; -/** - * The location of the viewer of the live stream. - */ -export default class LiveStreamSessionLocation { +export default class AnalyticsMetricsBreakdownResponseData { /** - * The country of the viewer of the live stream. + * 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\". */ - 'country'?: string; + 'dimensionValue'?: string; /** - * The city of the viewer of the live stream. + * Returns the data for a specific dimension value. */ - 'city'?: string; + 'metricValue'?: number; static readonly discriminator?: string = undefined; static readonly attributeTypeMap: Array = [ { - name: 'country', - baseName: 'country', + name: 'dimensionValue', + baseName: 'dimensionValue', type: 'string', format: '', }, { - name: 'city', - baseName: 'city', - type: 'string', - format: '', + name: 'metricValue', + baseName: 'metricValue', + type: 'number', + format: 'float', }, ]; static getAttributeTypeMap(): Array { - return LiveStreamSessionLocation.attributeTypeMap; + return AnalyticsMetricsBreakdownResponseData.attributeTypeMap; } } diff --git a/src/model/AnalyticsMetricsOverTimeResponse.ts b/src/model/AnalyticsMetricsOverTimeResponse.ts new file mode 100644 index 0000000..7c11238 --- /dev/null +++ b/src/model/AnalyticsMetricsOverTimeResponse.ts @@ -0,0 +1,51 @@ +/** + * @api.video/nodejs-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 + * + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +import AttributeType from './AttributeType.js'; +import AnalyticsMetricsOverTimeResponseContext from './AnalyticsMetricsOverTimeResponseContext.js'; +import AnalyticsMetricsOverTimeResponseData from './AnalyticsMetricsOverTimeResponseData.js'; +import Pagination from './Pagination.js'; + +export default class AnalyticsMetricsOverTimeResponse { + 'context': AnalyticsMetricsOverTimeResponseContext; + /** + * Returns an array of metrics and the timestamps . + */ + 'data': Array; + 'pagination': Pagination; + + static readonly discriminator?: string = undefined; + + static readonly attributeTypeMap: Array = [ + { + name: 'context', + baseName: 'context', + type: 'AnalyticsMetricsOverTimeResponseContext', + format: '', + }, + { + name: 'data', + baseName: 'data', + type: 'Array', + format: '', + }, + { + name: 'pagination', + baseName: 'pagination', + type: 'Pagination', + format: '', + }, + ]; + + static getAttributeTypeMap(): Array { + return AnalyticsMetricsOverTimeResponse.attributeTypeMap; + } +} diff --git a/src/model/AnalyticsMetricsOverTimeResponseContext.ts b/src/model/AnalyticsMetricsOverTimeResponseContext.ts new file mode 100644 index 0000000..0f6af99 --- /dev/null +++ b/src/model/AnalyticsMetricsOverTimeResponseContext.ts @@ -0,0 +1,62 @@ +/** + * @api.video/nodejs-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 + * + * + * NOTE: This class is auto generated. + * Do not edit the class manually. + */ + +import AttributeType from './AttributeType.js'; +import AnalyticsAggregatedMetricsResponseContextTimeframe from './AnalyticsAggregatedMetricsResponseContextTimeframe.js'; + +export default class AnalyticsMetricsOverTimeResponseContext { + /** + * Returns the metric you selected. + */ + 'metric'?: AnalyticsMetricsOverTimeResponseContextMetricEnum; + /** + * Returns the interval you selected. + */ + 'interval'?: AnalyticsMetricsOverTimeResponseContextIntervalEnum; + 'timeframe'?: AnalyticsAggregatedMetricsResponseContextTimeframe; + + static readonly discriminator?: string = undefined; + + static readonly attributeTypeMap: Array = [ + { + name: 'metric', + baseName: 'metric', + type: 'AnalyticsMetricsOverTimeResponseContextMetricEnum', + format: '', + }, + { + name: 'interval', + baseName: 'interval', + type: 'AnalyticsMetricsOverTimeResponseContextIntervalEnum', + format: '', + }, + { + name: 'timeframe', + baseName: 'timeframe', + type: 'AnalyticsAggregatedMetricsResponseContextTimeframe', + format: '', + }, + ]; + + static getAttributeTypeMap(): Array { + return AnalyticsMetricsOverTimeResponseContext.attributeTypeMap; + } +} + +export type AnalyticsMetricsOverTimeResponseContextMetricEnum = + | 'play' + | 'play-rate' + | 'start' + | 'end' + | 'impression'; +export type AnalyticsMetricsOverTimeResponseContextIntervalEnum = + | 'hour' + | 'day'; diff --git a/src/model/LiveStreamSessionDevice.ts b/src/model/AnalyticsMetricsOverTimeResponseData.ts similarity index 51% rename from src/model/LiveStreamSessionDevice.ts rename to src/model/AnalyticsMetricsOverTimeResponseData.ts index 493ce07..6f3769b 100644 --- a/src/model/LiveStreamSessionDevice.ts +++ b/src/model/AnalyticsMetricsOverTimeResponseData.ts @@ -11,47 +11,34 @@ import AttributeType from './AttributeType.js'; -/** - * What type of device the user is on when in the live stream session. - */ -export default class LiveStreamSessionDevice { +export default class AnalyticsMetricsOverTimeResponseData { /** - * What the type is like desktop, laptop, mobile. + * 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; + 'emittedAt'?: string; /** - * If known, what the brand of the device is, like Apple, Dell, etc. + * Returns the data for a specific metric value. */ - 'vendor'?: string; - /** - * The specific model of the device, if known. - */ - 'model'?: string; + 'metricValue'?: number; static readonly discriminator?: string = undefined; static readonly attributeTypeMap: Array = [ { - name: 'type', - baseName: 'type', - type: 'string', - format: '', - }, - { - name: 'vendor', - baseName: 'vendor', + name: 'emittedAt', + baseName: 'emittedAt', type: 'string', format: '', }, { - name: 'model', - baseName: 'model', - type: 'string', - format: '', + name: 'metricValue', + baseName: 'metricValue', + type: 'number', + format: 'float', }, ]; static getAttributeTypeMap(): Array { - return LiveStreamSessionDevice.attributeTypeMap; + return AnalyticsMetricsOverTimeResponseData.attributeTypeMap; } } diff --git a/src/model/LiveStream.ts b/src/model/LiveStream.ts index d7addf1..d44939a 100644 --- a/src/model/LiveStream.ts +++ b/src/model/LiveStream.ts @@ -27,7 +27,7 @@ export default class LiveStream { */ 'streamKey'?: string; /** - * 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). + * 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; 'assets'?: LiveStreamAssets; @@ -40,7 +40,7 @@ export default class LiveStream { */ 'broadcasting'?: boolean; /** - * Returns the list of RTMP restream destinations. + * Returns the list of restream destinations. */ 'restreams': Array; /** diff --git a/src/model/LiveStreamCreationPayload.ts b/src/model/LiveStreamCreationPayload.ts index c87d6fa..8d7c9f1 100644 --- a/src/model/LiveStreamCreationPayload.ts +++ b/src/model/LiveStreamCreationPayload.ts @@ -18,7 +18,7 @@ export default class LiveStreamCreationPayload { */ 'name': string; /** - * 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). + * 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; /** @@ -26,7 +26,7 @@ export default class LiveStreamCreationPayload { */ 'playerId'?: string; /** - * 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. */ 'restreams'?: Array; diff --git a/src/model/LiveStreamSession.ts b/src/model/LiveStreamSession.ts deleted file mode 100644 index 448a558..0000000 --- a/src/model/LiveStreamSession.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; -import LiveStreamSessionClient from './LiveStreamSessionClient.js'; -import LiveStreamSessionDevice from './LiveStreamSessionDevice.js'; -import LiveStreamSessionLocation from './LiveStreamSessionLocation.js'; -import LiveStreamSessionReferrer from './LiveStreamSessionReferrer.js'; -import LiveStreamSessionSession from './LiveStreamSessionSession.js'; -import VideoSessionOs from './VideoSessionOs.js'; - -export default class LiveStreamSession { - 'session'?: LiveStreamSessionSession; - 'location'?: LiveStreamSessionLocation; - 'referrer'?: LiveStreamSessionReferrer; - 'device'?: LiveStreamSessionDevice; - 'os'?: VideoSessionOs; - 'client'?: LiveStreamSessionClient; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'session', - baseName: 'session', - type: 'LiveStreamSessionSession', - format: '', - }, - { - name: 'location', - baseName: 'location', - type: 'LiveStreamSessionLocation', - format: '', - }, - { - name: 'referrer', - baseName: 'referrer', - type: 'LiveStreamSessionReferrer', - format: '', - }, - { - name: 'device', - baseName: 'device', - type: 'LiveStreamSessionDevice', - format: '', - }, - { - name: 'os', - baseName: 'os', - type: 'VideoSessionOs', - format: '', - }, - { - name: 'client', - baseName: 'client', - type: 'LiveStreamSessionClient', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return LiveStreamSession.attributeTypeMap; - } -} diff --git a/src/model/LiveStreamSessionClient.ts b/src/model/LiveStreamSessionClient.ts deleted file mode 100644 index d823ff4..0000000 --- a/src/model/LiveStreamSessionClient.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; - -/** - * What kind of browser the viewer is using for the live stream session. - */ -export default class LiveStreamSessionClient { - /** - * The name of the browser used to view the live stream session. - */ - 'name'?: string; - /** - * The version of the browser used to view the live stream session. - */ - 'version'?: string; - /** - * The type of client used to view the live stream session. - */ - 'type'?: string; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'name', - baseName: 'name', - type: 'string', - format: '', - }, - { - name: 'version', - baseName: 'version', - type: 'string', - format: '', - }, - { - name: 'type', - baseName: 'type', - type: 'string', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return LiveStreamSessionClient.attributeTypeMap; - } -} diff --git a/src/model/LiveStreamSessionReferrer.ts b/src/model/LiveStreamSessionReferrer.ts deleted file mode 100644 index 2da887b..0000000 --- a/src/model/LiveStreamSessionReferrer.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; - -export default class LiveStreamSessionReferrer { - /** - * The website the viewer of the live stream was referred to in order to view the live stream. - */ - 'url'?: 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. - */ - 'medium'?: string; - /** - * Where the viewer came from to see the live stream (usually where they searched from). - */ - 'source'?: string; - /** - * What term they searched for that led them to the live stream. - */ - 'searchTerm'?: string; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'url', - baseName: 'url', - type: 'string', - format: '', - }, - { - name: 'medium', - baseName: 'medium', - type: 'string', - format: '', - }, - { - name: 'source', - baseName: 'source', - type: 'string', - format: '', - }, - { - name: 'searchTerm', - baseName: 'searchTerm', - type: 'string', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return LiveStreamSessionReferrer.attributeTypeMap; - } -} diff --git a/src/model/LiveStreamUpdatePayload.ts b/src/model/LiveStreamUpdatePayload.ts index 98020ba..22a7221 100644 --- a/src/model/LiveStreamUpdatePayload.ts +++ b/src/model/LiveStreamUpdatePayload.ts @@ -18,7 +18,7 @@ export default class LiveStreamUpdatePayload { */ 'name'?: string; /** - * 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). + * 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; /** @@ -26,7 +26,7 @@ export default class LiveStreamUpdatePayload { */ 'playerId'?: string; /** - * 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. */ 'restreams'?: Array; diff --git a/src/model/RestreamsRequestObject.ts b/src/model/RestreamsRequestObject.ts index d5ba286..8778201 100644 --- a/src/model/RestreamsRequestObject.ts +++ b/src/model/RestreamsRequestObject.ts @@ -20,7 +20,7 @@ export default class RestreamsRequestObject { */ 'name': string; /** - * 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. */ 'serverUrl': string; /** diff --git a/src/model/RestreamsResponseObject.ts b/src/model/RestreamsResponseObject.ts index 98875b2..c407888 100644 --- a/src/model/RestreamsResponseObject.ts +++ b/src/model/RestreamsResponseObject.ts @@ -17,7 +17,7 @@ export default class RestreamsResponseObject { */ 'name'?: string; /** - * Returns the RTMP URL of a restream destination. + * Returns the server URL of a restream destination. */ 'serverUrl'?: string; /** diff --git a/src/model/VideoSessionDevice.ts b/src/model/UnrecognizedRequestUrl.ts similarity index 63% rename from src/model/VideoSessionDevice.ts rename to src/model/UnrecognizedRequestUrl.ts index 606204e..bc8080e 100644 --- a/src/model/VideoSessionDevice.ts +++ b/src/model/UnrecognizedRequestUrl.ts @@ -11,22 +11,19 @@ import AttributeType from './AttributeType.js'; -/** - * What type of device the user is on when in the video session. - */ -export default class VideoSessionDevice { +export default class UnrecognizedRequestUrl { /** - * What the type is like desktop, laptop, mobile. + * A link to the error documentation. */ 'type'?: string; /** - * If known, what the brand of the device is, like Apple, Dell, etc. + * A description of the error that occurred. */ - 'vendor'?: string; + 'title'?: string; /** - * The specific model of the device, if known. + * The HTTP status code. */ - 'model'?: string; + 'status'?: number; static readonly discriminator?: string = undefined; @@ -38,20 +35,20 @@ export default class VideoSessionDevice { format: '', }, { - name: 'vendor', - baseName: 'vendor', + name: 'title', + baseName: 'title', type: 'string', format: '', }, { - name: 'model', - baseName: 'model', - type: 'string', + name: 'status', + baseName: 'status', + type: 'number', format: '', }, ]; static getAttributeTypeMap(): Array { - return VideoSessionDevice.attributeTypeMap; + return UnrecognizedRequestUrl.attributeTypeMap; } } diff --git a/src/model/VideoCreationPayload.ts b/src/model/VideoCreationPayload.ts index 4436606..d212326 100644 --- a/src/model/VideoCreationPayload.ts +++ b/src/model/VideoCreationPayload.ts @@ -28,7 +28,7 @@ export default class VideoCreationPayload { */ 'source'?: string; /** - * 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) + * 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; /** diff --git a/src/model/VideoSession.ts b/src/model/VideoSession.ts deleted file mode 100644 index c530820..0000000 --- a/src/model/VideoSession.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; -import VideoSessionClient from './VideoSessionClient.js'; -import VideoSessionDevice from './VideoSessionDevice.js'; -import VideoSessionLocation from './VideoSessionLocation.js'; -import VideoSessionOs from './VideoSessionOs.js'; -import VideoSessionReferrer from './VideoSessionReferrer.js'; -import VideoSessionSession from './VideoSessionSession.js'; - -export default class VideoSession { - 'session'?: VideoSessionSession; - 'location'?: VideoSessionLocation; - 'referrer'?: VideoSessionReferrer; - 'device'?: VideoSessionDevice; - 'os'?: VideoSessionOs; - 'client'?: VideoSessionClient; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'session', - baseName: 'session', - type: 'VideoSessionSession', - format: '', - }, - { - name: 'location', - baseName: 'location', - type: 'VideoSessionLocation', - format: '', - }, - { - name: 'referrer', - baseName: 'referrer', - type: 'VideoSessionReferrer', - format: '', - }, - { - name: 'device', - baseName: 'device', - type: 'VideoSessionDevice', - format: '', - }, - { - name: 'os', - baseName: 'os', - type: 'VideoSessionOs', - format: '', - }, - { - name: 'client', - baseName: 'client', - type: 'VideoSessionClient', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return VideoSession.attributeTypeMap; - } -} diff --git a/src/model/VideoSessionClient.ts b/src/model/VideoSessionClient.ts deleted file mode 100644 index c16cdb2..0000000 --- a/src/model/VideoSessionClient.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; - -/** - * What kind of browser the viewer is using for the video session. - */ -export default class VideoSessionClient { - /** - * The name of the browser used to view the video session. - */ - 'name'?: string; - /** - * The version of the browser used to view the video session. - */ - 'version'?: string; - /** - * The type of client used to view the video session. - */ - 'type'?: string; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'name', - baseName: 'name', - type: 'string', - format: '', - }, - { - name: 'version', - baseName: 'version', - type: 'string', - format: '', - }, - { - name: 'type', - baseName: 'type', - type: 'string', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return VideoSessionClient.attributeTypeMap; - } -} diff --git a/src/model/VideoSessionOs.ts b/src/model/VideoSessionOs.ts deleted file mode 100644 index 27e3dc2..0000000 --- a/src/model/VideoSessionOs.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; - -/** - * The operating system the viewer is on. - */ -export default class VideoSessionOs { - /** - * The name of the operating system. - */ - 'name'?: string; - /** - * The nickname for the operating system, often representing the version. - */ - 'shortname'?: string; - /** - * The version of the operating system. - */ - 'version'?: string; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'name', - baseName: 'name', - type: 'string', - format: '', - }, - { - name: 'shortname', - baseName: 'shortname', - type: 'string', - format: '', - }, - { - name: 'version', - baseName: 'version', - type: 'string', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return VideoSessionOs.attributeTypeMap; - } -} diff --git a/src/model/VideoSessionReferrer.ts b/src/model/VideoSessionReferrer.ts deleted file mode 100644 index fb107f3..0000000 --- a/src/model/VideoSessionReferrer.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; - -export default class VideoSessionReferrer { - /** - * The link the viewer used to reach the video session. - */ - 'url'?: 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. - */ - 'medium'?: string; - /** - * The source the referrer came from to the video session. For example if they searched through google to find the stream. - */ - 'source'?: string; - /** - * The search term they typed to arrive at the video session. - */ - 'searchTerm'?: string; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'url', - baseName: 'url', - type: 'string', - format: '', - }, - { - name: 'medium', - baseName: 'medium', - type: 'string', - format: '', - }, - { - name: 'source', - baseName: 'source', - type: 'string', - format: '', - }, - { - name: 'searchTerm', - baseName: 'searchTerm', - type: 'string', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return VideoSessionReferrer.attributeTypeMap; - } -} diff --git a/src/model/VideoSessionSession.ts b/src/model/VideoSessionSession.ts deleted file mode 100644 index ce3e431..0000000 --- a/src/model/VideoSessionSession.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @api.video/nodejs-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 - * - * - * NOTE: This class is auto generated. - * Do not edit the class manually. - */ - -import AttributeType from './AttributeType.js'; -import Metadata from './Metadata.js'; - -export default class VideoSessionSession { - /** - * The unique identifier for the session that you can use to track what happens during it. - */ - 'sessionId'?: string; - /** - * When the video session started, presented in ISO-8601 format. - */ - 'loadedAt'?: Date; - /** - * When the video session ended, presented in ISO-8601 format. - */ - 'endedAt'?: Date; - /** - * 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. - */ - 'metadata'?: Array; - - static readonly discriminator?: string = undefined; - - static readonly attributeTypeMap: Array = [ - { - name: 'sessionId', - baseName: 'sessionId', - type: 'string', - format: '', - }, - { - name: 'loadedAt', - baseName: 'loadedAt', - type: 'Date', - format: 'date-time', - }, - { - name: 'endedAt', - baseName: 'endedAt', - type: 'Date', - format: 'date-time', - }, - { - name: 'metadata', - baseName: 'metadata', - type: 'Array', - format: '', - }, - ]; - - static getAttributeTypeMap(): Array { - return VideoSessionSession.attributeTypeMap; - } -} diff --git a/test/payloads/advancedauthentication/authenticate/responses400.json b/test/payloads/advancedauthentication/authenticate/responses400.json index 84cacbd..8d37eec 100644 --- a/test/payloads/advancedauthentication/authenticate/responses400.json +++ b/test/payloads/advancedauthentication/authenticate/responses400.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/test/payloads/advancedauthentication/refresh/responses400.json b/test/payloads/advancedauthentication/refresh/responses400.json index 0c86651..b7e947e 100644 --- a/test/payloads/advancedauthentication/refresh/responses400.json +++ b/test/payloads/advancedauthentication/refresh/responses400.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/test/payloads/analytics/getAggregatedMetrics/responses200.json b/test/payloads/analytics/getAggregatedMetrics/responses200.json new file mode 100644 index 0000000..aad4f98 --- /dev/null +++ b/test/payloads/analytics/getAggregatedMetrics/responses200.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/test/payloads/analytics/getVideosPlays/responses400-0.json b/test/payloads/analytics/getAggregatedMetrics/responses400-0.json similarity index 88% rename from test/payloads/analytics/getVideosPlays/responses400-0.json rename to test/payloads/analytics/getAggregatedMetrics/responses400-0.json index 84db8c3..4cbfb11 100644 --- a/test/payloads/analytics/getVideosPlays/responses400-0.json +++ b/test/payloads/analytics/getAggregatedMetrics/responses400-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/test/payloads/analytics/getVideosPlays/responses400-5.json b/test/payloads/analytics/getAggregatedMetrics/responses400-1.json similarity index 61% rename from test/payloads/analytics/getVideosPlays/responses400-5.json rename to test/payloads/analytics/getAggregatedMetrics/responses400-1.json index 080db28..061e505 100644 --- a/test/payloads/analytics/getVideosPlays/responses400-5.json +++ b/test/payloads/analytics/getAggregatedMetrics/responses400-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/test/payloads/analytics/getAggregatedMetrics/responses404.json b/test/payloads/analytics/getAggregatedMetrics/responses404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/test/payloads/analytics/getAggregatedMetrics/responses404.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/test/payloads/analytics/getLiveStreamsPlays/responses429.json b/test/payloads/analytics/getAggregatedMetrics/responses429.json similarity index 100% rename from test/payloads/analytics/getLiveStreamsPlays/responses429.json rename to test/payloads/analytics/getAggregatedMetrics/responses429.json diff --git a/test/payloads/analytics/getLiveStreamsPlays/responses200-0.json b/test/payloads/analytics/getLiveStreamsPlays/responses200-0.json deleted file mode 100644 index 833d2ff..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses200-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/test/payloads/analytics/getLiveStreamsPlays/responses200-1.json b/test/payloads/analytics/getLiveStreamsPlays/responses200-1.json deleted file mode 100644 index cf2e9e5..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses200-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/test/payloads/analytics/getLiveStreamsPlays/responses200-2.json b/test/payloads/analytics/getLiveStreamsPlays/responses200-2.json deleted file mode 100644 index 4e08c61..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses200-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/test/payloads/analytics/getLiveStreamsPlays/responses400-1.json b/test/payloads/analytics/getLiveStreamsPlays/responses400-1.json deleted file mode 100644 index eaf7c78..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses400-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/test/payloads/analytics/getLiveStreamsPlays/responses400-2.json b/test/payloads/analytics/getLiveStreamsPlays/responses400-2.json deleted file mode 100644 index 282264f..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses400-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/test/payloads/analytics/getLiveStreamsPlays/responses400-3.json b/test/payloads/analytics/getLiveStreamsPlays/responses400-3.json deleted file mode 100644 index 282264f..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses400-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/test/payloads/analytics/getLiveStreamsPlays/responses400-4.json b/test/payloads/analytics/getLiveStreamsPlays/responses400-4.json deleted file mode 100644 index eaf7c78..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses400-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/test/payloads/analytics/getLiveStreamsPlays/responses403.json b/test/payloads/analytics/getLiveStreamsPlays/responses403.json deleted file mode 100644 index cdd0425..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses403.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/test/payloads/analytics/getLiveStreamsPlays/responses404.json b/test/payloads/analytics/getLiveStreamsPlays/responses404.json deleted file mode 100644 index f366b6f..0000000 --- a/test/payloads/analytics/getLiveStreamsPlays/responses404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/test/payloads/analytics/getMetricsBreakdown/responses200.json b/test/payloads/analytics/getMetricsBreakdown/responses200.json new file mode 100644 index 0000000..f5cdba3 --- /dev/null +++ b/test/payloads/analytics/getMetricsBreakdown/responses200.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/test/payloads/analytics/getLiveStreamsPlays/responses400-0.json b/test/payloads/analytics/getMetricsBreakdown/responses400-0.json similarity index 88% rename from test/payloads/analytics/getLiveStreamsPlays/responses400-0.json rename to test/payloads/analytics/getMetricsBreakdown/responses400-0.json index 84db8c3..4cbfb11 100644 --- a/test/payloads/analytics/getLiveStreamsPlays/responses400-0.json +++ b/test/payloads/analytics/getMetricsBreakdown/responses400-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/test/payloads/analytics/getLiveStreamsPlays/responses400-5.json b/test/payloads/analytics/getMetricsBreakdown/responses400-1.json similarity index 61% rename from test/payloads/analytics/getLiveStreamsPlays/responses400-5.json rename to test/payloads/analytics/getMetricsBreakdown/responses400-1.json index 95b2f61..061e505 100644 --- a/test/payloads/analytics/getLiveStreamsPlays/responses400-5.json +++ b/test/payloads/analytics/getMetricsBreakdown/responses400-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/test/payloads/analytics/getMetricsBreakdown/responses404.json b/test/payloads/analytics/getMetricsBreakdown/responses404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/test/payloads/analytics/getMetricsBreakdown/responses404.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/test/payloads/analytics/getVideosPlays/responses429.json b/test/payloads/analytics/getMetricsBreakdown/responses429.json similarity index 100% rename from test/payloads/analytics/getVideosPlays/responses429.json rename to test/payloads/analytics/getMetricsBreakdown/responses429.json diff --git a/test/payloads/analytics/getMetricsOverTime/responses200.json b/test/payloads/analytics/getMetricsOverTime/responses200.json new file mode 100644 index 0000000..b5a6342 --- /dev/null +++ b/test/payloads/analytics/getMetricsOverTime/responses200.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/test/payloads/analytics/getMetricsOverTime/responses400-0.json b/test/payloads/analytics/getMetricsOverTime/responses400-0.json new file mode 100644 index 0000000..4cbfb11 --- /dev/null +++ b/test/payloads/analytics/getMetricsOverTime/responses400-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/test/payloads/analytics/getVideosPlays/responses400-1.json b/test/payloads/analytics/getMetricsOverTime/responses400-1.json similarity index 58% rename from test/payloads/analytics/getVideosPlays/responses400-1.json rename to test/payloads/analytics/getMetricsOverTime/responses400-1.json index b1044e2..061e505 100644 --- a/test/payloads/analytics/getVideosPlays/responses400-1.json +++ b/test/payloads/analytics/getMetricsOverTime/responses400-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/test/payloads/analytics/getMetricsOverTime/responses404.json b/test/payloads/analytics/getMetricsOverTime/responses404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/test/payloads/analytics/getMetricsOverTime/responses404.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/test/payloads/analytics/getMetricsOverTime/responses429.json b/test/payloads/analytics/getMetricsOverTime/responses429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/test/payloads/analytics/getMetricsOverTime/responses429.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/test/payloads/analytics/getVideosPlays/responses200-0.json b/test/payloads/analytics/getVideosPlays/responses200-0.json deleted file mode 100644 index f0d1e9a..0000000 --- a/test/payloads/analytics/getVideosPlays/responses200-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/test/payloads/analytics/getVideosPlays/responses200-1.json b/test/payloads/analytics/getVideosPlays/responses200-1.json deleted file mode 100644 index 7348fe2..0000000 --- a/test/payloads/analytics/getVideosPlays/responses200-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/test/payloads/analytics/getVideosPlays/responses200-2.json b/test/payloads/analytics/getVideosPlays/responses200-2.json deleted file mode 100644 index ae770da..0000000 --- a/test/payloads/analytics/getVideosPlays/responses200-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/test/payloads/analytics/getVideosPlays/responses400-2.json b/test/payloads/analytics/getVideosPlays/responses400-2.json deleted file mode 100644 index 3f739e6..0000000 --- a/test/payloads/analytics/getVideosPlays/responses400-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/test/payloads/analytics/getVideosPlays/responses400-3.json b/test/payloads/analytics/getVideosPlays/responses400-3.json deleted file mode 100644 index 3f739e6..0000000 --- a/test/payloads/analytics/getVideosPlays/responses400-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/test/payloads/analytics/getVideosPlays/responses400-4.json b/test/payloads/analytics/getVideosPlays/responses400-4.json deleted file mode 100644 index b1044e2..0000000 --- a/test/payloads/analytics/getVideosPlays/responses400-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/test/payloads/analytics/getVideosPlays/responses403.json b/test/payloads/analytics/getVideosPlays/responses403.json deleted file mode 100644 index cdd0425..0000000 --- a/test/payloads/analytics/getVideosPlays/responses403.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/test/payloads/analytics/getVideosPlays/responses404.json b/test/payloads/analytics/getVideosPlays/responses404.json deleted file mode 100644 index f366b6f..0000000 --- a/test/payloads/analytics/getVideosPlays/responses404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/test/payloads/livestreams/complete/responses404.json b/test/payloads/livestreams/complete/responses404.json new file mode 100644 index 0000000..87595d9 --- /dev/null +++ b/test/payloads/livestreams/complete/responses404.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/test/payloads/livestreams/complete/responses429.json b/test/payloads/livestreams/complete/responses429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/test/payloads/livestreams/complete/responses429.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/test/payloads/livestreams/create/responses400-1.json b/test/payloads/livestreams/create/responses400-1.json index 1350192..c3d6d42 100644 --- a/test/payloads/livestreams/create/responses400-1.json +++ b/test/payloads/livestreams/create/responses400-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/test/payloads/livestreams/create/responses400-2.json b/test/payloads/livestreams/create/responses400-2.json index b05a8e3..ea329ab 100644 --- a/test/payloads/livestreams/create/responses400-2.json +++ b/test/payloads/livestreams/create/responses400-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/test/payloads/livestreams/deleteThumbnail/responses404.json b/test/payloads/livestreams/deleteThumbnail/responses404.json index 9efa63b..87595d9 100644 --- a/test/payloads/livestreams/deleteThumbnail/responses404.json +++ b/test/payloads/livestreams/deleteThumbnail/responses404.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/test/payloads/livestreams/update/responses400-1.json b/test/payloads/livestreams/update/responses400-1.json index 1350192..c3d6d42 100644 --- a/test/payloads/livestreams/update/responses400-1.json +++ b/test/payloads/livestreams/update/responses400-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/test/payloads/livestreams/update/responses400-2.json b/test/payloads/livestreams/update/responses400-2.json index b05a8e3..ea329ab 100644 --- a/test/payloads/livestreams/update/responses400-2.json +++ b/test/payloads/livestreams/update/responses400-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/test/payloads/livestreams/uploadThumbnail/responses400.json b/test/payloads/livestreams/uploadThumbnail/responses400.json index 631e001..b581e38 100644 --- a/test/payloads/livestreams/uploadThumbnail/responses400.json +++ b/test/payloads/livestreams/uploadThumbnail/responses400.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/test/payloads/livestreams/uploadThumbnail/responses404.json b/test/payloads/livestreams/uploadThumbnail/responses404.json index 9efa63b..87595d9 100644 --- a/test/payloads/livestreams/uploadThumbnail/responses404.json +++ b/test/payloads/livestreams/uploadThumbnail/responses404.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/test/payloads/playerthemes/delete/responses404.json b/test/payloads/playerthemes/delete/responses404.json index 719c18c..30decf6 100644 --- a/test/payloads/playerthemes/delete/responses404.json +++ b/test/payloads/playerthemes/delete/responses404.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/test/payloads/playerthemes/deleteLogo/responses404.json b/test/payloads/playerthemes/deleteLogo/responses404.json index 719c18c..30decf6 100644 --- a/test/payloads/playerthemes/deleteLogo/responses404.json +++ b/test/payloads/playerthemes/deleteLogo/responses404.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/test/payloads/playerthemes/get/responses404.json b/test/payloads/playerthemes/get/responses404.json index 719c18c..30decf6 100644 --- a/test/payloads/playerthemes/get/responses404.json +++ b/test/payloads/playerthemes/get/responses404.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/test/payloads/playerthemes/update/responses404.json b/test/payloads/playerthemes/update/responses404.json index 719c18c..30decf6 100644 --- a/test/payloads/playerthemes/update/responses404.json +++ b/test/payloads/playerthemes/update/responses404.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/test/payloads/playerthemes/uploadLogo/responses400.json b/test/payloads/playerthemes/uploadLogo/responses400.json index a96e225..6ef950a 100644 --- a/test/payloads/playerthemes/uploadLogo/responses400.json +++ b/test/payloads/playerthemes/uploadLogo/responses400.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/test/payloads/playerthemes/uploadLogo/responses404.json b/test/payloads/playerthemes/uploadLogo/responses404.json index 719c18c..30decf6 100644 --- a/test/payloads/playerthemes/uploadLogo/responses404.json +++ b/test/payloads/playerthemes/uploadLogo/responses404.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/test/payloads/videos/create/responses400.json b/test/payloads/videos/create/responses400.json index fc789fc..c6358bf 100644 --- a/test/payloads/videos/create/responses400.json +++ b/test/payloads/videos/create/responses400.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/test/payloads/videos/delete/responses404.json b/test/payloads/videos/delete/responses404.json index 69b4332..27275e1 100644 --- a/test/payloads/videos/delete/responses404.json +++ b/test/payloads/videos/delete/responses404.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/test/payloads/videos/get/responses404.json b/test/payloads/videos/get/responses404.json index 69b4332..27275e1 100644 --- a/test/payloads/videos/get/responses404.json +++ b/test/payloads/videos/get/responses404.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/test/payloads/videos/getStatus/responses404.json b/test/payloads/videos/getStatus/responses404.json index 69b4332..27275e1 100644 --- a/test/payloads/videos/getStatus/responses404.json +++ b/test/payloads/videos/getStatus/responses404.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/test/payloads/videos/pickThumbnail/responses404.json b/test/payloads/videos/pickThumbnail/responses404.json index 69b4332..27275e1 100644 --- a/test/payloads/videos/pickThumbnail/responses404.json +++ b/test/payloads/videos/pickThumbnail/responses404.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/test/payloads/videos/update/responses400.json b/test/payloads/videos/update/responses400.json index 65910b5..9115c98 100644 --- a/test/payloads/videos/update/responses400.json +++ b/test/payloads/videos/update/responses400.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/test/payloads/videos/update/responses404.json b/test/payloads/videos/update/responses404.json index 69b4332..27275e1 100644 --- a/test/payloads/videos/update/responses404.json +++ b/test/payloads/videos/update/responses404.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/test/payloads/videos/upload/responses400.json b/test/payloads/videos/upload/responses400.json index b90e95e..09d2579 100644 --- a/test/payloads/videos/upload/responses400.json +++ b/test/payloads/videos/upload/responses400.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/test/payloads/videos/upload/responses404.json b/test/payloads/videos/upload/responses404.json index 69b4332..27275e1 100644 --- a/test/payloads/videos/upload/responses404.json +++ b/test/payloads/videos/upload/responses404.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/test/payloads/videos/uploadThumbnail/responses400.json b/test/payloads/videos/uploadThumbnail/responses400.json index 631e001..b581e38 100644 --- a/test/payloads/videos/uploadThumbnail/responses400.json +++ b/test/payloads/videos/uploadThumbnail/responses400.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/test/payloads/videos/uploadThumbnail/responses404.json b/test/payloads/videos/uploadThumbnail/responses404.json index 69b4332..27275e1 100644 --- a/test/payloads/videos/uploadThumbnail/responses404.json +++ b/test/payloads/videos/uploadThumbnail/responses404.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/test/payloads/watermarks/delete/responses404.json b/test/payloads/watermarks/delete/responses404.json index 4ca04c5..c31a9d8 100644 --- a/test/payloads/watermarks/delete/responses404.json +++ b/test/payloads/watermarks/delete/responses404.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/test/payloads/watermarks/upload/responses400.json b/test/payloads/watermarks/upload/responses400.json index 7d5c846..3b406ad 100644 --- a/test/payloads/watermarks/upload/responses400.json +++ b/test/payloads/watermarks/upload/responses400.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/test/payloads/webhooks/create/responses400.json b/test/payloads/webhooks/create/responses400.json index 1878cc2..e7c9e89 100644 --- a/test/payloads/webhooks/create/responses400.json +++ b/test/payloads/webhooks/create/responses400.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/test/payloads/webhooks/delete/responses404.json b/test/payloads/webhooks/delete/responses404.json index 0721bb1..c97ea66 100644 --- a/test/payloads/webhooks/delete/responses404.json +++ b/test/payloads/webhooks/delete/responses404.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