diff --git a/api/openapi.yaml b/api/openapi.yaml index f4973fc..09a63b6 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -12822,6 +12822,8 @@ paths: - `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. + - `ccv` TODO + - `view` TODO explode: false in: path name: metric @@ -12834,6 +12836,8 @@ paths: - impression - impression-time - watch-time + - ccv + - view type: string style: simple - description: "Use this path parameter to define a way of collecting data for\ @@ -12843,7 +12847,7 @@ paths: \ This aggregation can be used only with the `play` metric.\n- `total` calculates\ \ the total number of events for the `play` metric. \n- `average` calculates\ \ an average value for the selected metric.\n- `sum` adds up the total value\ - \ of the select metric.\n" + \ of the select metric.\n- `peak` TODO\n- `live` TODO\n" explode: false in: path name: aggregation @@ -12855,6 +12859,8 @@ paths: - total - average - sum + - peak + - live type: string style: simple - description: | @@ -12888,6 +12894,31 @@ paths: format: date-time type: string style: form + - description: | + TODO + example: true + explode: false + in: query + name: unique + required: false + schema: + type: boolean + style: form + - description: | + TODO + example: 5s + explode: false + in: query + name: viewDuration + required: false + schema: + enum: + - 3s + - 5s + - 10s + - 30s + type: string + style: form - $ref: '#/components/parameters/filterBy_2' description: "Use this parameter to filter the API's response based on different\ \ data dimensions. You can serialize filters in your query to receive more\ @@ -13239,6 +13270,8 @@ paths: - `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. + - `ccv-peak` TODO + - `ccv-average` TODO explode: false in: path name: metric @@ -13251,6 +13284,9 @@ paths: - start - end - impression + - ccv-peak + - ccv-average + - view type: string style: simple - description: "Use this path parameter to define a dimension for segmenting\ @@ -13270,7 +13306,7 @@ paths: \ based on the operating system used by the viewers. Response values can\ \ include `windows`, `mac osx`, `android`, `ios`, `linux`.\n- `browser`:\ \ Returns analytics based on the browser used by the viewers. Response values\ - \ can include `chrome`, `firefox`, `edge`, `opera`.\n" + \ can include `chrome`, `firefox`, `edge`, `opera`.\n- `referrer`: TODO\n" explode: false in: path name: breakdown @@ -13284,6 +13320,7 @@ paths: - device-type - operating-system - browser + - referrer type: string style: simple - description: | @@ -13351,6 +13388,30 @@ paths: - desc type: string style: form + - description: | + TODO + example: true + explode: false + in: query + name: unique + required: false + schema: + type: boolean + style: form + - description: | + TODO + explode: false + in: query + name: viewDuration + required: false + schema: + enum: + - 3s + - 5s + - 10s + - 30s + type: string + style: form - $ref: '#/components/parameters/filterBy_2' description: "Use this parameter to filter the API's response based on different\ \ data dimensions. You can serialize filters in your query to receive more\ @@ -13746,6 +13807,9 @@ paths: - start - end - impression + - ccv-peak + - ccv-average + - view type: string style: simple - description: | @@ -13778,7 +13842,7 @@ paths: type: string style: form - description: | - Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. + Use this query parameter to define how granularity of the data. Possible values: `minute`, `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. @@ -13790,6 +13854,7 @@ paths: required: false schema: enum: + - minute - hour - day type: string @@ -13830,6 +13895,30 @@ paths: - desc type: string style: form + - description: | + TODO + example: true + explode: false + in: query + name: unique + required: false + schema: + type: boolean + style: form + - description: | + TODO + explode: false + in: query + name: viewDuration + required: false + schema: + enum: + - 3s + - 5s + - 10s + - 30s + type: string + style: form - $ref: '#/components/parameters/filterBy_2' description: "Use this parameter to filter the API's response based on different\ \ data dimensions. You can serialize filters in your query to receive more\ diff --git a/docs/AnalyticsApi.md b/docs/AnalyticsApi.md index 443c116..823d38b 100644 --- a/docs/AnalyticsApi.md +++ b/docs/AnalyticsApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description # **getAggregatedMetrics** -> AnalyticsAggregatedMetricsResponse getAggregatedMetrics(metric, aggregation).from(from).to(to).filterBy(filterBy).execute() +> AnalyticsAggregatedMetricsResponse getAggregatedMetrics(metric, aggregation).from(from).to(to).unique(unique).viewDuration(viewDuration).filterBy(filterBy).execute() > okhttp3.Call executeAsync(callback) > ApiResponse executeWithHttpInfo() @@ -36,10 +36,12 @@ public class Example { AnalyticsApi apiInstance = client.analytics(); - String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. - String aggregation = "count"; // Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. - `ccv` TODO - `view` TODO + String aggregation = "count"; // Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. - `peak` TODO - `live` TODO OffsetDateTime from = OffsetDateTime.parse("2024-02-05T00:00:00+01:00"); // Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. OffsetDateTime to = OffsetDateTime.parse("2024-02-06T00:00:00+01:00"); // Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + Boolean unique = true; // TODO + String viewDuration = "3s"; // TODO FilterBy2 filterBy = new HashMap(); // Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). filterBy.setMediaId(Arrays.asList(Arrays.asList(Arrays.asList("vi4blUQJFrYWbaG44NChkH27")))); // Returns analytics based on the unique identifiers of a video or a live stream. filterBy.setMediaType("""video"""); // @@ -55,6 +57,8 @@ public class Example { AnalyticsAggregatedMetricsResponse result = apiInstance.getAggregatedMetrics(metric, aggregation) .from(from) .to(to) + .unique(unique) + .viewDuration(viewDuration) .filterBy(filterBy) .execute(); System.out.println(result); @@ -73,10 +77,12 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **metric** | **String**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. | [enum: play, start, end, impression, impression-time, watch-time] - **aggregation** | **String**| Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. | [enum: count, rate, total, average, sum] + **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. - `ccv` TODO - `view` TODO | [enum: play, start, end, impression, impression-time, watch-time, ccv, view] + **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. - `peak` TODO - `live` TODO | [enum: count, rate, total, average, sum, peak, live] **from** | **OffsetDateTime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. | [optional] **to** | **OffsetDateTime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **unique** | **Boolean**| TODO | [optional] + **viewDuration** | **String**| TODO | [optional] [enum: 3s, 5s, 10s, 30s] **filterBy** | [**FilterBy2**](.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] ### Return type @@ -103,7 +109,7 @@ Name | Type | Description | Notes # **getMetricsBreakdown** -> AnalyticsMetricsBreakdownResponse getMetricsBreakdown(metric, breakdown).from(from).to(to).sortBy(sortBy).sortOrder(sortOrder).filterBy(filterBy).currentPage(currentPage).pageSize(pageSize).execute() +> AnalyticsMetricsBreakdownResponse getMetricsBreakdown(metric, breakdown).from(from).to(to).sortBy(sortBy).sortOrder(sortOrder).unique(unique).viewDuration(viewDuration).filterBy(filterBy).currentPage(currentPage).pageSize(pageSize).execute() > okhttp3.Call executeAsync(callback) > ApiResponse executeWithHttpInfo() @@ -128,12 +134,14 @@ public class Example { AnalyticsApi apiInstance = client.analytics(); - String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. - String breakdown = "media-id"; // Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. + String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. - `ccv-peak` TODO - `ccv-average` TODO + String breakdown = "media-id"; // Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `referrer`: TODO OffsetDateTime from = OffsetDateTime.parse("2024-02-05T00:00:00+01:00"); // Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` OffsetDateTime to = OffsetDateTime.parse("2024-02-06T00:00:00+01:00"); // Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. String sortBy = "metricValue"; // Use this parameter to choose which field the API will use to sort the analytics data. These are the available fields to sort by: - `metricValue`: Sorts the results based on the **metric** you selected in your request. - `dimensionValue`: Sorts the results based on the **dimension** you selected in your request. String sortOrder = "asc"; // Use this parameter to define the sort order of results. These are the available sort orders: - `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`. - `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`. + Boolean unique = true; // TODO + String viewDuration = "3s"; // TODO FilterBy2 filterBy = new HashMap(); // Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). filterBy.setMediaId(Arrays.asList(Arrays.asList(Arrays.asList("vi4blUQJFrYWbaG44NChkH27")))); // Returns analytics based on the unique identifiers of a video or a live stream. filterBy.setMediaType("""video"""); // @@ -153,6 +161,8 @@ public class Example { .to(to) .sortBy(sortBy) .sortOrder(sortOrder) + .unique(unique) + .viewDuration(viewDuration) .filterBy(filterBy) .currentPage(currentPage) .pageSize(pageSize) @@ -173,12 +183,14 @@ public class Example { 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. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | [enum: play, play-rate, play-total, start, end, impression] - **breakdown** | **String**| Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. | [enum: media-id, media-type, continent, country, device-type, operating-system, browser] + **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. - `ccv-peak` TODO - `ccv-average` TODO | [enum: play, play-rate, play-total, start, end, impression, ccv-peak, ccv-average, view] + **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. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `referrer`: TODO | [enum: media-id, media-type, continent, country, device-type, operating-system, browser, referrer] **from** | **OffsetDateTime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] **to** | **OffsetDateTime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] **sortBy** | **String**| Use this parameter to choose which field the API will use to sort the analytics data. These are the available fields to sort by: - `metricValue`: Sorts the results based on the **metric** you selected in your request. - `dimensionValue`: Sorts the results based on the **dimension** you selected in your request. | [optional] [enum: metricValue, dimensionValue] **sortOrder** | **String**| Use this parameter to define the sort order of results. These are the available sort orders: - `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`. - `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`. | [optional] [enum: asc, desc] + **unique** | **Boolean**| TODO | [optional] + **viewDuration** | **String**| TODO | [optional] [enum: 3s, 5s, 10s, 30s] **filterBy** | [**FilterBy2**](.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] **currentPage** | **Integer**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **Integer**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] @@ -207,7 +219,7 @@ Name | Type | Description | Notes # **getMetricsOverTime** -> AnalyticsMetricsOverTimeResponse getMetricsOverTime(metric).from(from).to(to).interval(interval).sortBy(sortBy).sortOrder(sortOrder).filterBy(filterBy).currentPage(currentPage).pageSize(pageSize).execute() +> AnalyticsMetricsOverTimeResponse getMetricsOverTime(metric).from(from).to(to).interval(interval).sortBy(sortBy).sortOrder(sortOrder).unique(unique).viewDuration(viewDuration).filterBy(filterBy).currentPage(currentPage).pageSize(pageSize).execute() > okhttp3.Call executeAsync(callback) > ApiResponse executeWithHttpInfo() @@ -235,9 +247,11 @@ public class Example { String metric = "play"; // Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. OffsetDateTime from = OffsetDateTime.parse("2024-02-05T00:00:00+01:00"); // Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` OffsetDateTime to = OffsetDateTime.parse("2024-02-06T00:00:00+01:00"); // Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. - String interval = "hour"; // Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. + String interval = "minute"; // Use this query parameter to define how granularity of the data. Possible values: `minute`, `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`. String sortBy = "metricValue"; // Use this parameter to choose which field the API will use to sort the analytics data. These are the available fields to sort by: - `metricValue`: Sorts the results based on the **metric** you selected in your request. - `emittedAt`: Sorts the results based on the **timestamp** of the event in ATOM date-time format. String sortOrder = "asc"; // Use this parameter to define the sort order of results. These are the available sort orders: - `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`. - `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`. + Boolean unique = true; // TODO + String viewDuration = "3s"; // TODO FilterBy2 filterBy = new HashMap(); // Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). filterBy.setMediaId(Arrays.asList(Arrays.asList(Arrays.asList("vi4blUQJFrYWbaG44NChkH27")))); // Returns analytics based on the unique identifiers of a video or a live stream. filterBy.setMediaType("""video"""); // @@ -258,6 +272,8 @@ public class Example { .interval(interval) .sortBy(sortBy) .sortOrder(sortOrder) + .unique(unique) + .viewDuration(viewDuration) .filterBy(filterBy) .currentPage(currentPage) .pageSize(pageSize) @@ -278,12 +294,14 @@ public class Example { 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. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | [enum: play, play-rate, start, end, impression] + **metric** | **String**| Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. | [enum: play, play-rate, start, end, impression, ccv-peak, ccv-average, view] **from** | **OffsetDateTime**| Use this query parameter to define the starting date-time of the period you want analytics for. - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. - The maximum value is 30 days ago. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | [optional] **to** | **OffsetDateTime**| Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] - **interval** | **String**| Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. | [optional] [enum: hour, day] + **interval** | **String**| Use this query parameter to define how granularity of the data. Possible values: `minute`, `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. | [optional] [enum: minute, hour, day] **sortBy** | **String**| Use this parameter to choose which field the API will use to sort the analytics data. These are the available fields to sort by: - `metricValue`: Sorts the results based on the **metric** you selected in your request. - `emittedAt`: Sorts the results based on the **timestamp** of the event in ATOM date-time format. | [optional] [enum: metricValue, emittedAt] **sortOrder** | **String**| Use this parameter to define the sort order of results. These are the available sort orders: - `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`. - `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`. | [optional] [enum: asc, desc] + **unique** | **Boolean**| TODO | [optional] + **viewDuration** | **String**| TODO | [optional] [enum: 3s, 5s, 10s, 30s] **filterBy** | [**FilterBy2**](.md)| Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`. - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`. - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata). | [optional] **currentPage** | **Integer**| Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] **pageSize** | **Integer**| Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] diff --git a/src/main/java/video/api/client/api/clients/AnalyticsApi.java b/src/main/java/video/api/client/api/clients/AnalyticsApi.java index 42da972..9ac5318 100644 --- a/src/main/java/video/api/client/api/clients/AnalyticsApi.java +++ b/src/main/java/video/api/client/api/clients/AnalyticsApi.java @@ -101,7 +101,8 @@ public void setApiClient(ApiClient apiClient) { } private okhttp3.Call getAggregatedMetricsCall(String metric, String aggregation, OffsetDateTime from, - OffsetDateTime to, FilterBy2 filterBy, final ApiCallback _callback) throws ApiException { + OffsetDateTime to, Boolean unique, String viewDuration, FilterBy2 filterBy, final ApiCallback _callback) + throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -123,6 +124,14 @@ private okhttp3.Call getAggregatedMetricsCall(String metric, String aggregation, localVarQueryParams.addAll(localVarApiClient.parameterToPair("to", to)); } + if (unique != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("unique", unique)); + } + + if (viewDuration != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("viewDuration", viewDuration)); + } + if (filterBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterBy", filterBy)); } @@ -145,7 +154,8 @@ private okhttp3.Call getAggregatedMetricsCall(String metric, String aggregation, @SuppressWarnings("rawtypes") private okhttp3.Call getAggregatedMetricsValidateBeforeCall(String metric, String aggregation, OffsetDateTime from, - OffsetDateTime to, FilterBy2 filterBy, final ApiCallback _callback) throws ApiException { + OffsetDateTime to, Boolean unique, String viewDuration, FilterBy2 filterBy, final ApiCallback _callback) + throws ApiException { // verify the required parameter 'metric' is set if (metric == null) { @@ -157,24 +167,26 @@ private okhttp3.Call getAggregatedMetricsValidateBeforeCall(String metric, Strin throw new ApiException("Missing the required parameter 'aggregation' when calling getAggregatedMetrics"); } - okhttp3.Call localVarCall = getAggregatedMetricsCall(metric, aggregation, from, to, filterBy, _callback); + okhttp3.Call localVarCall = getAggregatedMetricsCall(metric, aggregation, from, to, unique, viewDuration, + filterBy, _callback); return localVarCall; } private ApiResponse getAggregatedMetricsWithHttpInfo(String metric, - String aggregation, OffsetDateTime from, OffsetDateTime to, FilterBy2 filterBy) throws ApiException { - okhttp3.Call localVarCall = getAggregatedMetricsValidateBeforeCall(metric, aggregation, from, to, filterBy, - null); + String aggregation, OffsetDateTime from, OffsetDateTime to, Boolean unique, String viewDuration, + FilterBy2 filterBy) throws ApiException { + okhttp3.Call localVarCall = getAggregatedMetricsValidateBeforeCall(metric, aggregation, from, to, unique, + viewDuration, filterBy, null); Type localVarReturnType = new TypeToken() { }.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getAggregatedMetricsAsync(String metric, String aggregation, OffsetDateTime from, - OffsetDateTime to, FilterBy2 filterBy, final ApiCallback _callback) - throws ApiException { - okhttp3.Call localVarCall = getAggregatedMetricsValidateBeforeCall(metric, aggregation, from, to, filterBy, - _callback); + OffsetDateTime to, Boolean unique, String viewDuration, FilterBy2 filterBy, + final ApiCallback _callback) throws ApiException { + okhttp3.Call localVarCall = getAggregatedMetricsValidateBeforeCall(metric, aggregation, from, to, unique, + viewDuration, filterBy, _callback); Type localVarReturnType = new TypeToken() { }.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); @@ -186,6 +198,8 @@ public class APIgetAggregatedMetricsRequest { private final String aggregation; private OffsetDateTime from; private OffsetDateTime to; + private Boolean unique; + private String viewDuration; private FilterBy2 filterBy; private APIgetAggregatedMetricsRequest(String metric, String aggregation) { @@ -227,6 +241,32 @@ public APIgetAggregatedMetricsRequest to(OffsetDateTime to) { return this; } + /** + * Set unique + * + * @param unique + * TODO (optional) + * + * @return APIgetAggregatedMetricsRequest + */ + public APIgetAggregatedMetricsRequest unique(Boolean unique) { + this.unique = unique; + return this; + } + + /** + * Set viewDuration + * + * @param viewDuration + * TODO (optional) + * + * @return APIgetAggregatedMetricsRequest + */ + public APIgetAggregatedMetricsRequest viewDuration(String viewDuration) { + this.viewDuration = viewDuration; + return this; + } + /** * Set filterBy * @@ -325,7 +365,7 @@ public APIgetAggregatedMetricsRequest filterBy(FilterBy2 filterBy) { * */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getAggregatedMetricsCall(metric, aggregation, from, to, filterBy, _callback); + return getAggregatedMetricsCall(metric, aggregation, from, to, unique, viewDuration, filterBy, _callback); } /** @@ -387,7 +427,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public AnalyticsAggregatedMetricsResponse execute() throws ApiException { ApiResponse localVarResp = getAggregatedMetricsWithHttpInfo(metric, - aggregation, from, to, filterBy); + aggregation, from, to, unique, viewDuration, filterBy); return localVarResp.getData(); } @@ -395,6 +435,8 @@ private APIgetAggregatedMetricsRequest copy() { APIgetAggregatedMetricsRequest copy = new APIgetAggregatedMetricsRequest(metric, aggregation); copy.from(from); copy.to(to); + copy.unique(unique); + copy.viewDuration(viewDuration); copy.filterBy(filterBy); return copy; } @@ -457,7 +499,7 @@ private APIgetAggregatedMetricsRequest copy() { * */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getAggregatedMetricsWithHttpInfo(metric, aggregation, from, to, filterBy); + return getAggregatedMetricsWithHttpInfo(metric, aggregation, from, to, unique, viewDuration, filterBy); } /** @@ -522,7 +564,7 @@ public ApiResponse executeWithHttpInfo() thr */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getAggregatedMetricsAsync(metric, aggregation, from, to, filterBy, _callback); + return getAggregatedMetricsAsync(metric, aggregation, from, to, unique, viewDuration, filterBy, _callback); } } @@ -545,7 +587,8 @@ public okhttp3.Call executeAsync(final ApiCallback getMetricsBreakdownWithHttpInfo(String metric, - String breakdown, OffsetDateTime from, OffsetDateTime to, String sortBy, String sortOrder, - FilterBy2 filterBy, Integer currentPage, Integer pageSize) throws ApiException { + String breakdown, OffsetDateTime from, OffsetDateTime to, String sortBy, String sortOrder, Boolean unique, + String viewDuration, FilterBy2 filterBy, Integer currentPage, Integer pageSize) throws ApiException { okhttp3.Call localVarCall = getMetricsBreakdownValidateBeforeCall(metric, breakdown, from, to, sortBy, - sortOrder, filterBy, currentPage, pageSize, null); + sortOrder, unique, viewDuration, filterBy, currentPage, pageSize, null); Type localVarReturnType = new TypeToken() { }.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getMetricsBreakdownAsync(String metric, String breakdown, OffsetDateTime from, - OffsetDateTime to, String sortBy, String sortOrder, FilterBy2 filterBy, Integer currentPage, - Integer pageSize, final ApiCallback _callback) throws ApiException { + OffsetDateTime to, String sortBy, String sortOrder, Boolean unique, String viewDuration, FilterBy2 filterBy, + Integer currentPage, Integer pageSize, final ApiCallback _callback) + throws ApiException { okhttp3.Call localVarCall = getMetricsBreakdownValidateBeforeCall(metric, breakdown, from, to, sortBy, - sortOrder, filterBy, currentPage, pageSize, _callback); + sortOrder, unique, viewDuration, filterBy, currentPage, pageSize, _callback); Type localVarReturnType = new TypeToken() { }.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); @@ -718,6 +770,8 @@ public class APIgetMetricsBreakdownRequest { private OffsetDateTime to; private String sortBy; private String sortOrder; + private Boolean unique; + private String viewDuration; private FilterBy2 filterBy; private Integer currentPage; private Integer pageSize; @@ -791,6 +845,32 @@ public APIgetMetricsBreakdownRequest sortOrder(String sortOrder) { return this; } + /** + * Set unique + * + * @param unique + * TODO (optional) + * + * @return APIgetMetricsBreakdownRequest + */ + public APIgetMetricsBreakdownRequest unique(Boolean unique) { + this.unique = unique; + return this; + } + + /** + * Set viewDuration + * + * @param viewDuration + * TODO (optional) + * + * @return APIgetMetricsBreakdownRequest + */ + public APIgetMetricsBreakdownRequest viewDuration(String viewDuration) { + this.viewDuration = viewDuration; + return this; + } + /** * Set filterBy * @@ -915,8 +995,8 @@ public APIgetMetricsBreakdownRequest pageSize(Integer pageSize) { * */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getMetricsBreakdownCall(metric, breakdown, from, to, sortBy, sortOrder, filterBy, currentPage, - pageSize, _callback); + return getMetricsBreakdownCall(metric, breakdown, from, to, sortBy, sortOrder, unique, viewDuration, + filterBy, currentPage, pageSize, _callback); } /** @@ -978,7 +1058,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public Page execute() throws ApiException { ApiResponse localVarResp = getMetricsBreakdownWithHttpInfo(metric, - breakdown, from, to, sortBy, sortOrder, filterBy, currentPage, pageSize); + breakdown, from, to, sortBy, sortOrder, unique, viewDuration, filterBy, currentPage, pageSize); return new Page<>(localVarResp.getData().getData(), localVarResp.getData().getPagination(), () -> { try { return copy().currentPage((currentPage == null ? 1 : currentPage) + 1).execute(); @@ -994,6 +1074,8 @@ private APIgetMetricsBreakdownRequest copy() { copy.to(to); copy.sortBy(sortBy); copy.sortOrder(sortOrder); + copy.unique(unique); + copy.viewDuration(viewDuration); copy.filterBy(filterBy); copy.currentPage(currentPage); copy.pageSize(pageSize); @@ -1058,8 +1140,8 @@ private APIgetMetricsBreakdownRequest copy() { * */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getMetricsBreakdownWithHttpInfo(metric, breakdown, from, to, sortBy, sortOrder, filterBy, - currentPage, pageSize); + return getMetricsBreakdownWithHttpInfo(metric, breakdown, from, to, sortBy, sortOrder, unique, viewDuration, + filterBy, currentPage, pageSize); } /** @@ -1153,8 +1235,8 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - return getMetricsBreakdownAsync(metric, breakdown, from, to, sortBy, sortOrder, filterBy, currentPage, - pageSize, apiCallback); + return getMetricsBreakdownAsync(metric, breakdown, from, to, sortBy, sortOrder, unique, viewDuration, + filterBy, currentPage, pageSize, apiCallback); } } @@ -1172,7 +1254,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) * 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) + * - `ccv-peak` TODO - `ccv-average` TODO (required) * @param breakdown * Use this path parameter to define a dimension for segmenting analytics data. You must use * `kebab-case` for path parameters. These are the available dimensions: - @@ -1190,7 +1272,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) * the operating system used by the viewers. Response values can include `windows`, `mac * osx`, `android`, `ios`, `linux`. - `browser`: Returns * analytics based on the browser used by the viewers. Response values can include `chrome`, - * `firefox`, `edge`, `opera`. (required) + * `firefox`, `edge`, `opera`. - `referrer`: TODO (required) * * @return APIgetMetricsBreakdownRequest * @@ -1248,8 +1330,8 @@ public APIgetMetricsBreakdownRequest getMetricsBreakdown(String metric, String b } private okhttp3.Call getMetricsOverTimeCall(String metric, OffsetDateTime from, OffsetDateTime to, String interval, - String sortBy, String sortOrder, FilterBy2 filterBy, Integer currentPage, Integer pageSize, - final ApiCallback _callback) throws ApiException { + String sortBy, String sortOrder, Boolean unique, String viewDuration, FilterBy2 filterBy, + Integer currentPage, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -1282,6 +1364,14 @@ private okhttp3.Call getMetricsOverTimeCall(String metric, OffsetDateTime from, localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortOrder", sortOrder)); } + if (unique != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("unique", unique)); + } + + if (viewDuration != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("viewDuration", viewDuration)); + } + if (filterBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterBy", filterBy)); } @@ -1312,34 +1402,35 @@ private okhttp3.Call getMetricsOverTimeCall(String metric, OffsetDateTime from, @SuppressWarnings("rawtypes") private okhttp3.Call getMetricsOverTimeValidateBeforeCall(String metric, OffsetDateTime from, OffsetDateTime to, - String interval, String sortBy, String sortOrder, FilterBy2 filterBy, Integer currentPage, Integer pageSize, - final ApiCallback _callback) throws ApiException { + String interval, String sortBy, String sortOrder, Boolean unique, String viewDuration, FilterBy2 filterBy, + Integer currentPage, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'metric' is set if (metric == null) { throw new ApiException("Missing the required parameter 'metric' when calling getMetricsOverTime"); } - okhttp3.Call localVarCall = getMetricsOverTimeCall(metric, from, to, interval, sortBy, sortOrder, filterBy, - currentPage, pageSize, _callback); + okhttp3.Call localVarCall = getMetricsOverTimeCall(metric, from, to, interval, sortBy, sortOrder, unique, + viewDuration, filterBy, currentPage, pageSize, _callback); return localVarCall; } private ApiResponse getMetricsOverTimeWithHttpInfo(String metric, - OffsetDateTime from, OffsetDateTime to, String interval, String sortBy, String sortOrder, - FilterBy2 filterBy, Integer currentPage, Integer pageSize) throws ApiException { + OffsetDateTime from, OffsetDateTime to, String interval, String sortBy, String sortOrder, Boolean unique, + String viewDuration, FilterBy2 filterBy, Integer currentPage, Integer pageSize) throws ApiException { okhttp3.Call localVarCall = getMetricsOverTimeValidateBeforeCall(metric, from, to, interval, sortBy, sortOrder, - filterBy, currentPage, pageSize, null); + unique, viewDuration, filterBy, currentPage, pageSize, null); Type localVarReturnType = new TypeToken() { }.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getMetricsOverTimeAsync(String metric, OffsetDateTime from, OffsetDateTime to, String interval, - String sortBy, String sortOrder, FilterBy2 filterBy, Integer currentPage, Integer pageSize, - final ApiCallback _callback) throws ApiException { + String sortBy, String sortOrder, Boolean unique, String viewDuration, FilterBy2 filterBy, + Integer currentPage, Integer pageSize, final ApiCallback _callback) + throws ApiException { okhttp3.Call localVarCall = getMetricsOverTimeValidateBeforeCall(metric, from, to, interval, sortBy, sortOrder, - filterBy, currentPage, pageSize, _callback); + unique, viewDuration, filterBy, currentPage, pageSize, _callback); Type localVarReturnType = new TypeToken() { }.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); @@ -1353,6 +1444,8 @@ public class APIgetMetricsOverTimeRequest { private String interval; private String sortBy; private String sortOrder; + private Boolean unique; + private String viewDuration; private FilterBy2 filterBy; private Integer currentPage; private Integer pageSize; @@ -1397,12 +1490,12 @@ public APIgetMetricsOverTimeRequest to(OffsetDateTime to) { * Set interval * * @param interval - * Use this query parameter to define how granularity of the data. Possible values: `hour`, - * `day`. - Default: If no interval specified and the period (different between from and - * to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and - * the period you set using the `from` and `to` parameters is less than or equals - * to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to - * `day`. (optional) + * Use this query parameter to define how granularity of the data. Possible values: + * `minute`, `hour`, `day`. - Default: If no interval specified and the + * period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a + * value for `interval`, and the period you set using the `from` and + * `to` parameters is less than or equals to 2 days, then the default assigned value is + * `hour`. Otherwise the API sets it to `day`. (optional) * * @return APIgetMetricsOverTimeRequest */ @@ -1443,6 +1536,32 @@ public APIgetMetricsOverTimeRequest sortOrder(String sortOrder) { return this; } + /** + * Set unique + * + * @param unique + * TODO (optional) + * + * @return APIgetMetricsOverTimeRequest + */ + public APIgetMetricsOverTimeRequest unique(Boolean unique) { + this.unique = unique; + return this; + } + + /** + * Set viewDuration + * + * @param viewDuration + * TODO (optional) + * + * @return APIgetMetricsOverTimeRequest + */ + public APIgetMetricsOverTimeRequest viewDuration(String viewDuration) { + this.viewDuration = viewDuration; + return this; + } + /** * Set filterBy * @@ -1567,8 +1686,8 @@ public APIgetMetricsOverTimeRequest pageSize(Integer pageSize) { * */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getMetricsOverTimeCall(metric, from, to, interval, sortBy, sortOrder, filterBy, currentPage, - pageSize, _callback); + return getMetricsOverTimeCall(metric, from, to, interval, sortBy, sortOrder, unique, viewDuration, filterBy, + currentPage, pageSize, _callback); } /** @@ -1630,7 +1749,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public Page execute() throws ApiException { ApiResponse localVarResp = getMetricsOverTimeWithHttpInfo(metric, from, - to, interval, sortBy, sortOrder, filterBy, currentPage, pageSize); + to, interval, sortBy, sortOrder, unique, viewDuration, filterBy, currentPage, pageSize); return new Page<>(localVarResp.getData().getData(), localVarResp.getData().getPagination(), () -> { try { return copy().currentPage((currentPage == null ? 1 : currentPage) + 1).execute(); @@ -1647,6 +1766,8 @@ private APIgetMetricsOverTimeRequest copy() { copy.interval(interval); copy.sortBy(sortBy); copy.sortOrder(sortOrder); + copy.unique(unique); + copy.viewDuration(viewDuration); copy.filterBy(filterBy); copy.currentPage(currentPage); copy.pageSize(pageSize); @@ -1711,8 +1832,8 @@ private APIgetMetricsOverTimeRequest copy() { * */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getMetricsOverTimeWithHttpInfo(metric, from, to, interval, sortBy, sortOrder, filterBy, currentPage, - pageSize); + return getMetricsOverTimeWithHttpInfo(metric, from, to, interval, sortBy, sortOrder, unique, viewDuration, + filterBy, currentPage, pageSize); } /** @@ -1806,8 +1927,8 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done) _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - return getMetricsOverTimeAsync(metric, from, to, interval, sortBy, sortOrder, filterBy, currentPage, - pageSize, apiCallback); + return getMetricsOverTimeAsync(metric, from, to, interval, sortBy, sortOrder, unique, viewDuration, + filterBy, currentPage, pageSize, apiCallback); } }