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