diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5243e11..97ab9f0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,8 +7,17 @@ build.sh docs/AccessToken.md docs/AdditionalBadRequestErrors.md docs/AdvancedAuthenticationApi.md +docs/AnalyticsAggregatedMetricsResponse.md +docs/AnalyticsAggregatedMetricsResponseContext.md +docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md docs/AnalyticsApi.md docs/AnalyticsData.md +docs/AnalyticsMetricsBreakdownResponse.md +docs/AnalyticsMetricsBreakdownResponseContext.md +docs/AnalyticsMetricsBreakdownResponseData.md +docs/AnalyticsMetricsOverTimeResponse.md +docs/AnalyticsMetricsOverTimeResponseContext.md +docs/AnalyticsMetricsOverTimeResponseData.md docs/AnalyticsPlays400Error.md docs/AnalyticsPlaysResponse.md docs/AuthenticatePayload.md @@ -26,12 +35,6 @@ docs/LiveStream.md docs/LiveStreamAssets.md docs/LiveStreamCreationPayload.md docs/LiveStreamListResponse.md -docs/LiveStreamSession.md -docs/LiveStreamSessionClient.md -docs/LiveStreamSessionDevice.md -docs/LiveStreamSessionLocation.md -docs/LiveStreamSessionReferrer.md -docs/LiveStreamSessionSession.md docs/LiveStreamUpdatePayload.md docs/LiveStreamsApi.md docs/Metadata.md @@ -54,19 +57,13 @@ docs/RestreamsResponseObject.md docs/TokenCreationPayload.md docs/TokenListResponse.md docs/TooManyRequests.md +docs/UnrecognizedRequestUrl.md docs/UploadToken.md docs/UploadTokensApi.md docs/Video.md docs/VideoAssets.md docs/VideoClip.md docs/VideoCreationPayload.md -docs/VideoSession.md -docs/VideoSessionClient.md -docs/VideoSessionDevice.md -docs/VideoSessionLocation.md -docs/VideoSessionOs.md -docs/VideoSessionReferrer.md -docs/VideoSessionSession.md docs/VideoSource.md docs/VideoSourceLiveStream.md docs/VideoSourceLiveStreamLink.md @@ -103,7 +100,16 @@ src/ApiVideo.Test/Api/WebhooksApiTests.cs src/ApiVideo.Test/ApiVideo.Test.csproj src/ApiVideo.Test/Model/AccessTokenTests.cs src/ApiVideo.Test/Model/AdditionalBadRequestErrorsTests.cs +src/ApiVideo.Test/Model/AnalyticsAggregatedMetricsResponseContextTests.cs +src/ApiVideo.Test/Model/AnalyticsAggregatedMetricsResponseContextTimeframeTests.cs +src/ApiVideo.Test/Model/AnalyticsAggregatedMetricsResponseTests.cs src/ApiVideo.Test/Model/AnalyticsDataTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsBreakdownResponseContextTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsBreakdownResponseDataTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsBreakdownResponseTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsOverTimeResponseContextTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsOverTimeResponseDataTests.cs +src/ApiVideo.Test/Model/AnalyticsMetricsOverTimeResponseTests.cs src/ApiVideo.Test/Model/AnalyticsPlays400ErrorTests.cs src/ApiVideo.Test/Model/AnalyticsPlaysResponseTests.cs src/ApiVideo.Test/Model/AuthenticatePayloadTests.cs @@ -118,12 +124,6 @@ src/ApiVideo.Test/Model/LinkTests.cs src/ApiVideo.Test/Model/LiveStreamAssetsTests.cs src/ApiVideo.Test/Model/LiveStreamCreationPayloadTests.cs src/ApiVideo.Test/Model/LiveStreamListResponseTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionClientTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionDeviceTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionLocationTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionReferrerTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionSessionTests.cs -src/ApiVideo.Test/Model/LiveStreamSessionTests.cs src/ApiVideo.Test/Model/LiveStreamTests.cs src/ApiVideo.Test/Model/LiveStreamUpdatePayloadTests.cs src/ApiVideo.Test/Model/MetadataTests.cs @@ -144,17 +144,11 @@ src/ApiVideo.Test/Model/RestreamsResponseObjectTests.cs src/ApiVideo.Test/Model/TokenCreationPayloadTests.cs src/ApiVideo.Test/Model/TokenListResponseTests.cs src/ApiVideo.Test/Model/TooManyRequestsTests.cs +src/ApiVideo.Test/Model/UnrecognizedRequestUrlTests.cs src/ApiVideo.Test/Model/UploadTokenTests.cs src/ApiVideo.Test/Model/VideoAssetsTests.cs src/ApiVideo.Test/Model/VideoClipTests.cs src/ApiVideo.Test/Model/VideoCreationPayloadTests.cs -src/ApiVideo.Test/Model/VideoSessionClientTests.cs -src/ApiVideo.Test/Model/VideoSessionDeviceTests.cs -src/ApiVideo.Test/Model/VideoSessionLocationTests.cs -src/ApiVideo.Test/Model/VideoSessionOsTests.cs -src/ApiVideo.Test/Model/VideoSessionReferrerTests.cs -src/ApiVideo.Test/Model/VideoSessionSessionTests.cs -src/ApiVideo.Test/Model/VideoSessionTests.cs src/ApiVideo.Test/Model/VideoSourceLiveStreamLinkTests.cs src/ApiVideo.Test/Model/VideoSourceLiveStreamTests.cs src/ApiVideo.Test/Model/VideoSourceTests.cs @@ -195,7 +189,16 @@ src/ApiVideo/Client/EmptyArrayFixTypeConverter.cs src/ApiVideo/Client/NullableStringTypeConverter.cs src/ApiVideo/Model/AccessToken.cs src/ApiVideo/Model/AdditionalBadRequestErrors.cs +src/ApiVideo/Model/AnalyticsAggregatedMetricsResponse.cs +src/ApiVideo/Model/AnalyticsAggregatedMetricsResponseContext.cs +src/ApiVideo/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.cs src/ApiVideo/Model/AnalyticsData.cs +src/ApiVideo/Model/AnalyticsMetricsBreakdownResponse.cs +src/ApiVideo/Model/AnalyticsMetricsBreakdownResponseContext.cs +src/ApiVideo/Model/AnalyticsMetricsBreakdownResponseData.cs +src/ApiVideo/Model/AnalyticsMetricsOverTimeResponse.cs +src/ApiVideo/Model/AnalyticsMetricsOverTimeResponseContext.cs +src/ApiVideo/Model/AnalyticsMetricsOverTimeResponseData.cs src/ApiVideo/Model/AnalyticsPlays400Error.cs src/ApiVideo/Model/AnalyticsPlaysResponse.cs src/ApiVideo/Model/AuthenticatePayload.cs @@ -213,12 +216,6 @@ src/ApiVideo/Model/LiveStream.cs src/ApiVideo/Model/LiveStreamAssets.cs src/ApiVideo/Model/LiveStreamCreationPayload.cs src/ApiVideo/Model/LiveStreamListResponse.cs -src/ApiVideo/Model/LiveStreamSession.cs -src/ApiVideo/Model/LiveStreamSessionClient.cs -src/ApiVideo/Model/LiveStreamSessionDevice.cs -src/ApiVideo/Model/LiveStreamSessionLocation.cs -src/ApiVideo/Model/LiveStreamSessionReferrer.cs -src/ApiVideo/Model/LiveStreamSessionSession.cs src/ApiVideo/Model/LiveStreamUpdatePayload.cs src/ApiVideo/Model/Metadata.cs src/ApiVideo/Model/Model403ErrorSchema.cs @@ -240,18 +237,12 @@ src/ApiVideo/Model/RestreamsResponseObject.cs src/ApiVideo/Model/TokenCreationPayload.cs src/ApiVideo/Model/TokenListResponse.cs src/ApiVideo/Model/TooManyRequests.cs +src/ApiVideo/Model/UnrecognizedRequestUrl.cs src/ApiVideo/Model/UploadToken.cs src/ApiVideo/Model/Video.cs src/ApiVideo/Model/VideoAssets.cs src/ApiVideo/Model/VideoClip.cs src/ApiVideo/Model/VideoCreationPayload.cs -src/ApiVideo/Model/VideoSession.cs -src/ApiVideo/Model/VideoSessionClient.cs -src/ApiVideo/Model/VideoSessionDevice.cs -src/ApiVideo/Model/VideoSessionLocation.cs -src/ApiVideo/Model/VideoSessionOs.cs -src/ApiVideo/Model/VideoSessionReferrer.cs -src/ApiVideo/Model/VideoSessionSession.cs src/ApiVideo/Model/VideoSource.cs src/ApiVideo/Model/VideoSourceLiveStream.cs src/ApiVideo/Model/VideoSourceLiveStreamLink.cs diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 644fa0c..8e783f7 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -d7b342ceb1a4805da9e3d6355384e34c1a99e1300d01cac3ae3218c5738f11f1 \ No newline at end of file +16c7ff294d3c9a1f33f41ce3edfa0dbfed5810ccdd2d92872179b6c87c5e9169 \ No newline at end of file diff --git a/README.md b/README.md index cd8ecb4..0350a60 100644 --- a/README.md +++ b/README.md @@ -169,8 +169,9 @@ AnalyticsApi analytics = client.Analytics() Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLiveStreamsPlays**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getLiveStreamsPlays) | **GET** `/analytics/live-streams/plays` | Get play events for live stream -[**getVideosPlays**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getVideosPlays) | **GET** `/analytics/videos/plays` | Get play events for video +[**getAggregatedMetrics**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getAggregatedMetrics) | **GET** `/data/metrics/{metric}/{aggregation}` | Retrieve aggregated metrics +[**getMetricsBreakdown**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getMetricsBreakdown) | **GET** `/data/buckets/{metric}/{breakdown}` | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsApi.md#getMetricsOverTime) | **GET** `/data/timeseries/{metric}` | Retrieve metrics over time #### CaptionsApi @@ -232,6 +233,7 @@ Method | HTTP request | Description [**list**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#list) | **GET** `/live-streams` | List all live streams [**uploadThumbnail**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail) | **POST** `/live-streams/{liveStreamId}/thumbnail` | Upload a thumbnail [**deleteThumbnail**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail) | **DELETE** `/live-streams/{liveStreamId}/thumbnail` | Delete a thumbnail +[**complete**](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#complete) | **PUT** `/live-streams/{liveStreamId}/complete` | Complete a live stream #### PlayerThemesApi @@ -342,7 +344,16 @@ Method | HTTP request | Description - [AccessToken](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AccessToken.md) - [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AdditionalBadRequestErrors.md) + - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsAggregatedMetricsResponse.md) + - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContext.md) + - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md) - [AnalyticsData](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsData.md) + - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsBreakdownResponse.md) + - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsBreakdownResponseContext.md) + - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsBreakdownResponseData.md) + - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsOverTimeResponse.md) + - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsOverTimeResponseContext.md) + - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsMetricsOverTimeResponseData.md) - [AnalyticsPlays400Error](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsPlays400Error.md) - [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AnalyticsPlaysResponse.md) - [AuthenticatePayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/AuthenticatePayload.md) @@ -358,12 +369,6 @@ Method | HTTP request | Description - [LiveStreamAssets](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamAssets.md) - [LiveStreamCreationPayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamCreationPayload.md) - [LiveStreamListResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamListResponse.md) - - [LiveStreamSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSession.md) - - [LiveStreamSessionClient](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionClient.md) - - [LiveStreamSessionDevice](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionDevice.md) - - [LiveStreamSessionLocation](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionLocation.md) - - [LiveStreamSessionReferrer](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionReferrer.md) - - [LiveStreamSessionSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamSessionSession.md) - [LiveStreamUpdatePayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamUpdatePayload.md) - [Metadata](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Metadata.md) - [Model403ErrorSchema](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Model403ErrorSchema.md) @@ -383,18 +388,12 @@ Method | HTTP request | Description - [TokenCreationPayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/TooManyRequests.md) + - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UnrecognizedRequestUrl.md) - [UploadToken](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadToken.md) - [Video](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoAssets.md) - [VideoClip](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoClip.md) - [VideoCreationPayload](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoCreationPayload.md) - - [VideoSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSession.md) - - [VideoSessionClient](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionClient.md) - - [VideoSessionDevice](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionDevice.md) - - [VideoSessionLocation](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionLocation.md) - - [VideoSessionOs](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionOs.md) - - [VideoSessionReferrer](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionReferrer.md) - - [VideoSessionSession](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSessionSession.md) - [VideoSource](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSource.md) - [VideoSourceLiveStream](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSourceLiveStream.md) - [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideoSourceLiveStreamLink.md) diff --git a/docs/VideoSessionLocation.md b/docs/AnalyticsAggregatedMetricsResponse.md similarity index 58% rename from docs/VideoSessionLocation.md rename to docs/AnalyticsAggregatedMetricsResponse.md index 2284d65..44864ec 100644 --- a/docs/VideoSessionLocation.md +++ b/docs/AnalyticsAggregatedMetricsResponse.md @@ -1,12 +1,11 @@ -# ApiVideo.Model.VideoSessionLocation -The location of the viewer. +# ApiVideo.Model.AnalyticsAggregatedMetricsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Country** | **string** | The country of the viewer. | [optional] -**City** | **string** | The city of the viewer. | [optional] +**Context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**Data** | **float** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AnalyticsAggregatedMetricsResponseContext.md b/docs/AnalyticsAggregatedMetricsResponseContext.md new file mode 100644 index 0000000..cfcfb0d --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContext.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsAggregatedMetricsResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | **string** | Returns the metric you selected. | [optional] +**Aggregation** | **string** | Returns the aggregation you selected. | [optional] +**Timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md new file mode 100644 index 0000000..52b4286 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsAggregatedMetricsResponseContextTimeframe +Returns the starting and ending date-times of the period you want analytics for. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **DateTime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] +**To** | **DateTime** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AnalyticsApi.md b/docs/AnalyticsApi.md index 1cb0b8d..1e3d6be 100644 --- a/docs/AnalyticsApi.md +++ b/docs/AnalyticsApi.md @@ -4,17 +4,18 @@ All URIs are relative to *https://ws.api.video* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLiveStreamsPlays**](AnalyticsApi.md#getanalyticslivestreamsplays) | **GET** /analytics/live-streams/plays | Get play events for live stream -[**getVideosPlays**](AnalyticsApi.md#getanalyticsvideosplays) | **GET** /analytics/videos/plays | Get play events for video +[**getAggregatedMetrics**](AnalyticsApi.md#getaggregatedmetrics) | **GET** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics +[**getMetricsBreakdown**](AnalyticsApi.md#getmetricsbreakdown) | **GET** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](AnalyticsApi.md#getmetricsovertime) | **GET** /data/timeseries/{metric} | Retrieve metrics over time - -# **getLiveStreamsPlays** -> AnalyticsPlaysResponse getLiveStreamsPlays (DateTime from, string dimension, DateTime? to = null, string filter = null, int? currentPage = null, int? pageSize = null) + +# **getAggregatedMetrics** +> AnalyticsAggregatedMetricsResponse getAggregatedMetrics (string metric, string aggregation, DateTime? from = null, DateTime? to = null, string filterBy = null) -Get play events for live stream +Retrieve aggregated metrics -Retrieve filtered analytics about the number of plays for your live streams in a project. +Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. ### Example ```csharp @@ -23,7 +24,7 @@ using ApiVideo.Client; namespace Example { - public class getLiveStreamsPlaysExample + public class getAggregatedMetricsExample { public static void Main() { @@ -32,22 +33,100 @@ namespace Example var apiInstance = new ApiVideoClient(apiKey,basePath); - var from = 2023-06-01; // DateTime | Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - var dimension = browser; // string | Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. 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`. - var to = 2023-06-10; // DateTime? | Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - var filter = liveStreamId:li3q7HxhApxRF1c8F8r6VeaI; // string | Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + var metric = metric_example; // string | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + var aggregation = aggregation_example; // string | Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + var from = 2024-02-05T00:00:00+01:00; // DateTime? | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) + var to = 2024-02-06T00:00:00+01:00; // DateTime? | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + var filterBy = filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox; // string | 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`. (optional) + var apiAnalyticsInstance = apiInstance.Analytics(); + try + { + // Retrieve aggregated metrics + AnalyticsAggregatedMetricsResponse result = apiAnalyticsInstance.getAggregatedMetrics(metric, aggregation, from, to, filterBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AnalyticsApi.getAggregatedMetrics: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metric** | **string**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. | + **aggregation** | **string**| Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. | + **from** | **DateTime?**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. | [optional] + **to** | **DateTime?**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | **string**| 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`. | [optional] + +### Return type + +[**AnalyticsAggregatedMetricsResponse**](AnalyticsAggregatedMetricsResponse.md) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **getMetricsBreakdown** +> AnalyticsMetricsBreakdownResponse getMetricsBreakdown (string metric, string breakdown, DateTime? from = null, DateTime? to = null, string filterBy = null, int? currentPage = null, int? pageSize = null) + +Retrieve metrics in a breakdown of dimensions + +Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + +### Example +```csharp +using System.Diagnostics; +using ApiVideo.Client; + +namespace Example +{ + public class getMetricsBreakdownExample + { + public static void Main() + { + var basePath = ApiVideoClient.Client.Environment.SANDBOX; + var apiKey = "YOUR_API_KEY"; + + var apiInstance = new ApiVideoClient(apiKey,basePath); + + var metric = metric_example; // string | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + var breakdown = breakdown_example; // string | Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + var from = 2024-02-05T00:00:00+01:00; // DateTime? | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + var to = 2024-02-06T00:00:00+01:00; // DateTime? | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + var filterBy = filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox; // string | 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`. (optional) var currentPage = 2; // int? | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) var pageSize = 30; // int? | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) var apiAnalyticsInstance = apiInstance.Analytics(); try { - // Get play events for live stream - AnalyticsPlaysResponse result = apiAnalyticsInstance.getLiveStreamsPlays(from, dimension, to, filter, currentPage, pageSize); + // Retrieve metrics in a breakdown of dimensions + AnalyticsMetricsBreakdownResponse result = apiAnalyticsInstance.getMetricsBreakdown(metric, breakdown, from, to, filterBy, currentPage, pageSize); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling AnalyticsApi.getLiveStreamsPlays: " + e.Message ); + Debug.Print("Exception when calling AnalyticsApi.getMetricsBreakdown: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -60,16 +139,17 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **from** | **DateTime**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | - **dimension** | **string**| Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. | - **to** | **DateTime?**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional] - **filter** | **string**| Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. | [optional] + **metric** | **string**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | + **breakdown** | **string**| Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | + **from** | **DateTime?**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] + **to** | **DateTime?**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | **string**| 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`. | [optional] **currentPage** | **int?**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **int?**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] ### Return type -[**AnalyticsPlaysResponse**](AnalyticsPlaysResponse.md) +[**AnalyticsMetricsBreakdownResponse**](AnalyticsMetricsBreakdownResponse.md) ### HTTP request headers @@ -82,19 +162,18 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **403** | Forbidden - Disabled Analytics | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getVideosPlays** -> AnalyticsPlaysResponse getVideosPlays (DateTime from, string dimension, DateTime? to = null, string filter = null, int? currentPage = null, int? pageSize = null) + +# **getMetricsOverTime** +> AnalyticsMetricsOverTimeResponse getMetricsOverTime (string metric, DateTime? from = null, DateTime? to = null, DateTime? interval = null, string filterBy = null, int? currentPage = null, int? pageSize = null) -Get play events for video +Retrieve metrics over time -Retrieve filtered analytics about the number of plays for your videos in a project. +Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred ### Example ```csharp @@ -103,7 +182,7 @@ using ApiVideo.Client; namespace Example { - public class getVideosPlaysExample + public class getMetricsOverTimeExample { public static void Main() { @@ -112,22 +191,23 @@ namespace Example var apiInstance = new ApiVideoClient(apiKey,basePath); - var from = 2023-06-01; // DateTime | Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. - var dimension = browser; // string | Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. 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`. - var to = 2023-06-10; // DateTime? | Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - var filter = videoId:vi3q7HxhApxRF1c8F8r6VeaI; // string | Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + var metric = metric_example; // string | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + var from = from=2024-02-05T00:00:00+01:00; // DateTime? | Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + var to = to=2024-02-06T00:00:00+01:00; // DateTime? | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + var interval = to=2024-02-06T00:00:00+01:00; // DateTime? | Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) + var filterBy = filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox; // string | 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`. (optional) var currentPage = 2; // int? | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) var pageSize = 30; // int? | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) var apiAnalyticsInstance = apiInstance.Analytics(); try { - // Get play events for video - AnalyticsPlaysResponse result = apiAnalyticsInstance.getVideosPlays(from, dimension, to, filter, currentPage, pageSize); + // Retrieve metrics over time + AnalyticsMetricsOverTimeResponse result = apiAnalyticsInstance.getMetricsOverTime(metric, from, to, interval, filterBy, currentPage, pageSize); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling AnalyticsApi.getVideosPlays: " + e.Message ); + Debug.Print("Exception when calling AnalyticsApi.getMetricsOverTime: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -140,16 +220,17 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **from** | **DateTime**| Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | - **dimension** | **string**| Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. | - **to** | **DateTime?**| Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. | [optional] - **filter** | **string**| Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. | [optional] + **metric** | **string**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | + **from** | **DateTime?**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] + **to** | **DateTime?**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **interval** | **DateTime?**| Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. | [optional] + **filterBy** | **string**| 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`. | [optional] **currentPage** | **int?**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **int?**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] ### Return type -[**AnalyticsPlaysResponse**](AnalyticsPlaysResponse.md) +[**AnalyticsMetricsOverTimeResponse**](AnalyticsMetricsOverTimeResponse.md) ### HTTP request headers @@ -162,8 +243,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | Success | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **400** | Bad request error | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **403** | Forbidden - Disabled Analytics | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| -| **404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Unrecognized request URL | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| | **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/AnalyticsMetricsBreakdownResponse.md b/docs/AnalyticsMetricsBreakdownResponse.md new file mode 100644 index 0000000..bdb2767 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponse.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsBreakdownResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Context** | [**AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | | +**Data** | [**List<AnalyticsMetricsBreakdownResponseData>**](AnalyticsMetricsBreakdownResponseData.md) | Returns an array of dimensions and their respective metrics. | +**Pagination** | [**Pagination**](Pagination.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AnalyticsMetricsBreakdownResponseContext.md b/docs/AnalyticsMetricsBreakdownResponseContext.md new file mode 100644 index 0000000..da2d7d9 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseContext.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsBreakdownResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | **string** | Returns the metric you selected. | [optional] +**Breakdown** | **string** | Returns the dimension you selected. | [optional] +**Timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AnalyticsMetricsBreakdownResponseData.md b/docs/AnalyticsMetricsBreakdownResponseData.md new file mode 100644 index 0000000..44f48d3 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseData.md @@ -0,0 +1,11 @@ +# ApiVideo.Model.AnalyticsMetricsBreakdownResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DimensionValue** | **string** | Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\". | [optional] +**MetricValue** | **float** | Returns the data for a specific dimension value. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AnalyticsMetricsOverTimeResponse.md b/docs/AnalyticsMetricsOverTimeResponse.md new file mode 100644 index 0000000..0e76ac2 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponse.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsOverTimeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | | +**Data** | [**List<AnalyticsMetricsOverTimeResponseData>**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . | +**Pagination** | [**Pagination**](Pagination.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AnalyticsMetricsOverTimeResponseContext.md b/docs/AnalyticsMetricsOverTimeResponseContext.md new file mode 100644 index 0000000..c44d7e8 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseContext.md @@ -0,0 +1,12 @@ +# ApiVideo.Model.AnalyticsMetricsOverTimeResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | **string** | Returns the metric you selected. | [optional] +**Interval** | **string** | Returns the interval you selected. | [optional] +**Timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AnalyticsMetricsOverTimeResponseData.md b/docs/AnalyticsMetricsOverTimeResponseData.md new file mode 100644 index 0000000..6dcb5e5 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseData.md @@ -0,0 +1,11 @@ +# ApiVideo.Model.AnalyticsMetricsOverTimeResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmittedAt** | **string** | Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. | [optional] +**MetricValue** | **float** | Returns the data for a specific metric value. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/LiveStream.md b/docs/LiveStream.md index 4ea9838..7612913 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -7,11 +7,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** | **bool** | 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** | **bool** | 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** | **bool** | Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not. | [optional] -**Restreams** | [**List<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of RTMP restream destinations. | +**Restreams** | [**List<RestreamsResponseObject>**](RestreamsResponseObject.md) | Returns the list of restream destinations. | **CreatedAt** | **DateTime** | When the player was created, presented in ISO-8601 format. | [optional] **UpdatedAt** | **DateTime** | When the player was last updated, presented in ISO-8601 format. | [optional] diff --git a/docs/LiveStreamCreationPayload.md b/docs/LiveStreamCreationPayload.md index 9591570..2e13618 100644 --- a/docs/LiveStreamCreationPayload.md +++ b/docs/LiveStreamCreationPayload.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | Add a name for your live stream here. | -**Public** | **bool** | 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** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **PlayerId** | **string** | The unique identifier for the player. | [optional] -**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. | [optional] +**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiveStreamSession.md b/docs/LiveStreamSession.md deleted file mode 100644 index 9f305fa..0000000 --- a/docs/LiveStreamSession.md +++ /dev/null @@ -1,15 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/LiveStreamSessionClient.md b/docs/LiveStreamSessionClient.md deleted file mode 100644 index da01352..0000000 --- a/docs/LiveStreamSessionClient.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/LiveStreamSessionDevice.md b/docs/LiveStreamSessionDevice.md deleted file mode 100644 index 449bc90..0000000 --- a/docs/LiveStreamSessionDevice.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/LiveStreamSessionReferrer.md b/docs/LiveStreamSessionReferrer.md deleted file mode 100644 index d618371..0000000 --- a/docs/LiveStreamSessionReferrer.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/LiveStreamSessionSession.md b/docs/LiveStreamSessionSession.md deleted file mode 100644 index 84422fb..0000000 --- a/docs/LiveStreamSessionSession.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiVideo.Model.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** | **DateTime** | When the session started, with the date and time presented in ISO-8601 format. | [optional] -**EndedAt** | **DateTime** | When the session ended, with the date and time presented in ISO-8601 format. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/LiveStreamUpdatePayload.md b/docs/LiveStreamUpdatePayload.md index 73a6e7c..97d6dc4 100644 --- a/docs/LiveStreamUpdatePayload.md +++ b/docs/LiveStreamUpdatePayload.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | The name you want to use for your live stream. | [optional] -**Public** | **bool** | 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** | **bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management). | [optional] **PlayerId** | **string** | The unique ID for the player associated with a live stream that you want to update. | [optional] -**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [optional] +**Restreams** | [**List<RestreamsRequestObject>**](RestreamsRequestObject.md) | Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiveStreamsApi.md b/docs/LiveStreamsApi.md index 91d56a9..8346f97 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**list**](LiveStreamsApi.md#getlivestreams) | **GET** /live-streams | List all live streams [**uploadThumbnail**](LiveStreamsApi.md#postlivestreamslivestreamidthumbnail) | **POST** /live-streams/{liveStreamId}/thumbnail | Upload a thumbnail [**deleteThumbnail**](LiveStreamsApi.md#deletelivestreamslivestreamidthumbnail) | **DELETE** /live-streams/{liveStreamId}/thumbnail | Delete a thumbnail +[**complete**](LiveStreamsApi.md#putlivestreamslivestreamidcomplete) | **PUT** /live-streams/{liveStreamId}/complete | Complete a live stream @@ -500,3 +501,70 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **complete** +> void complete (string liveStreamId) + +Complete a live stream + +Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + +### Example +```csharp +using System.Diagnostics; +using ApiVideo.Client; + +namespace Example +{ + public class completeExample + { + public static void Main() + { + var basePath = ApiVideoClient.Client.Environment.SANDBOX; + var apiKey = "YOUR_API_KEY"; + + var apiInstance = new ApiVideoClient(apiKey,basePath); + + var liveStreamId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique ID for the live stream you want to complete. + var apiLiveStreamsInstance = apiInstance.LiveStreams(); + try + { + // Complete a live stream + apiLiveStreamsInstance.complete(liveStreamId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LiveStreamsApi.complete: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **liveStreamId** | **string**| The unique ID for the live stream you want to complete. | + +### Return type + +void (empty response body) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **404** | Not Found | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| +| **429** | Too Many Requests | * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RestreamsRequestObject.md b/docs/RestreamsRequestObject.md index cc6e0d5..a757034 100644 --- a/docs/RestreamsRequestObject.md +++ b/docs/RestreamsRequestObject.md @@ -6,7 +6,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. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RestreamsResponseObject.md b/docs/RestreamsResponseObject.md index c627dfa..8fb916c 100644 --- a/docs/RestreamsResponseObject.md +++ b/docs/RestreamsResponseObject.md @@ -5,7 +5,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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiveStreamSessionLocation.md b/docs/UnrecognizedRequestUrl.md similarity index 51% rename from docs/LiveStreamSessionLocation.md rename to docs/UnrecognizedRequestUrl.md index 3e73072..a1817ca 100644 --- a/docs/LiveStreamSessionLocation.md +++ b/docs/UnrecognizedRequestUrl.md @@ -1,12 +1,12 @@ -# ApiVideo.Model.LiveStreamSessionLocation -The location of the viewer of the live stream. +# ApiVideo.Model.UnrecognizedRequestUrl ## 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] +**Type** | **string** | A link to the error documentation. | [optional] +**Title** | **string** | A description of the error that occurred. | [optional] +**Status** | **int** | The HTTP status code. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoCreationPayload.md b/docs/VideoCreationPayload.md index 9711666..398233a 100644 --- a/docs/VideoCreationPayload.md +++ b/docs/VideoCreationPayload.md @@ -7,7 +7,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** | **bool** | 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] [default to true] +**Public** | **bool** | 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] [default to true] **Panoramic** | **bool** | Indicates if your video is a 360/immersive video. | [optional] [default to false] **Mp4Support** | **bool** | Enables mp4 version in addition to streamed version. | [optional] [default to true] **PlayerId** | **string** | The unique identification number for your video player. | [optional] diff --git a/docs/VideoSession.md b/docs/VideoSession.md deleted file mode 100644 index f0445de..0000000 --- a/docs/VideoSession.md +++ /dev/null @@ -1,15 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/VideoSessionClient.md b/docs/VideoSessionClient.md deleted file mode 100644 index ba54f46..0000000 --- a/docs/VideoSessionClient.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/VideoSessionDevice.md b/docs/VideoSessionDevice.md deleted file mode 100644 index a38be90..0000000 --- a/docs/VideoSessionDevice.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/VideoSessionOs.md b/docs/VideoSessionOs.md deleted file mode 100644 index 2e02cb7..0000000 --- a/docs/VideoSessionOs.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/VideoSessionReferrer.md b/docs/VideoSessionReferrer.md deleted file mode 100644 index b6c32a0..0000000 --- a/docs/VideoSessionReferrer.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/VideoSessionSession.md b/docs/VideoSessionSession.md deleted file mode 100644 index bf50d73..0000000 --- a/docs/VideoSessionSession.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiVideo.Model.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** | **DateTime** | When the video session started, presented in ISO-8601 format. | [optional] -**EndedAt** | **DateTime** | When the video session ended, presented in ISO-8601 format. | [optional] -**Metadata** | [**List<Metadata>**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/src/Api/AnalyticsApi.cs b/src/Api/AnalyticsApi.cs index 4f57dbd..796a960 100644 --- a/src/Api/AnalyticsApi.cs +++ b/src/Api/AnalyticsApi.cs @@ -41,58 +41,324 @@ public AnalyticsApi(ApiClient apiClient) } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// 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. +/// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) + + /// AnalyticsAggregatedMetricsResponse + public Task getAggregatedMetricsAsync(string metric, string aggregation, DateTime? from = default, DateTime? to = default, string filterBy = default, CancellationToken cancellationToken = default) + { + Task> localVarResponse = getAggregatedMetricsWithHttpInfoAsync(metric, aggregation, from, to, filterBy, cancellationToken); + return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); + + } + + /// + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Thrown when fails to make API call + /// 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. +/// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) + + /// AnalyticsAggregatedMetricsResponse + public AnalyticsAggregatedMetricsResponse getAggregatedMetrics(string metric, string aggregation, DateTime? from = default, DateTime? to = default, string filterBy = default) + { + ApiResponse localVarResponse = getAggregatedMetricsWithHttpInfo(metric, aggregation, from, to, filterBy); + return localVarResponse.Data; + } + + + /// + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// 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. +/// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) + + /// ApiResponse of AnalyticsAggregatedMetricsResponse + public Task> getAggregatedMetricsWithHttpInfoAsync(string metric, string aggregation, DateTime? from = default, DateTime? to = default, string filterBy = default, CancellationToken cancellationToken = default) + { + + + + + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getAggregatedMetrics"); + // verify the required parameter 'aggregation' is set + if (aggregation == null) + throw new ApiException(400, "Missing required parameter 'aggregation' when calling AnalyticsApi->getAggregatedMetrics"); + + + var localVarPath = "/data/metrics/{metric}/{aggregation}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (aggregation != null) localVarPathParams.Add("aggregation", this.ApiClient.ParameterToString(aggregation)); // path parameter + if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter + if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter + + + + + // make the HTTP request + Task localVarResponse = (Task) this.ApiClient.CallApiAsync(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType, cancellationToken); + + + return localVarResponse.ContinueWith((Task task) => + { + int localVarStatusCode = (int) task.Result.StatusCode; + return new ApiResponse(localVarStatusCode, + task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AnalyticsAggregatedMetricsResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsAggregatedMetricsResponse))); + }); + + } + + + /// + /// Retrieve aggregated metrics Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Thrown when fails to make API call + /// 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. +/// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) + + /// ApiResponse of AnalyticsAggregatedMetricsResponse + public ApiResponse getAggregatedMetricsWithHttpInfo(string metric, string aggregation, DateTime? from = default, DateTime? to = default, string filterBy = default) + { + + + + + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getAggregatedMetrics"); + // verify the required parameter 'aggregation' is set + if (aggregation == null) + throw new ApiException(400, "Missing required parameter 'aggregation' when calling AnalyticsApi->getAggregatedMetrics"); + + + var localVarPath = "/data/metrics/{metric}/{aggregation}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (aggregation != null) localVarPathParams.Add("aggregation", this.ApiClient.ParameterToString(aggregation)); // path parameter + if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter + if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter + + + + + // make the HTTP request + RestResponse localVarResponse = (RestResponse) this.ApiClient.CallApi(localVarPath, + Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (AnalyticsAggregatedMetricsResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsAggregatedMetricsResponse))); + + } + + + /// + /// Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + /// + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. (required) + /// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. (required) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest getAggregatedMetrics(string metric, string aggregation) { + return new APIgetAggregatedMetricsRequest(this,metric, aggregation); + } + + /// + /// Request getAggregatedMetrics class to get paginated list of items + /// + public class APIgetAggregatedMetricsRequest { + private string metric; + private string aggregation; + private DateTime? from; + private DateTime? to; + private string filterBy; + + private AnalyticsApi currentApiInstance; + + /// + /// Class constructor with api instance + /// + /// Instance of the current api + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. (required) + /// Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. (required) + public APIgetAggregatedMetricsRequest(AnalyticsApi instance, string metric, string aggregation) { + this.metric = metric; + this.aggregation = aggregation; + this.currentApiInstance = instance; + } + + /// + /// Set from + /// + /// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. (optional) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest From(DateTime? from) { + this.from = from; + return this; + } + + /// + /// Set to + /// + /// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest To(DateTime? to) { + this.to = to; + return this; + } + + /// + /// Set 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`. (optional) + /// APIgetAggregatedMetricsRequest + public APIgetAggregatedMetricsRequest FilterBy(string filterBy) { + this.filterBy = filterBy; + return this; + } + + + /// + /// Execute getAggregatedMetrics request + /// + /// AnalyticsAggregatedMetricsResponse + public AnalyticsAggregatedMetricsResponse execute(){ + ApiResponse localVarResp = this.currentApiInstance.getAggregatedMetricsWithHttpInfo(metric, aggregation, from, to, filterBy); + return localVarResp.Data; + } + + + private APIgetAggregatedMetricsRequest copy() { + APIgetAggregatedMetricsRequest copy = new APIgetAggregatedMetricsRequest( this.currentApiInstance, metric, aggregation); + copy.From(from); + copy.To(to); + copy.FilterBy(filterBy); + return copy; + } + } + /// + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// 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. +/// 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`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public Task getLiveStreamsPlaysAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// AnalyticsMetricsBreakdownResponse + public Task getMetricsBreakdownAsync(string metric, string breakdown, DateTime? from = default, DateTime? to = default, string filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { - Task> localVarResponse = getLiveStreamsPlaysWithHttpInfoAsync(from, dimension, to, filter, currentPage, pageSize, cancellationToken); - return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); + Task> localVarResponse = getMetricsBreakdownWithHttpInfoAsync(metric, breakdown, from, to, filterBy, currentPage, pageSize, cancellationToken); + return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// /// Thrown when fails to make API call - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// 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. +/// 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`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public AnalyticsPlaysResponse getLiveStreamsPlays(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// AnalyticsMetricsBreakdownResponse + public AnalyticsMetricsBreakdownResponse getMetricsBreakdown(string metric, string breakdown, DateTime? from = default, DateTime? to = default, string filterBy = default, int? currentPage = default, int? pageSize = default) { - ApiResponse localVarResponse = getLiveStreamsPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); + ApiResponse localVarResponse = getMetricsBreakdownWithHttpInfo(metric, breakdown, from, to, filterBy, currentPage, pageSize); return localVarResponse.Data; } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// 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. +/// 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`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public Task> getLiveStreamsPlaysWithHttpInfoAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// ApiResponse of AnalyticsMetricsBreakdownResponse + public Task> getMetricsBreakdownWithHttpInfoAsync(string metric, string breakdown, DateTime? from = default, DateTime? to = default, string filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { @@ -100,15 +366,16 @@ public Task> getLiveStreamsPlaysWithHttpInfo - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getLiveStreamsPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getLiveStreamsPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsBreakdown"); + // verify the required parameter 'breakdown' is set + if (breakdown == null) + throw new ApiException(400, "Missing required parameter 'breakdown' when calling AnalyticsApi->getMetricsBreakdown"); - var localVarPath = "/analytics/live-streams/plays"; + var localVarPath = "/data/buckets/{metric}/{breakdown}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -129,10 +396,11 @@ public Task> getLiveStreamsPlaysWithHttpInfo if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (breakdown != null) localVarPathParams.Add("breakdown", this.ApiClient.ParameterToString(breakdown)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -148,27 +416,28 @@ public Task> getLiveStreamsPlaysWithHttpInfo return localVarResponse.ContinueWith((Task task) => { int localVarStatusCode = (int) task.Result.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsBreakdownResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsMetricsBreakdownResponse))); }); } /// - /// Get play events for live stream Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve metrics in a breakdown of dimensions Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// /// Thrown when fails to make API call - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) + /// 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. +/// 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`. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// ApiResponse of AnalyticsMetricsBreakdownResponse + public ApiResponse getMetricsBreakdownWithHttpInfo(string metric, string breakdown, DateTime? from = default, DateTime? to = default, string filterBy = default, int? currentPage = default, int? pageSize = default) { @@ -176,15 +445,16 @@ public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateT - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getLiveStreamsPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getLiveStreamsPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsBreakdown"); + // verify the required parameter 'breakdown' is set + if (breakdown == null) + throw new ApiException(400, "Missing required parameter 'breakdown' when calling AnalyticsApi->getMetricsBreakdown"); - var localVarPath = "/analytics/live-streams/plays"; + var localVarPath = "/data/buckets/{metric}/{breakdown}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -205,10 +475,11 @@ public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateT if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter + if (breakdown != null) localVarPathParams.Add("breakdown", this.ApiClient.ParameterToString(breakdown)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -221,31 +492,32 @@ public ApiResponse getLiveStreamsPlaysWithHttpInfo(DateT localVarPathParams, localVarContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsBreakdownResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsMetricsBreakdownResponse))); } /// - /// Retrieve filtered analytics about the number of plays for your live streams in a project. + /// Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. /// - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// 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`. (required) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest getLiveStreamsPlays(DateTime from, string dimension) { - return new APIgetLiveStreamsPlaysRequest(this,from, dimension); + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + /// 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`. (required) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest getMetricsBreakdown(string metric, string breakdown) { + return new APIgetMetricsBreakdownRequest(this,metric, breakdown); } /// - /// Request getLiveStreamsPlays class to get paginated list of items + /// Request getMetricsBreakdown class to get paginated list of items /// - public class APIgetLiveStreamsPlaysRequest { - private DateTime from; - private string dimension; + public class APIgetMetricsBreakdownRequest { + private string metric; + private string breakdown; + private DateTime? from; private DateTime? to; - private string filter; + private string filterBy; private int? currentPage; private int? pageSize; @@ -255,31 +527,41 @@ public class APIgetLiveStreamsPlaysRequest { /// Class constructor with api instance /// /// Instance of the current api - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// 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`. (required) - public APIgetLiveStreamsPlaysRequest(AnalyticsApi instance, DateTime from, string dimension) { - this.from = from; - this.dimension = dimension; + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + /// 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`. (required) + public APIgetMetricsBreakdownRequest(AnalyticsApi instance, string metric, string breakdown) { + this.metric = metric; + this.breakdown = breakdown; this.currentApiInstance = instance; } + /// + /// Set from + /// + /// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest From(DateTime? from) { + this.from = from; + return this; + } + /// /// Set to /// - /// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest To(DateTime? 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. (optional) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest To(DateTime? to) { this.to = to; return this; } /// - /// Set filter + /// Set filterBy /// - /// Use this query parameter to filter your results to a specific live stream in a project that you want analytics for. You must use the `liveStreamId:` prefix when specifying a live stream ID. (optional) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest Filter(string filter) { - this.filter = filter; + /// 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`. (optional) + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest FilterBy(string filterBy) { + this.filterBy = filterBy; return this; } @@ -287,8 +569,8 @@ public APIgetLiveStreamsPlaysRequest Filter(string filter) { /// Set currentPage /// /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest CurrentPage(int? currentPage) { + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest CurrentPage(int? currentPage) { this.currentPage = currentPage; return this; } @@ -297,8 +579,8 @@ public APIgetLiveStreamsPlaysRequest CurrentPage(int? currentPage) { /// Set pageSize /// /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// APIgetLiveStreamsPlaysRequest - public APIgetLiveStreamsPlaysRequest PageSize(int? pageSize) { + /// APIgetMetricsBreakdownRequest + public APIgetMetricsBreakdownRequest PageSize(int? pageSize) { this.pageSize = pageSize; return this; } @@ -306,12 +588,12 @@ public APIgetLiveStreamsPlaysRequest PageSize(int? pageSize) { /// - /// Execute getLiveStreamsPlays request + /// Execute getMetricsBreakdown request /// - /// AnalyticsPlaysResponse - public Page execute(){ - ApiResponse localVarResp = this.currentApiInstance.getLiveStreamsPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); - return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { + /// AnalyticsMetricsBreakdownResponse + public Page execute(){ + ApiResponse localVarResp = this.currentApiInstance.getMetricsBreakdownWithHttpInfo(metric, breakdown, from, to, filterBy, currentPage, pageSize); + return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { try { return copy().CurrentPage((currentPage == null ? 1 : currentPage) + 1).execute(); } catch (ApiException e) { @@ -320,68 +602,72 @@ public Page execute(){ }); } - private APIgetLiveStreamsPlaysRequest copy() { - APIgetLiveStreamsPlaysRequest copy = new APIgetLiveStreamsPlaysRequest( this.currentApiInstance, from, dimension); + private APIgetMetricsBreakdownRequest copy() { + APIgetMetricsBreakdownRequest copy = new APIgetMetricsBreakdownRequest( this.currentApiInstance, metric, breakdown); + copy.From(from); copy.To(to); - copy.Filter(filter); + copy.FilterBy(filterBy); copy.CurrentPage(currentPage); copy.PageSize(pageSize); return copy; } } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public Task getVideosPlaysAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// AnalyticsMetricsOverTimeResponse + public Task getMetricsOverTimeAsync(string metric, DateTime? from = default, DateTime? to = default, DateTime? interval = default, string filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { - Task> localVarResponse = getVideosPlaysWithHttpInfoAsync(from, dimension, to, filter, currentPage, pageSize, cancellationToken); - return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); + Task> localVarResponse = getMetricsOverTimeWithHttpInfoAsync(metric, from, to, interval, filterBy, currentPage, pageSize, cancellationToken); + return localVarResponse.ContinueWith((Task> task) => task.Result.Data ); } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// AnalyticsPlaysResponse - public AnalyticsPlaysResponse getVideosPlays(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// AnalyticsMetricsOverTimeResponse + public AnalyticsMetricsOverTimeResponse getMetricsOverTime(string metric, DateTime? from = default, DateTime? to = default, DateTime? interval = default, string filterBy = default, int? currentPage = default, int? pageSize = default) { - ApiResponse localVarResponse = getVideosPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); + ApiResponse localVarResponse = getMetricsOverTimeWithHttpInfo(metric, from, to, interval, filterBy, currentPage, pageSize); return localVarResponse.Data; } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public Task> getVideosPlaysWithHttpInfoAsync(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) + /// ApiResponse of AnalyticsMetricsOverTimeResponse + public Task> getMetricsOverTimeWithHttpInfoAsync(string metric, DateTime? from = default, DateTime? to = default, DateTime? interval = default, string filterBy = default, int? currentPage = default, int? pageSize = default, CancellationToken cancellationToken = default) { @@ -389,15 +675,13 @@ public Task> getVideosPlaysWithHttpInfoAsync - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getVideosPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getVideosPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsOverTime"); - var localVarPath = "/analytics/videos/plays"; + var localVarPath = "/data/timeseries/{metric}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -418,10 +702,11 @@ public Task> getVideosPlaysWithHttpInfoAsync if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (interval != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "interval", interval)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -437,27 +722,28 @@ public Task> getVideosPlaysWithHttpInfoAsync return localVarResponse.ContinueWith((Task task) => { int localVarStatusCode = (int) task.Result.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsOverTimeResponse) this.ApiClient.Deserialize(task.Result, typeof(AnalyticsMetricsOverTimeResponse))); }); } /// - /// Get play events for video Retrieve filtered analytics about the number of plays for your videos in a project. + /// Retrieve metrics over time Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred /// /// Thrown when fails to make API call - /// 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. -/// 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`. -/// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) -/// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) + /// 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. +/// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) +/// Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +/// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +/// 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`. (optional) /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// ApiResponse of AnalyticsPlaysResponse - public ApiResponse getVideosPlaysWithHttpInfo(DateTime from, string dimension, DateTime? to = default, string filter = default, int? currentPage = default, int? pageSize = default) + /// ApiResponse of AnalyticsMetricsOverTimeResponse + public ApiResponse getMetricsOverTimeWithHttpInfo(string metric, DateTime? from = default, DateTime? to = default, DateTime? interval = default, string filterBy = default, int? currentPage = default, int? pageSize = default) { @@ -465,15 +751,13 @@ public ApiResponse getVideosPlaysWithHttpInfo(DateTime f - // verify the required parameter 'from' is set - if (from == null) - throw new ApiException(400, "Missing required parameter 'from' when calling AnalyticsApi->getVideosPlays"); - // verify the required parameter 'dimension' is set - if (dimension == null) - throw new ApiException(400, "Missing required parameter 'dimension' when calling AnalyticsApi->getVideosPlays"); + + // verify the required parameter 'metric' is set + if (metric == null) + throw new ApiException(400, "Missing required parameter 'metric' when calling AnalyticsApi->getMetricsOverTime"); - var localVarPath = "/analytics/videos/plays"; + var localVarPath = "/data/timeseries/{metric}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(); @@ -494,10 +778,11 @@ public ApiResponse getVideosPlaysWithHttpInfo(DateTime f if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + if (metric != null) localVarPathParams.Add("metric", this.ApiClient.ParameterToString(metric)); // path parameter if (from != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "from", from)); // query parameter if (to != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "to", to)); // query parameter - if (dimension != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "dimension", dimension)); // query parameter - if (filter != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filter", filter)); // query parameter + if (interval != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "interval", interval)); // query parameter + if (filterBy != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "filterBy", filterBy)); // query parameter if (currentPage != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "currentPage", currentPage)); // query parameter if (pageSize != null) localVarQueryParams.AddRange(this.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter @@ -510,31 +795,31 @@ public ApiResponse getVideosPlaysWithHttpInfo(DateTime f localVarPathParams, localVarContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (AnalyticsPlaysResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsPlaysResponse))); + (AnalyticsMetricsOverTimeResponse) this.ApiClient.Deserialize(localVarResponse, typeof(AnalyticsMetricsOverTimeResponse))); } /// - /// 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 /// - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. (required) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest getVideosPlays(DateTime from, string dimension) { - return new APIgetVideosPlaysRequest(this,from, dimension); + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest getMetricsOverTime(string metric) { + return new APIgetMetricsOverTimeRequest(this,metric); } /// - /// Request getVideosPlays class to get paginated list of items + /// Request getMetricsOverTime class to get paginated list of items /// - public class APIgetVideosPlaysRequest { - private DateTime from; - private string dimension; + public class APIgetMetricsOverTimeRequest { + private string metric; + private DateTime? from; private DateTime? to; - private string filter; + private DateTime? interval; + private string filterBy; private int? currentPage; private int? pageSize; @@ -544,31 +829,49 @@ public class APIgetVideosPlaysRequest { /// Class constructor with api instance /// /// Instance of the current api - /// Use this query parameter to set the start date for the time period that you want analytics for. - The API returns analytics data including the day you set in `from`. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (required) - /// Use this query parameter to define the dimension that you want analytics for. - `videoId`: Returns analytics based on the public video identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. (required) - public APIgetVideosPlaysRequest(AnalyticsApi instance, DateTime from, string dimension) { - this.from = from; - this.dimension = dimension; + /// Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. (required) + public APIgetMetricsOverTimeRequest(AnalyticsApi instance, string metric) { + this.metric = metric; this.currentApiInstance = instance; } + /// + /// Set from + /// + /// Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest From(DateTime? from) { + this.from = from; + return this; + } + /// /// Set to /// - /// Use this optional query parameter to set the end date for the time period that you want analytics for. - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - The date you set must be **within the last 30 days**. - The value you provide must follow the `YYYY-MM-DD` format. (optional) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest To(DateTime? 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. (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest To(DateTime? to) { this.to = to; return this; } /// - /// Set filter + /// Set interval + /// + /// Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest Interval(DateTime? interval) { + this.interval = interval; + return this; + } + + /// + /// Set filterBy /// - /// Use this query parameter to filter your results to a specific video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. (optional) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest Filter(string filter) { - this.filter = filter; + /// 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`. (optional) + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest FilterBy(string filterBy) { + this.filterBy = filterBy; return this; } @@ -576,8 +879,8 @@ public APIgetVideosPlaysRequest Filter(string filter) { /// Set currentPage /// /// Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest CurrentPage(int? currentPage) { + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest CurrentPage(int? currentPage) { this.currentPage = currentPage; return this; } @@ -586,8 +889,8 @@ public APIgetVideosPlaysRequest CurrentPage(int? currentPage) { /// Set pageSize /// /// Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - /// APIgetVideosPlaysRequest - public APIgetVideosPlaysRequest PageSize(int? pageSize) { + /// APIgetMetricsOverTimeRequest + public APIgetMetricsOverTimeRequest PageSize(int? pageSize) { this.pageSize = pageSize; return this; } @@ -595,12 +898,12 @@ public APIgetVideosPlaysRequest PageSize(int? pageSize) { /// - /// Execute getVideosPlays request + /// Execute getMetricsOverTime request /// - /// AnalyticsPlaysResponse - public Page execute(){ - ApiResponse localVarResp = this.currentApiInstance.getVideosPlaysWithHttpInfo(from, dimension, to, filter, currentPage, pageSize); - return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { + /// AnalyticsMetricsOverTimeResponse + public Page execute(){ + ApiResponse localVarResp = this.currentApiInstance.getMetricsOverTimeWithHttpInfo(metric, from, to, interval, filterBy, currentPage, pageSize); + return new Page(localVarResp.Data.data, localVarResp.Data.pagination, () => { try { return copy().CurrentPage((currentPage == null ? 1 : currentPage) + 1).execute(); } catch (ApiException e) { @@ -609,10 +912,12 @@ public Page execute(){ }); } - private APIgetVideosPlaysRequest copy() { - APIgetVideosPlaysRequest copy = new APIgetVideosPlaysRequest( this.currentApiInstance, from, dimension); + private APIgetMetricsOverTimeRequest copy() { + APIgetMetricsOverTimeRequest copy = new APIgetMetricsOverTimeRequest( this.currentApiInstance, metric); + copy.From(from); copy.To(to); - copy.Filter(filter); + copy.Interval(interval); + copy.FilterBy(filterBy); copy.CurrentPage(currentPage); copy.PageSize(pageSize); return copy; diff --git a/src/Api/LiveStreamsApi.cs b/src/Api/LiveStreamsApi.cs index b6087de..8f2ae0c 100644 --- a/src/Api/LiveStreamsApi.cs +++ b/src/Api/LiveStreamsApi.cs @@ -1273,6 +1273,144 @@ public ApiResponse deleteThumbnailWithHttpInfo(string liveStreamId) } + /// + /// Complete a live stream Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// The unique ID for the live stream you want to complete. + + /// + public void completeAsync(string liveStreamId, CancellationToken cancellationToken = default) + { + completeWithHttpInfoAsync(liveStreamId, cancellationToken); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The unique ID for the live stream you want to complete. + + /// + public void complete(string liveStreamId) + { + completeWithHttpInfo(liveStreamId); + } + + + /// + /// Complete a live stream Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream. + /// + /// Thrown when fails to make API call + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. (optional) + /// The unique ID for the live stream you want to complete. + + /// ApiResponse of Object(void) + public Task> completeWithHttpInfoAsync(string liveStreamId, CancellationToken cancellationToken = default) + { + + // verify the required parameter 'liveStreamId' is set + if (liveStreamId == null) + throw new ApiException(400, "Missing required parameter 'liveStreamId' when calling LiveStreamsApi->complete"); + + + var localVarPath = "/live-streams/{liveStreamId}/complete"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (liveStreamId != null) localVarPathParams.Add("liveStreamId", this.ApiClient.ParameterToString(liveStreamId)); // path parameter + + + + + // make the HTTP request + Task localVarResponse = (Task) this.ApiClient.CallApiAsync(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType, cancellationToken); + + return localVarResponse.ContinueWith((Task task) => + { + int localVarStatusCode = (int) task.Result.StatusCode; + return new ApiResponse(localVarStatusCode, + task.Result.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + }); + + } + + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The unique ID for the live stream you want to complete. + + /// ApiResponse of Object(void) + public ApiResponse completeWithHttpInfo(string liveStreamId) + { + + // verify the required parameter 'liveStreamId' is set + if (liveStreamId == null) + throw new ApiException(400, "Missing required parameter 'liveStreamId' when calling LiveStreamsApi->complete"); + + + var localVarPath = "/live-streams/{liveStreamId}/complete"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + string[] localVarContentTypes = new string[] { + }; + string localVarContentType = ApiClient.SelectHeaderContentType(localVarContentTypes); + localVarHeaderParams.Add("Content-Type", localVarContentType); + // to determine the Accept header + string[] localVarHttpHeaderAccepts = new string[] { + "application/json" + }; + string localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (liveStreamId != null) localVarPathParams.Add("liveStreamId", this.ApiClient.ParameterToString(liveStreamId)); // path parameter + + + + + // make the HTTP request + RestResponse localVarResponse = (RestResponse) this.ApiClient.CallApi(localVarPath, + Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + + } + + } diff --git a/src/Model/VideoSessionLocation.cs b/src/Model/AnalyticsAggregatedMetricsResponse.cs similarity index 56% rename from src/Model/VideoSessionLocation.cs rename to src/Model/AnalyticsAggregatedMetricsResponse.cs index 2dee530..286a9d9 100644 --- a/src/Model/VideoSessionLocation.cs +++ b/src/Model/AnalyticsAggregatedMetricsResponse.cs @@ -8,24 +8,22 @@ namespace ApiVideo.Model { /// - /// The location of the viewer. + /// /// [DataContract] - public class VideoSessionLocation { + public class AnalyticsAggregatedMetricsResponse { /// - /// The country of the viewer. + /// Gets or Sets Context /// - /// The country of the viewer. - [DataMember(Name="country", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "country")] - public string country { get; set; } + [DataMember(Name="context", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "context")] + public AnalyticsAggregatedMetricsResponseContext context { get; set; } /// - /// The city of the viewer. + /// Gets or Sets Data /// - /// The city of the viewer. - [DataMember(Name="city", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "city")] - public string city { get; set; } + [DataMember(Name="data", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "data")] + public float data { get; set; } /// @@ -34,9 +32,9 @@ public class VideoSessionLocation { /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); - sb.Append("class VideoSessionLocation {\n"); - sb.Append(" Country: ").Append(country).Append("\n"); - sb.Append(" City: ").Append(city).Append("\n"); + sb.Append("class AnalyticsAggregatedMetricsResponse {\n"); + sb.Append(" Context: ").Append(context).Append("\n"); + sb.Append(" Data: ").Append(data).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Model/AnalyticsAggregatedMetricsResponseContext.cs b/src/Model/AnalyticsAggregatedMetricsResponseContext.cs new file mode 100644 index 0000000..1247cbe --- /dev/null +++ b/src/Model/AnalyticsAggregatedMetricsResponseContext.cs @@ -0,0 +1,60 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class AnalyticsAggregatedMetricsResponseContext { + /// + /// Returns the metric you selected. + /// + /// Returns the metric you selected. + [DataMember(Name="metric", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "metric")] + public string metric { get; set; } + /// + /// Returns the aggregation you selected. + /// + /// Returns the aggregation you selected. + [DataMember(Name="aggregation", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "aggregation")] + public string aggregation { get; set; } + /// + /// Gets or Sets Timeframe + /// + [DataMember(Name="timeframe", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "timeframe")] + public AnalyticsAggregatedMetricsResponseContextTimeframe timeframe { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsAggregatedMetricsResponseContext {\n"); + sb.Append(" Metric: ").Append(metric).Append("\n"); + sb.Append(" Aggregation: ").Append(aggregation).Append("\n"); + sb.Append(" Timeframe: ").Append(timeframe).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.cs b/src/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.cs new file mode 100644 index 0000000..0ee73e0 --- /dev/null +++ b/src/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.cs @@ -0,0 +1,53 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// Returns the starting and ending date-times of the period you want analytics for. + /// + [DataContract] + public class AnalyticsAggregatedMetricsResponseContextTimeframe { + /// + /// Returns the starting date-time of the period you want analytics for in ATOM date-time format. + /// + /// Returns the starting date-time of the period you want analytics for in ATOM date-time format. + [DataMember(Name="from", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "from")] + public DateTime? from { get; set; } + /// + /// Returns the starting date-time of the period you want analytics for in ATOM date-time format. + /// + /// Returns the starting date-time of the period you want analytics for in ATOM date-time format. + [DataMember(Name="to", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "to")] + public DateTime? to { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsAggregatedMetricsResponseContextTimeframe {\n"); + sb.Append(" From: ").Append(from).Append("\n"); + sb.Append(" To: ").Append(to).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/AnalyticsMetricsBreakdownResponse.cs b/src/Model/AnalyticsMetricsBreakdownResponse.cs new file mode 100644 index 0000000..2a10682 --- /dev/null +++ b/src/Model/AnalyticsMetricsBreakdownResponse.cs @@ -0,0 +1,59 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class AnalyticsMetricsBreakdownResponse { + /// + /// Gets or Sets Context + /// + [DataMember(Name="context", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "context")] + public AnalyticsMetricsBreakdownResponseContext context { get; set; } + /// + /// Returns an array of dimensions and their respective metrics. + /// + /// Returns an array of dimensions and their respective metrics. + [DataMember(Name="data", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "data")] + public List data { get; set; } + /// + /// Gets or Sets Pagination + /// + [DataMember(Name="pagination", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "pagination")] + public Pagination pagination { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsMetricsBreakdownResponse {\n"); + sb.Append(" Context: ").Append(context).Append("\n"); + sb.Append(" Data: ").Append(data).Append("\n"); + sb.Append(" Pagination: ").Append(pagination).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/AnalyticsMetricsBreakdownResponseContext.cs b/src/Model/AnalyticsMetricsBreakdownResponseContext.cs new file mode 100644 index 0000000..94d210d --- /dev/null +++ b/src/Model/AnalyticsMetricsBreakdownResponseContext.cs @@ -0,0 +1,60 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class AnalyticsMetricsBreakdownResponseContext { + /// + /// Returns the metric you selected. + /// + /// Returns the metric you selected. + [DataMember(Name="metric", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "metric")] + public string metric { get; set; } + /// + /// Returns the dimension you selected. + /// + /// Returns the dimension you selected. + [DataMember(Name="breakdown", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "breakdown")] + public string breakdown { get; set; } + /// + /// Gets or Sets Timeframe + /// + [DataMember(Name="timeframe", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "timeframe")] + public AnalyticsAggregatedMetricsResponseContextTimeframe timeframe { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsMetricsBreakdownResponseContext {\n"); + sb.Append(" Metric: ").Append(metric).Append("\n"); + sb.Append(" Breakdown: ").Append(breakdown).Append("\n"); + sb.Append(" Timeframe: ").Append(timeframe).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/AnalyticsMetricsBreakdownResponseData.cs b/src/Model/AnalyticsMetricsBreakdownResponseData.cs new file mode 100644 index 0000000..678cb11 --- /dev/null +++ b/src/Model/AnalyticsMetricsBreakdownResponseData.cs @@ -0,0 +1,53 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class AnalyticsMetricsBreakdownResponseData { + /// + /// 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\". + /// + /// 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\". + [DataMember(Name="dimensionValue", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "dimensionValue")] + public string dimensionvalue { get; set; } + /// + /// Returns the data for a specific dimension value. + /// + /// Returns the data for a specific dimension value. + [DataMember(Name="metricValue", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "metricValue")] + public float metricvalue { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsMetricsBreakdownResponseData {\n"); + sb.Append(" DimensionValue: ").Append(dimensionvalue).Append("\n"); + sb.Append(" MetricValue: ").Append(metricvalue).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/AnalyticsMetricsOverTimeResponse.cs b/src/Model/AnalyticsMetricsOverTimeResponse.cs new file mode 100644 index 0000000..46f9849 --- /dev/null +++ b/src/Model/AnalyticsMetricsOverTimeResponse.cs @@ -0,0 +1,59 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class AnalyticsMetricsOverTimeResponse { + /// + /// Gets or Sets Context + /// + [DataMember(Name="context", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "context")] + public AnalyticsMetricsOverTimeResponseContext context { get; set; } + /// + /// Returns an array of metrics and the timestamps . + /// + /// Returns an array of metrics and the timestamps . + [DataMember(Name="data", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "data")] + public List data { get; set; } + /// + /// Gets or Sets Pagination + /// + [DataMember(Name="pagination", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "pagination")] + public Pagination pagination { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsMetricsOverTimeResponse {\n"); + sb.Append(" Context: ").Append(context).Append("\n"); + sb.Append(" Data: ").Append(data).Append("\n"); + sb.Append(" Pagination: ").Append(pagination).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/AnalyticsMetricsOverTimeResponseContext.cs b/src/Model/AnalyticsMetricsOverTimeResponseContext.cs new file mode 100644 index 0000000..b7a4a1b --- /dev/null +++ b/src/Model/AnalyticsMetricsOverTimeResponseContext.cs @@ -0,0 +1,60 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class AnalyticsMetricsOverTimeResponseContext { + /// + /// Returns the metric you selected. + /// + /// Returns the metric you selected. + [DataMember(Name="metric", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "metric")] + public string metric { get; set; } + /// + /// Returns the interval you selected. + /// + /// Returns the interval you selected. + [DataMember(Name="interval", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "interval")] + public string interval { get; set; } + /// + /// Gets or Sets Timeframe + /// + [DataMember(Name="timeframe", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "timeframe")] + public AnalyticsAggregatedMetricsResponseContextTimeframe timeframe { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsMetricsOverTimeResponseContext {\n"); + sb.Append(" Metric: ").Append(metric).Append("\n"); + sb.Append(" Interval: ").Append(interval).Append("\n"); + sb.Append(" Timeframe: ").Append(timeframe).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/AnalyticsMetricsOverTimeResponseData.cs b/src/Model/AnalyticsMetricsOverTimeResponseData.cs new file mode 100644 index 0000000..eb05c44 --- /dev/null +++ b/src/Model/AnalyticsMetricsOverTimeResponseData.cs @@ -0,0 +1,53 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace ApiVideo.Model { + + /// + /// + /// + [DataContract] + public class AnalyticsMetricsOverTimeResponseData { + /// + /// 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. + /// + /// 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. + [DataMember(Name="emittedAt", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "emittedAt")] + public string emittedat { get; set; } + /// + /// Returns the data for a specific metric value. + /// + /// Returns the data for a specific metric value. + [DataMember(Name="metricValue", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "metricValue")] + public float metricvalue { get; set; } + + + /// + /// Get the string presentation of the object + /// + /// String presentation of the object + public override string ToString() { + var sb = new StringBuilder(); + sb.Append("class AnalyticsMetricsOverTimeResponseData {\n"); + sb.Append(" EmittedAt: ").Append(emittedat).Append("\n"); + sb.Append(" MetricValue: ").Append(metricvalue).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Get the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + +} +} diff --git a/src/Model/LiveStream.cs b/src/Model/LiveStream.cs index 7ca50d4..f5f8d38 100644 --- a/src/Model/LiveStream.cs +++ b/src/Model/LiveStream.cs @@ -34,9 +34,9 @@ public class LiveStream { [JsonProperty(PropertyName = "streamKey")] public string streamkey { get; set; } /// - /// 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). /// - /// 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). [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } @@ -61,9 +61,9 @@ public class LiveStream { [JsonProperty(PropertyName = "broadcasting")] public Nullable broadcasting { get; set; } /// - /// Returns the list of RTMP restream destinations. + /// Returns the list of restream destinations. /// - /// Returns the list of RTMP restream destinations. + /// Returns the list of restream destinations. [DataMember(Name="restreams", EmitDefaultValue=false)] [JsonProperty(PropertyName = "restreams")] public List restreams { get; set; } diff --git a/src/Model/LiveStreamCreationPayload.cs b/src/Model/LiveStreamCreationPayload.cs index 8b4065f..3a768af 100644 --- a/src/Model/LiveStreamCreationPayload.cs +++ b/src/Model/LiveStreamCreationPayload.cs @@ -20,9 +20,9 @@ public class LiveStreamCreationPayload { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// 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). /// - /// 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). [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } @@ -34,9 +34,9 @@ public class LiveStreamCreationPayload { [JsonProperty(PropertyName = "playerId")] public string playerid { get; set; } /// - /// 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. /// - /// 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. [DataMember(Name="restreams", EmitDefaultValue=false)] [JsonProperty(PropertyName = "restreams")] public List restreams { get; set; } diff --git a/src/Model/LiveStreamSession.cs b/src/Model/LiveStreamSession.cs deleted file mode 100644 index e032b08..0000000 --- a/src/Model/LiveStreamSession.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class LiveStreamSession { - /// - /// Gets or Sets Session - /// - [DataMember(Name="session", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "session")] - public LiveStreamSessionSession session { get; set; } - /// - /// Gets or Sets Location - /// - [DataMember(Name="location", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "location")] - public LiveStreamSessionLocation location { get; set; } - /// - /// Gets or Sets Referrer - /// - [DataMember(Name="referrer", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "referrer")] - public LiveStreamSessionReferrer referrer { get; set; } - /// - /// Gets or Sets Device - /// - [DataMember(Name="device", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "device")] - public LiveStreamSessionDevice device { get; set; } - /// - /// Gets or Sets Os - /// - [DataMember(Name="os", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "os")] - public VideoSessionOs os { get; set; } - /// - /// Gets or Sets _Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "client")] - public LiveStreamSessionClient _client { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSession {\n"); - sb.Append(" Session: ").Append(session).Append("\n"); - sb.Append(" Location: ").Append(location).Append("\n"); - sb.Append(" Referrer: ").Append(referrer).Append("\n"); - sb.Append(" Device: ").Append(device).Append("\n"); - sb.Append(" Os: ").Append(os).Append("\n"); - sb.Append(" _Client: ").Append(_client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionClient.cs b/src/Model/LiveStreamSessionClient.cs deleted file mode 100644 index 5a4c63f..0000000 --- a/src/Model/LiveStreamSessionClient.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// What kind of browser the viewer is using for the live stream session. - /// - [DataContract] - public class LiveStreamSessionClient { - /// - /// The name of the browser used to view the live stream session. - /// - /// The name of the browser used to view the live stream session. - [DataMember(Name="name", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "name")] - public string name { get; set; } - /// - /// The version of the browser used to view the live stream session. - /// - /// The version of the browser used to view the live stream session. - [DataMember(Name="version", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "version")] - public string version { get; set; } - /// - /// The type of client used to view the live stream session. - /// - /// The type of client used to view the live stream session. - [DataMember(Name="type", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "type")] - public string type { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionClient {\n"); - sb.Append(" Name: ").Append(name).Append("\n"); - sb.Append(" Version: ").Append(version).Append("\n"); - sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionDevice.cs b/src/Model/LiveStreamSessionDevice.cs deleted file mode 100644 index 4ba87f4..0000000 --- a/src/Model/LiveStreamSessionDevice.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// What type of device the user is on when in the live stream session. - /// - [DataContract] - public class LiveStreamSessionDevice { - /// - /// What the type is like desktop, laptop, mobile. - /// - /// What the type is like desktop, laptop, mobile. - [DataMember(Name="type", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "type")] - public string type { get; set; } - /// - /// If known, what the brand of the device is, like Apple, Dell, etc. - /// - /// If known, what the brand of the device is, like Apple, Dell, etc. - [DataMember(Name="vendor", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "vendor")] - public string vendor { get; set; } - /// - /// The specific model of the device, if known. - /// - /// The specific model of the device, if known. - [DataMember(Name="model", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "model")] - public string model { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionDevice {\n"); - sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append(" Vendor: ").Append(vendor).Append("\n"); - sb.Append(" Model: ").Append(model).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionLocation.cs b/src/Model/LiveStreamSessionLocation.cs deleted file mode 100644 index 33e5c70..0000000 --- a/src/Model/LiveStreamSessionLocation.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// The location of the viewer of the live stream. - /// - [DataContract] - public class LiveStreamSessionLocation { - /// - /// The country of the viewer of the live stream. - /// - /// The country of the viewer of the live stream. - [DataMember(Name="country", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "country")] - public string country { get; set; } - /// - /// The city of the viewer of the live stream. - /// - /// The city of the viewer of the live stream. - [DataMember(Name="city", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "city")] - public string city { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionLocation {\n"); - sb.Append(" Country: ").Append(country).Append("\n"); - sb.Append(" City: ").Append(city).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionReferrer.cs b/src/Model/LiveStreamSessionReferrer.cs deleted file mode 100644 index 7e500d3..0000000 --- a/src/Model/LiveStreamSessionReferrer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class LiveStreamSessionReferrer { - /// - /// The website the viewer of the live stream was referred to in order to view the live stream. - /// - /// The website the viewer of the live stream was referred to in order to view the live stream. - [DataMember(Name="url", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "url")] - public string url { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name="medium", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "medium")] - public string medium { get; set; } - /// - /// Where the viewer came from to see the live stream (usually where they searched from). - /// - /// Where the viewer came from to see the live stream (usually where they searched from). - [DataMember(Name="source", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "source")] - public string source { get; set; } - /// - /// What term they searched for that led them to the live stream. - /// - /// What term they searched for that led them to the live stream. - [DataMember(Name="searchTerm", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "searchTerm")] - public string searchterm { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionReferrer {\n"); - sb.Append(" Url: ").Append(url).Append("\n"); - sb.Append(" Medium: ").Append(medium).Append("\n"); - sb.Append(" Source: ").Append(source).Append("\n"); - sb.Append(" SearchTerm: ").Append(searchterm).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamSessionSession.cs b/src/Model/LiveStreamSessionSession.cs deleted file mode 100644 index ec6cda3..0000000 --- a/src/Model/LiveStreamSessionSession.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class LiveStreamSessionSession { - /// - /// A unique identifier for your session. You can use this to track what happens during a specific session. - /// - /// A unique identifier for your session. You can use this to track what happens during a specific session. - [DataMember(Name="sessionId", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "sessionId")] - public string sessionid { get; set; } - /// - /// When the session started, with the date and time presented in ISO-8601 format. - /// - /// When the session started, with the date and time presented in ISO-8601 format. - [DataMember(Name="loadedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "loadedAt")] - public DateTime? loadedat { get; set; } - /// - /// When the session ended, with the date and time presented in ISO-8601 format. - /// - /// When the session ended, with the date and time presented in ISO-8601 format. - [DataMember(Name="endedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "endedAt")] - public DateTime? endedat { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class LiveStreamSessionSession {\n"); - sb.Append(" SessionId: ").Append(sessionid).Append("\n"); - sb.Append(" LoadedAt: ").Append(loadedat).Append("\n"); - sb.Append(" EndedAt: ").Append(endedat).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/LiveStreamUpdatePayload.cs b/src/Model/LiveStreamUpdatePayload.cs index 628e7e0..6f0d1ac 100644 --- a/src/Model/LiveStreamUpdatePayload.cs +++ b/src/Model/LiveStreamUpdatePayload.cs @@ -20,9 +20,9 @@ public class LiveStreamUpdatePayload { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// 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). /// - /// 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). [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } @@ -34,9 +34,9 @@ public class LiveStreamUpdatePayload { [JsonProperty(PropertyName = "playerId")] public string playerid { get; set; } /// - /// 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. /// - /// 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. [DataMember(Name="restreams", EmitDefaultValue=false)] [JsonProperty(PropertyName = "restreams")] public List restreams { get; set; } diff --git a/src/Model/RestreamsRequestObject.cs b/src/Model/RestreamsRequestObject.cs index 5c641de..d74f7d1 100644 --- a/src/Model/RestreamsRequestObject.cs +++ b/src/Model/RestreamsRequestObject.cs @@ -20,9 +20,9 @@ public class RestreamsRequestObject { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// 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. /// - /// 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. [DataMember(Name="serverUrl", EmitDefaultValue=false)] [JsonProperty(PropertyName = "serverUrl")] public string serverurl { get; set; } diff --git a/src/Model/RestreamsResponseObject.cs b/src/Model/RestreamsResponseObject.cs index 8286253..3e5a490 100644 --- a/src/Model/RestreamsResponseObject.cs +++ b/src/Model/RestreamsResponseObject.cs @@ -20,9 +20,9 @@ public class RestreamsResponseObject { [JsonProperty(PropertyName = "name")] public string name { get; set; } /// - /// Returns the RTMP URL of a restream destination. + /// Returns the server URL of a restream destination. /// - /// Returns the RTMP URL of a restream destination. + /// Returns the server URL of a restream destination. [DataMember(Name="serverUrl", EmitDefaultValue=false)] [JsonProperty(PropertyName = "serverUrl")] public string serverurl { get; set; } diff --git a/src/Model/VideoSessionDevice.cs b/src/Model/UnrecognizedRequestUrl.cs similarity index 53% rename from src/Model/VideoSessionDevice.cs rename to src/Model/UnrecognizedRequestUrl.cs index a36490f..c22eb3f 100644 --- a/src/Model/VideoSessionDevice.cs +++ b/src/Model/UnrecognizedRequestUrl.cs @@ -8,31 +8,31 @@ namespace ApiVideo.Model { /// - /// What type of device the user is on when in the video session. + /// /// [DataContract] - public class VideoSessionDevice { + public class UnrecognizedRequestUrl { /// - /// What the type is like desktop, laptop, mobile. + /// A link to the error documentation. /// - /// What the type is like desktop, laptop, mobile. + /// A link to the error documentation. [DataMember(Name="type", EmitDefaultValue=false)] [JsonProperty(PropertyName = "type")] public string type { get; set; } /// - /// If known, what the brand of the device is, like Apple, Dell, etc. + /// A description of the error that occurred. /// - /// If known, what the brand of the device is, like Apple, Dell, etc. - [DataMember(Name="vendor", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "vendor")] - public string vendor { get; set; } + /// A description of the error that occurred. + [DataMember(Name="title", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "title")] + public string title { get; set; } /// - /// The specific model of the device, if known. + /// The HTTP status code. /// - /// The specific model of the device, if known. - [DataMember(Name="model", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "model")] - public string model { get; set; } + /// The HTTP status code. + [DataMember(Name="status", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "status")] + public int status { get; set; } /// @@ -41,10 +41,10 @@ public class VideoSessionDevice { /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); - sb.Append("class VideoSessionDevice {\n"); + sb.Append("class UnrecognizedRequestUrl {\n"); sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append(" Vendor: ").Append(vendor).Append("\n"); - sb.Append(" Model: ").Append(model).Append("\n"); + sb.Append(" Title: ").Append(title).Append("\n"); + sb.Append(" Status: ").Append(status).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Model/VideoCreationPayload.cs b/src/Model/VideoCreationPayload.cs index 4f3ced0..50d26be 100644 --- a/src/Model/VideoCreationPayload.cs +++ b/src/Model/VideoCreationPayload.cs @@ -34,9 +34,9 @@ public class VideoCreationPayload { [JsonProperty(PropertyName = "source")] public string source { get; set; } /// - /// 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) /// - /// 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) [DataMember(Name="public", EmitDefaultValue=false)] [JsonProperty(PropertyName = "public")] public Nullable _public { get; set; } diff --git a/src/Model/VideoSession.cs b/src/Model/VideoSession.cs deleted file mode 100644 index a1f0baf..0000000 --- a/src/Model/VideoSession.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class VideoSession { - /// - /// Gets or Sets Session - /// - [DataMember(Name="session", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "session")] - public VideoSessionSession session { get; set; } - /// - /// Gets or Sets Location - /// - [DataMember(Name="location", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "location")] - public VideoSessionLocation location { get; set; } - /// - /// Gets or Sets Referrer - /// - [DataMember(Name="referrer", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "referrer")] - public VideoSessionReferrer referrer { get; set; } - /// - /// Gets or Sets Device - /// - [DataMember(Name="device", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "device")] - public VideoSessionDevice device { get; set; } - /// - /// Gets or Sets Os - /// - [DataMember(Name="os", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "os")] - public VideoSessionOs os { get; set; } - /// - /// Gets or Sets _Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "client")] - public VideoSessionClient _client { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSession {\n"); - sb.Append(" Session: ").Append(session).Append("\n"); - sb.Append(" Location: ").Append(location).Append("\n"); - sb.Append(" Referrer: ").Append(referrer).Append("\n"); - sb.Append(" Device: ").Append(device).Append("\n"); - sb.Append(" Os: ").Append(os).Append("\n"); - sb.Append(" _Client: ").Append(_client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionClient.cs b/src/Model/VideoSessionClient.cs deleted file mode 100644 index 5a7412c..0000000 --- a/src/Model/VideoSessionClient.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// What kind of browser the viewer is using for the video session. - /// - [DataContract] - public class VideoSessionClient { - /// - /// The name of the browser used to view the video session. - /// - /// The name of the browser used to view the video session. - [DataMember(Name="name", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "name")] - public string name { get; set; } - /// - /// The version of the browser used to view the video session. - /// - /// The version of the browser used to view the video session. - [DataMember(Name="version", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "version")] - public string version { get; set; } - /// - /// The type of client used to view the video session. - /// - /// The type of client used to view the video session. - [DataMember(Name="type", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "type")] - public string type { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionClient {\n"); - sb.Append(" Name: ").Append(name).Append("\n"); - sb.Append(" Version: ").Append(version).Append("\n"); - sb.Append(" Type: ").Append(type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionOs.cs b/src/Model/VideoSessionOs.cs deleted file mode 100644 index 8f09ee6..0000000 --- a/src/Model/VideoSessionOs.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// The operating system the viewer is on. - /// - [DataContract] - public class VideoSessionOs { - /// - /// The name of the operating system. - /// - /// The name of the operating system. - [DataMember(Name="name", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "name")] - public string name { get; set; } - /// - /// The nickname for the operating system, often representing the version. - /// - /// The nickname for the operating system, often representing the version. - [DataMember(Name="shortname", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "shortname")] - public string shortname { get; set; } - /// - /// The version of the operating system. - /// - /// The version of the operating system. - [DataMember(Name="version", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "version")] - public string version { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionOs {\n"); - sb.Append(" Name: ").Append(name).Append("\n"); - sb.Append(" Shortname: ").Append(shortname).Append("\n"); - sb.Append(" Version: ").Append(version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionReferrer.cs b/src/Model/VideoSessionReferrer.cs deleted file mode 100644 index 3bb410a..0000000 --- a/src/Model/VideoSessionReferrer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class VideoSessionReferrer { - /// - /// The link the viewer used to reach the video session. - /// - /// The link the viewer used to reach the video session. - [DataMember(Name="url", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "url")] - public string url { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name="medium", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "medium")] - public string medium { get; set; } - /// - /// The source the referrer came from to the video session. For example if they searched through google to find the stream. - /// - /// The source the referrer came from to the video session. For example if they searched through google to find the stream. - [DataMember(Name="source", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "source")] - public string source { get; set; } - /// - /// The search term they typed to arrive at the video session. - /// - /// The search term they typed to arrive at the video session. - [DataMember(Name="searchTerm", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "searchTerm")] - public string searchterm { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionReferrer {\n"); - sb.Append(" Url: ").Append(url).Append("\n"); - sb.Append(" Medium: ").Append(medium).Append("\n"); - sb.Append(" Source: ").Append(source).Append("\n"); - sb.Append(" SearchTerm: ").Append(searchterm).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/src/Model/VideoSessionSession.cs b/src/Model/VideoSessionSession.cs deleted file mode 100644 index 63208b3..0000000 --- a/src/Model/VideoSessionSession.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -namespace ApiVideo.Model { - - /// - /// - /// - [DataContract] - public class VideoSessionSession { - /// - /// The unique identifier for the session that you can use to track what happens during it. - /// - /// The unique identifier for the session that you can use to track what happens during it. - [DataMember(Name="sessionId", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "sessionId")] - public string sessionid { get; set; } - /// - /// When the video session started, presented in ISO-8601 format. - /// - /// When the video session started, presented in ISO-8601 format. - [DataMember(Name="loadedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "loadedAt")] - public DateTime? loadedat { get; set; } - /// - /// When the video session ended, presented in ISO-8601 format. - /// - /// When the video session ended, presented in ISO-8601 format. - [DataMember(Name="endedAt", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "endedAt")] - public DateTime? endedat { get; set; } - /// - /// 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. - /// - /// 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. - [DataMember(Name="metadata", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "metadata")] - public List metadata { get; set; } - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VideoSessionSession {\n"); - sb.Append(" SessionId: ").Append(sessionid).Append("\n"); - sb.Append(" LoadedAt: ").Append(loadedat).Append("\n"); - sb.Append(" EndedAt: ").Append(endedat).Append("\n"); - sb.Append(" Metadata: ").Append(metadata).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -} diff --git a/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json b/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json index 84cacbd..8d37eec 100644 --- a/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json +++ b/tests/resources/payloads/advancedauthentication/authenticate/responses/400.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/authenticationinvalid_credentials", + "type" : "https://docs.api.video/reference/authentication-invalid-user-credentials", "title" : "The user credentials were incorrect.", "name" : "", "status" : 400 diff --git a/tests/resources/payloads/advancedauthentication/refresh/responses/400.json b/tests/resources/payloads/advancedauthentication/refresh/responses/400.json index 0c86651..b7e947e 100644 --- a/tests/resources/payloads/advancedauthentication/refresh/responses/400.json +++ b/tests/resources/payloads/advancedauthentication/refresh/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/authenticationinvalid_credentials", + "type" : "https://docs.api.video/reference/authentication-invalid-user-credentials", "title" : "The user credentials were incorrect.", "name" : "" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getAggregatedMetrics/responses/200.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/200.json new file mode 100644 index 0000000..aad4f98 --- /dev/null +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/200.json @@ -0,0 +1,11 @@ +{ + "context" : { + "metric" : "impression", + "aggregation" : "count", + "timeframe" : { + "from" : "2024-05-28T11:15:07+00:00", + "to" : "2024-05-29T11:15:07+00:00" + } + }, + "data" : 346.5 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json similarity index 88% rename from tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json rename to tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json index 84db8c3..4cbfb11 100644 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-0.json +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-0.json @@ -3,5 +3,5 @@ "title" : "An attribute is invalid.", "status" : 400, "detail" : "This value must be of type string.", - "name" : "dimension" + "name" : "metric" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-5.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json similarity index 61% rename from tests/resources/payloads/analytics/getVideosPlays/responses/400-5.json rename to tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json index 080db28..061e505 100644 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-5.json +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must refer to an existing video", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getAggregatedMetrics/responses/404.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/429.json b/tests/resources/payloads/analytics/getAggregatedMetrics/responses/429.json similarity index 100% rename from tests/resources/payloads/analytics/getLiveStreamsPlays/responses/429.json rename to tests/resources/payloads/analytics/getAggregatedMetrics/responses/429.json diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json deleted file mode 100644 index 833d2ff..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "li3q7HxhApxRF1c8F8r6VeaI", - "plays" : 100 - }, { - "value" : "li3q7HxhApxRF1c8F8r6VeaB", - "plays" : 10 - }, { - "value" : "li3q7HxhApxRF1c8F8r6VeaD", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=liveStreamId¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json deleted file mode 100644 index cf2e9e5..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "france", - "plays" : 100 - }, { - "value" : "united states", - "plays" : 10 - }, { - "value" : "spain", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=country¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json deleted file mode 100644 index 4e08c61..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/200-2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "2023-06-10T10:00:00.000Z", - "plays" : 100 - }, { - "value" : "2023-06-10T11:00:00.000Z", - "plays" : 10 - }, { - "value" : "2023-06-10T12:00:00.000Z", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/live-streams/plays?dimension=videoId&filter=liveStreamId:li3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json deleted file mode 100644 index eaf7c78..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}", - "name" : "filter" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json deleted file mode 100644 index 282264f..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json deleted file mode 100644 index 282264f..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,liveStreamId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json deleted file mode 100644 index eaf7c78..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): liveStreamId:{liveStreamId}", - "name" : "filter" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json deleted file mode 100644 index cdd0425..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/403.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/authorization-disabled-analytics", - "title" : "You cannot get analytics from this project.", - "status" : 403 -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json b/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json deleted file mode 100644 index f366b6f..0000000 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsBreakdown/responses/200.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/200.json new file mode 100644 index 0000000..f5cdba3 --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/200.json @@ -0,0 +1,31 @@ +{ + "context" : { + "metric" : "play", + "breakdown" : "country", + "timeframe" : { + "from" : "2024-04-28T07:15:05+00:00", + "to" : "2024-05-29T11:25:37+00:00" + } + }, + "data" : [ { + "metricValue" : 7, + "dimensionValue" : "FR" + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 1, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 1, + "links" : [ { + "rel" : "self", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-0.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json similarity index 88% rename from tests/resources/payloads/analytics/getVideosPlays/responses/400-0.json rename to tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json index 84db8c3..4cbfb11 100644 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-0.json +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-0.json @@ -3,5 +3,5 @@ "title" : "An attribute is invalid.", "status" : 400, "detail" : "This value must be of type string.", - "name" : "dimension" + "name" : "metric" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json similarity index 61% rename from tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json rename to tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json index 95b2f61..061e505 100644 --- a/tests/resources/payloads/analytics/getLiveStreamsPlays/responses/400-5.json +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must refer to an existing live stream", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsBreakdown/responses/404.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/429.json b/tests/resources/payloads/analytics/getMetricsBreakdown/responses/429.json similarity index 100% rename from tests/resources/payloads/analytics/getVideosPlays/responses/429.json rename to tests/resources/payloads/analytics/getMetricsBreakdown/responses/429.json diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/200.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/200.json new file mode 100644 index 0000000..b5a6342 --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/200.json @@ -0,0 +1,37 @@ +{ + "context" : { + "metric" : "play", + "interval" : "hour", + "timeframe" : { + "from" : "2024-05-28T11:08:39+00:00", + "to" : "2024-05-29T11:08:39+00:00" + } + }, + "data" : [ { + "emittedAt" : "2024-05-29T07:00:00+00:00", + "metricValue" : 2 + }, { + "emittedAt" : "2024-05-29T08:00:00+00:00", + "metricValue" : 1 + }, { + "emittedAt" : "2024-05-29T09:00:00+00:00", + "metricValue" : 1 + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 3, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 3, + "links" : [ { + "rel" : "self", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json new file mode 100644 index 0000000..4cbfb11 --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "This value must be of type string.", + "name" : "metric" +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-1.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json similarity index 58% rename from tests/resources/payloads/analytics/getVideosPlays/responses/400-1.json rename to tests/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json index b1044e2..061e505 100644 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-1.json +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/request-invalid-query-parameter", "title" : "A query parameter is invalid.", "status" : 400, - "detail" : "This value must be of the following structure(s): videoId:{videoId}", - "name" : "filter" + "detail" : "This field was not expected.", + "name" : "from:2024-05-20T09:15:05+02:00" } \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/404.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getMetricsOverTime/responses/429.json b/tests/resources/payloads/analytics/getMetricsOverTime/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/tests/resources/payloads/analytics/getMetricsOverTime/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/200-0.json b/tests/resources/payloads/analytics/getVideosPlays/responses/200-0.json deleted file mode 100644 index f0d1e9a..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/200-0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "vi3q7HxhApxRF1c8F8r6VeaI", - "plays" : 100 - }, { - "value" : "vi3q7HxhApxRF1c8F8r6VeaF", - "plays" : 10 - }, { - "value" : "vi3q7HxhApxRF1c8F8r6VeaH", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/200-1.json b/tests/resources/payloads/analytics/getVideosPlays/responses/200-1.json deleted file mode 100644 index 7348fe2..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/200-1.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "data" : [ { - "value" : "france", - "plays" : 100 - }, { - "value" : "united states", - "plays" : 10 - }, { - "value" : "spain", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 2, - "pageSize" : 2, - "pagesTotal" : 2, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - }, { - "rel" : "next", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/200-2.json b/tests/resources/payloads/analytics/getVideosPlays/responses/200-2.json deleted file mode 100644 index ae770da..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/200-2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data" : [ { - "value" : "2023-06-10T10:00:00.000Z", - "plays" : 100 - }, { - "value" : "2023-06-10T11:00:00.000Z", - "plays" : 10 - }, { - "value" : "2023-06-10T12:00:00.000Z", - "plays" : 1 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 3, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 3, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-2.json b/tests/resources/payloads/analytics/getVideosPlays/responses/400-2.json deleted file mode 100644 index 3f739e6..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-3.json b/tests/resources/payloads/analytics/getVideosPlays/responses/400-3.json deleted file mode 100644 index 3f739e6..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser", - "name" : "dimension" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/400-4.json b/tests/resources/payloads/analytics/getVideosPlays/responses/400-4.json deleted file mode 100644 index b1044e2..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/400-4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/request-invalid-query-parameter", - "title" : "A query parameter is invalid.", - "status" : 400, - "detail" : "This value must be of the following structure(s): videoId:{videoId}", - "name" : "filter" -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/403.json b/tests/resources/payloads/analytics/getVideosPlays/responses/403.json deleted file mode 100644 index cdd0425..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/403.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type" : "https://docs.api.video/reference/authorization-disabled-analytics", - "title" : "You cannot get analytics from this project.", - "status" : 403 -} \ No newline at end of file diff --git a/tests/resources/payloads/analytics/getVideosPlays/responses/404.json b/tests/resources/payloads/analytics/getVideosPlays/responses/404.json deleted file mode 100644 index f366b6f..0000000 --- a/tests/resources/payloads/analytics/getVideosPlays/responses/404.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status" : 404 -} \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/complete/responses/404.json b/tests/resources/payloads/livestreams/complete/responses/404.json new file mode 100644 index 0000000..87595d9 --- /dev/null +++ b/tests/resources/payloads/livestreams/complete/responses/404.json @@ -0,0 +1,6 @@ +{ + "type" : "https://docs.api.video/reference/resource-not-found", + "title" : "The requested resource was not found.", + "name" : "liveStreamId", + "status" : 404 +} \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/complete/responses/429.json b/tests/resources/payloads/livestreams/complete/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/tests/resources/payloads/livestreams/complete/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/create/responses/400-1.json b/tests/resources/payloads/livestreams/create/responses/400-1.json index 1350192..c3d6d42 100644 --- a/tests/resources/payloads/livestreams/create/responses/400-1.json +++ b/tests/resources/payloads/livestreams/create/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "Missing app name: rtmp://[host]/[app name].", + "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/create/responses/400-2.json b/tests/resources/payloads/livestreams/create/responses/400-2.json index b05a8e3..ea329ab 100644 --- a/tests/resources/payloads/livestreams/create/responses/400-2.json +++ b/tests/resources/payloads/livestreams/create/responses/400-2.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].", + "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json b/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json index 9efa63b..87595d9 100644 --- a/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json +++ b/tests/resources/payloads/livestreams/deleteThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "liveStreamId", "status" : 404 diff --git a/tests/resources/payloads/livestreams/update/responses/400-1.json b/tests/resources/payloads/livestreams/update/responses/400-1.json index 1350192..c3d6d42 100644 --- a/tests/resources/payloads/livestreams/update/responses/400-1.json +++ b/tests/resources/payloads/livestreams/update/responses/400-1.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "Missing app name: rtmp://[host]/[app name].", + "detail" : "Missing app name: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/update/responses/400-2.json b/tests/resources/payloads/livestreams/update/responses/400-2.json index b05a8e3..ea329ab 100644 --- a/tests/resources/payloads/livestreams/update/responses/400-2.json +++ b/tests/resources/payloads/livestreams/update/responses/400-2.json @@ -2,6 +2,6 @@ "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "An attribute is invalid.", "status" : 400, - "detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].", + "detail" : "RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].", "name" : "restreams[0][serverUrl]" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json b/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json index 631e001..b581e38 100644 --- a/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json +++ b/tests/resources/payloads/livestreams/uploadThumbnail/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json b/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json index 9efa63b..87595d9 100644 --- a/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json +++ b/tests/resources/payloads/livestreams/uploadThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "liveStreamId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/delete/responses/404.json b/tests/resources/payloads/playerthemes/delete/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/delete/responses/404.json +++ b/tests/resources/payloads/playerthemes/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json b/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json +++ b/tests/resources/payloads/playerthemes/deleteLogo/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/get/responses/404.json b/tests/resources/payloads/playerthemes/get/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/get/responses/404.json +++ b/tests/resources/payloads/playerthemes/get/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/update/responses/404.json b/tests/resources/payloads/playerthemes/update/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/update/responses/404.json +++ b/tests/resources/payloads/playerthemes/update/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json b/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json index a96e225..6ef950a 100644 --- a/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json +++ b/tests/resources/payloads/playerthemes/uploadLogo/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json b/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json index 719c18c..30decf6 100644 --- a/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json +++ b/tests/resources/payloads/playerthemes/uploadLogo/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "playerId", "status" : 404 diff --git a/tests/resources/payloads/videos/create/responses/400.json b/tests/resources/payloads/videos/create/responses/400.json index fc789fc..c6358bf 100644 --- a/tests/resources/payloads/videos/create/responses/400.json +++ b/tests/resources/payloads/videos/create/responses/400.json @@ -1,22 +1,22 @@ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "title", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "title" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO8601 date.", "name" : "scheduledAt" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "tags" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "metadata" } ] diff --git a/tests/resources/payloads/videos/delete/responses/404.json b/tests/resources/payloads/videos/delete/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/delete/responses/404.json +++ b/tests/resources/payloads/videos/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/get/responses/404.json b/tests/resources/payloads/videos/get/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/get/responses/404.json +++ b/tests/resources/payloads/videos/get/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/getStatus/responses/404.json b/tests/resources/payloads/videos/getStatus/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/getStatus/responses/404.json +++ b/tests/resources/payloads/videos/getStatus/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/pickThumbnail/responses/404.json b/tests/resources/payloads/videos/pickThumbnail/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/pickThumbnail/responses/404.json +++ b/tests/resources/payloads/videos/pickThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/update/responses/400.json b/tests/resources/payloads/videos/update/responses/400.json index 65910b5..9115c98 100644 --- a/tests/resources/payloads/videos/update/responses/400.json +++ b/tests/resources/payloads/videos/update/responses/400.json @@ -1,18 +1,18 @@ { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO-8601 date.", "name" : "scheduledAt", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be a ISO-8601 date.", "name" : "scheduledAt" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "tags" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "metadata" } ] diff --git a/tests/resources/payloads/videos/update/responses/404.json b/tests/resources/payloads/videos/update/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/update/responses/404.json +++ b/tests/resources/payloads/videos/update/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/upload/responses/400.json b/tests/resources/payloads/videos/upload/responses/400.json index b90e95e..09d2579 100644 --- a/tests/resources/payloads/videos/upload/responses/400.json +++ b/tests/resources/payloads/videos/upload/responses/400.json @@ -1,22 +1,22 @@ { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The source of the video is already uploaded.", "name" : "file", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The source of the video is already uploaded.", "name" : "file" }, { - "type" : "https://docs.api.video/docs/filealreadyuploaded", + "type" : "https://docs.api.video/reference/video-source-already-uploaded", "title" : "The video xxxx has already been uploaded.", "name" : "video" }, { - "type" : "https://docs.api.video/docs/filemissing", + "type" : "https://docs.api.video/reference/uploaded-file-no-file", "title" : "There is no uploaded file in the request.", "name" : "file" }, { - "type" : "https://docs.api.video/docs/multiplefilesuploaded", + "type" : "https://docs.api.video/reference/uploaded-file-multiple-files", "title" : "There is more than one uploaded file in the request.", "name" : "file" } ] diff --git a/tests/resources/payloads/videos/upload/responses/404.json b/tests/resources/payloads/videos/upload/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/upload/responses/404.json +++ b/tests/resources/payloads/videos/upload/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/videos/uploadThumbnail/responses/400.json b/tests/resources/payloads/videos/uploadThumbnail/responses/400.json index 631e001..b581e38 100644 --- a/tests/resources/payloads/videos/uploadThumbnail/responses/400.json +++ b/tests/resources/payloads/videos/uploadThumbnail/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/videos/uploadThumbnail/responses/404.json b/tests/resources/payloads/videos/uploadThumbnail/responses/404.json index 69b4332..27275e1 100644 --- a/tests/resources/payloads/videos/uploadThumbnail/responses/404.json +++ b/tests/resources/payloads/videos/uploadThumbnail/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "videoId", "status" : 404 diff --git a/tests/resources/payloads/watermarks/delete/responses/404.json b/tests/resources/payloads/watermarks/delete/responses/404.json index 4ca04c5..c31a9d8 100644 --- a/tests/resources/payloads/watermarks/delete/responses/404.json +++ b/tests/resources/payloads/watermarks/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "watermarkId", "status" : 404 diff --git a/tests/resources/payloads/watermarks/upload/responses/400.json b/tests/resources/payloads/watermarks/upload/responses/400.json index 7d5c846..3b406ad 100644 --- a/tests/resources/payloads/watermarks/upload/responses/400.json +++ b/tests/resources/payloads/watermarks/upload/responses/400.json @@ -1,6 +1,6 @@ { "status" : 400, - "type" : "https://docs.api.video/docs/fileextension", + "type" : "https://docs.api.video/reference/uploaded-file-extension-invalid", "title" : "Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported.", "name" : "file" } \ No newline at end of file diff --git a/tests/resources/payloads/webhooks/create/responses/400.json b/tests/resources/payloads/webhooks/create/responses/400.json index 1878cc2..e7c9e89 100644 --- a/tests/resources/payloads/webhooks/create/responses/400.json +++ b/tests/resources/payloads/webhooks/create/responses/400.json @@ -1,18 +1,18 @@ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "events" : "This attribute is required.", "name" : "events", "status" : 400, "problems" : [ { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "events" }, { - "type" : "https://docs.api.video/docs/attributerequired", + "type" : "https://docs.api.video/reference/attribute-required", "title" : "This attribute is required.", "name" : "url" }, { - "type" : "https://docs.api.video/docs/attributeinvalid", + "type" : "https://docs.api.video/reference/invalid-attribute", "title" : "This attribute must be an array.", "name" : "events" } ] diff --git a/tests/resources/payloads/webhooks/delete/responses/404.json b/tests/resources/payloads/webhooks/delete/responses/404.json index 0721bb1..c97ea66 100644 --- a/tests/resources/payloads/webhooks/delete/responses/404.json +++ b/tests/resources/payloads/webhooks/delete/responses/404.json @@ -1,5 +1,5 @@ { - "type" : "https://docs.api.video/docs/resourcenot_found", + "type" : "https://docs.api.video/reference/resource-not-found", "title" : "The requested resource was not found.", "name" : "webhookId", "status" : 404