diff --git a/README.md b/README.md index 3da17f3..faa14bb 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - [Documentation](#documentation) - [API Endpoints](#api-endpoints) - [Analytics](#analytics) + - [AnalyticsV20Beta](#analyticsv20beta) - [Captions](#captions) - [Chapters](#chapters) - [LiveStreams](#livestreams) @@ -141,8 +142,26 @@ analyticsApi := client.Analytics Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetLiveStreamsPlays**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Analytics.md#GetLiveStreamsPlays) | **Get** /analytics/live-streams/plays | Get play events for live stream -[**GetVideosPlays**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Analytics.md#GetVideosPlays) | **Get** /analytics/videos/plays | Get play events for video +**(deprecated)** [**GetLiveStreamsPlays**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Analytics.md#GetLiveStreamsPlays) | **Get** /analytics/live-streams/plays | Get play events for live stream +**(deprecated)** [**GetVideosPlays**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Analytics.md#GetVideosPlays) | **Get** /analytics/videos/plays | Get play events for video + + +#### AnalyticsV20Beta + + +##### Retrieve an instance of the AnalyticsV20Beta API: +```golang +client := apivideosdk.ClientBuilder("API_VIDEO_KEY").Build() +analyticsV20BetaApi := client.AnalyticsV20Beta +``` + +##### Endpoints + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAggregatedMetrics**](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsV20Beta.md#GetAggregatedMetrics) | **Get** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics +[**GetMetricsBreakdown**](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsV20Beta.md#GetMetricsBreakdown) | **Get** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions +[**GetMetricsOverTime**](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsV20Beta.md#GetMetricsOverTime) | **Get** /data/timeseries/{metric} | Retrieve metrics over time #### Captions @@ -315,7 +334,16 @@ Method | HTTP request | Description - [AccessToken](https://github.com/apivideo/api.video-go-client/blob/main/docs/AccessToken.md) - [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-go-client/blob/main/docs/AdditionalBadRequestErrors.md) + - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsAggregatedMetricsResponse.md) + - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContext.md) + - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md) - [AnalyticsData](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsData.md) + - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsMetricsBreakdownResponse.md) + - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsMetricsBreakdownResponseContext.md) + - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsMetricsBreakdownResponseData.md) + - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsMetricsOverTimeResponse.md) + - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsMetricsOverTimeResponseContext.md) + - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsMetricsOverTimeResponseData.md) - [AnalyticsPlays400Error](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsPlays400Error.md) - [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/AnalyticsPlaysResponse.md) - [AuthenticatePayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/AuthenticatePayload.md) @@ -356,6 +384,7 @@ Method | HTTP request | Description - [TokenCreationPayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-go-client/blob/main/docs/TooManyRequests.md) + - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-go-client/blob/main/docs/UnrecognizedRequestUrl.md) - [UploadToken](https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadToken.md) - [Video](https://github.com/apivideo/api.video-go-client/blob/main/docs/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-go-client/blob/main/docs/VideoAssets.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 523f057..47f89db 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -449,7 +449,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -730,7 +730,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1138,7 +1138,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1506,7 +1506,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1663,7 +1663,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -1924,7 +1924,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2112,7 +2112,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2410,7 +2410,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2626,7 +2626,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -2858,7 +2858,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3152,7 +3152,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3461,7 +3461,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3725,7 +3725,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -3970,7 +3970,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4168,7 +4168,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4393,7 +4393,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4665,7 +4665,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -4932,7 +4932,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5252,7 +5252,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5448,7 +5448,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5640,7 +5640,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -5937,7 +5937,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -6221,7 +6221,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -6463,7 +6463,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -6757,7 +6757,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -7056,7 +7056,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -7378,7 +7378,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -7682,7 +7682,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -7976,7 +7976,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -8221,7 +8221,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -8459,7 +8459,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -8738,7 +8738,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9023,7 +9023,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9367,7 +9367,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9602,7 +9602,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -9887,7 +9887,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10128,7 +10128,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10355,7 +10355,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10628,7 +10628,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -10892,7 +10892,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -11058,175 +11058,132 @@ paths: code: | // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#uploadLogo - /analytics/videos/plays: + /data/metrics/{metric}/{aggregation}: get: - description: Retrieve filtered analytics about the number of plays for your - videos in a project. - operationId: GET_analytics-videos-plays + description: Retrieve time-based and countable metrics like average watch time + or the number of impressions over a certain period of time. + operationId: GET_aggregated-metrics parameters: - description: | - Use this query parameter to set the start date for the time period that you want analytics for. - - The API returns analytics data including the day you set in `from`. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. - example: 2023-06-01 - explode: true - in: query - name: from + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. + - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. + - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. + - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. + - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. + - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + explode: false + in: path + name: metric required: true schema: - format: date - type: string - style: form - - description: | - Use this optional query parameter to set the end date for the time period that you want analytics for. - - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. - example: 2023-06-10 - explode: true - in: query - name: to - required: false - schema: - format: date + enum: + - play + - start + - end + - impression + - impression-time + - watch-time type: string - style: form - - description: |- - Use this query parameter to define the dimension that you want analytics for. - - `videoId`: Returns analytics based on the public video identifiers. - - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - example: browser + style: simple + - description: "Use this path parameter to define a way of collecting data for\ + \ the metric that you want analytics for.\n\n- `count` returns the overall\ + \ number of events for the `play` metric.\n- `rate` returns the ratio that\ + \ calculates the number of plays your content receives divided by its impressions.\ + \ This aggregation can be used only with the `play` metric.\n- `total` calculates\ + \ the total number of events for the `play` metric. \n- `average` calculates\ + \ an average value for the selected metric.\n- `sum` adds up the total value\ + \ of the select metric.\n" explode: false - in: query - name: dimension + in: path + name: aggregation required: true schema: enum: - - videoId - - emittedAt - - country - - deviceType - - operatingSystem - - browser + - count + - rate + - total + - average + - sum type: string - style: form - - description: Use this query parameter to filter your results to a specific - video in a project that you want analytics for. You must use the `videoId:` - prefix when specifying a video ID. - example: videoId:vi3q7HxhApxRF1c8F8r6VeaI + style: simple + - description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 365 days ago, and April 1st 2024. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + - The API ignores this parameter when you call `/data/metrics/play/total`. + example: 2024-02-05T00:00:00+01:00 explode: false in: query - name: filter + name: from required: false schema: + format: date-time type: string style: form - - description: 'Choose the number of search results to return per page. Minimum - value: 1' - example: 2 - explode: true + - description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The API ignores this parameter when you call `/data/metrics/play/total`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + example: 2024-02-06T00:00:00+01:00 + explode: false in: query - name: currentPage + name: to required: false schema: - default: 1 - type: integer + format: date-time + type: string style: form - - description: Results per page. Allowed values 1-100, default is 25. - example: 30 + - description: "Use this parameter to filter the API's response based on different\ + \ data dimensions. You can serialize filters in your query to receive more\ + \ detailed breakdowns of your analytics.\n\n- If you do not set a value\ + \ for `filterBy`, the API returns the full dataset for your project.\n-\ + \ The API only accepts the `mediaId` and `mediaType` filters when you call\ + \ `/data/metrics/play/total`.\n\nThese are the available breakdown dimensions:\n\ + \n- `mediaId`: Returns analytics based on the unique identifiers of a video\ + \ or a live stream.\n- `mediaType`: Returns analytics based on the type\ + \ of content. Possible values: `video` and `live-stream`. \n- `continent`:\ + \ Returns analytics based on the viewers' continent. The list of supported\ + \ continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`:\ + \ Returns analytics based on the viewers' country. The list of supported\ + \ country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\n\ + - `deviceType`: Returns analytics based on the type of device used by the\ + \ viewers. Possible response values are: `computer`, `phone`, `tablet`,\ + \ `tv`, `console`, `wearable`, `unknown`.\n- `operatingSystem`: Returns\ + \ analytics based on the operating system used by the viewers. Response\ + \ values include `windows`, `mac osx`, `android`, `ios`, `linux`.\n- `browser`:\ + \ Returns analytics based on the browser used by the viewers. Response values\ + \ include `chrome`, `firefox`, `edge`, `opera`.\n" + example: filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox explode: true in: query - name: pageSize + name: filterBy required: false schema: - default: 25 - type: integer + type: string style: form responses: "200": content: application/json: examples: - Dimension is videoId: - description: Breakdown video-plays by videoId for a project. - value: - data: - - value: vi3q7HxhApxRF1c8F8r6VeaI - plays: 100 - - value: vi3q7HxhApxRF1c8F8r6VeaF - plays: 10 - - value: vi3q7HxhApxRF1c8F8r6VeaH - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 3 - pageSize: 25 - pagesTotal: 1 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 - - rel: first - uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 - - rel: last - uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 - Dimension is country: - description: Breakdown video-plays by country for a project, with - pagination set. - value: - data: - - value: france - plays: 100 - - value: united states - plays: 10 - - value: spain - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 2 - pageSize: 2 - pagesTotal: 2 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/videos/plays?dimension=country¤tPage=1&pageSize=2 - - rel: first - uri: /analytics/videos/plays?dimension=country¤tPage=1&pageSize=2 - - rel: next - uri: /analytics/videos/plays?dimension=country¤tPage=2&pageSize=1 - - rel: last - uri: /analytics/videos/plays?dimension=country¤tPage=2&pageSize=1 - Dimension is emittedAt, filtered for a videoId: - description: Breakdown video-plays by the time of play events, for - a specific video. + Impression time from a certain date: value: - data: - - value: 2023-06-10T10:00:00.000Z - plays: 100 - - value: 2023-06-10T11:00:00.000Z - plays: 10 - - value: 2023-06-10T12:00:00.000Z - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 3 - pageSize: 25 - pagesTotal: 1 - itemsTotal: 3 - links: - - rel: self - uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 - - rel: first - uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 - - rel: last - uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 - schema: - $ref: '#/components/schemas/analytics-plays-response' + context: + metric: impression + aggregation: count + timeframe: + from: 2024-05-28T11:15:07+00:00 + to: 2024-05-29T11:15:07+00:00 + data: 346.5 + schema: + $ref: '#/components/schemas/analytics-aggregated-metrics-response' description: Success headers: X-RateLimit-Limit: @@ -11253,61 +11210,26 @@ paths: content: application/json: examples: - Missing parameter: - description: This error occurs when a required query-parameter is - missing. + Invalid attribute: + description: This error occurs when a parameter you provided does + not exist, or isn't correct for this endpoint, has an invalid + value. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 detail: This value must be of type string. - name: dimension - Invalid parameter: - description: This error occurs when a required query-parameter format - is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): videoId:{videoId}' - name: filter - Dimension not allowed: - description: This error occurs when the dimension you requested - is not allowed for the endpoint. For example, the dimension `videoId` - is not allowed for the `/live-streams` endpoint. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' - name: dimension - Dimension unknown: - description: This error occurs when the dimension you requested - is unknown. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' - name: dimension - Invalid filter: - description: This error occurs when the format of the filter you - requested is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): videoId:{videoId}' - name: filter - Invalid videoId: - description: This error occurs when the videoId you requested does - not refer to an existing video. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided + does not exist, isn't correct for this endpoint, or has an invalid + value. value: type: https://docs.api.video/reference/request-invalid-query-parameter title: A query parameter is invalid. status: 400 - detail: This value must refer to an existing video - name: filter + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 schema: $ref: '#/components/schemas/analytics-plays-400-error' description: Bad request error @@ -11332,18 +11254,18 @@ paths: schema: type: integer style: simple - "403": + "404": content: application/json: examples: - Analytics is disabled: + Unrecognized request URL: value: - type: https://docs.api.video/reference/authorization-disabled-analytics - title: You cannot get analytics from this project. - status: 403 + type: https://docs.api.video/reference/unrecognized-request-url + title: Unrecognized request URL. + status: 404 schema: - $ref: '#/components/schemas/403-error-schema' - description: Forbidden - Disabled Analytics + $ref: '#/components/schemas/unrecognized-request-url' + description: Unrecognized request URL headers: X-RateLimit-Limit: description: The request limit per minute. @@ -11365,17 +11287,941 @@ paths: schema: type: integer style: simple - "404": + "429": content: application/json: examples: - Endpoint not found: + Too many requests: value: - type: null - title: null - name: null - status: 404 - schema: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Retrieve aggregated metrics + tags: + - Analytics v2.0 beta + x-client-action: getAggregatedMetrics + x-group-parameters: true + x-client-paginated: true + x-doctave: {} + /data/buckets/{metric}/{breakdown}: + get: + description: Retrieve detailed analytics play-rate and number of impressions + segmented by dimensions like country or device type. + operationId: GET_metrics-breakdown + parameters: + - description: | + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. + - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. + - `start` is the number of times playback was started. + - `end` is the number of times playback has ended with the content watch until the end. + - `impression` is the number of times your content has been loaded and was ready for playback. + explode: false + in: path + name: metric + required: true + schema: + enum: + - play + - play-rate + - start + - end + - impression + type: string + style: simple + - description: "Use this path parameter to define a dimension for segmenting\ + \ analytics data. You must use `kebab-case` for path parameters.\n\nThese\ + \ are the available dimensions:\n\n- `media-id`: Returns analytics based\ + \ on the unique identifiers of a video or a live stream.\n- `media-type`:\ + \ Returns analytics based on the type of content. Possible values: `video`\ + \ and `live-stream`. \n- `continent`: Returns analytics based on the viewers'\ + \ continent. The list of supported continents names are based on the [GeoNames\ + \ public database](https://www.geonames.org/countries/). Possible values\ + \ are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`: Returns\ + \ analytics based on the viewers' country. The list of supported country\ + \ names are based on the [GeoNames public database](https://www.geonames.org/countries/).\n\ + - `device-type`: Returns analytics based on the type of device used by the\ + \ viewers. Possible response values are: `computer`, `phone`, `tablet`,\ + \ `tv`, `console`, `wearable`, `unknown`.\n- `operating-system`: Returns\ + \ analytics based on the operating system used by the viewers. Response\ + \ values include `windows`, `mac osx`, `android`, `ios`, `linux`.\n- `browser`:\ + \ Returns analytics based on the browser used by the viewers. Response values\ + \ include `chrome`, `firefox`, `edge`, `opera`.\n" + explode: false + in: path + name: breakdown + required: true + schema: + enum: + - media-id + - media-type + - continent + - country + - device-type + - operating-system + - browser + type: string + style: simple + - description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 365 days ago, and April 1st 2024. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + example: 2024-02-05T00:00:00+01:00 + explode: false + in: query + name: from + required: false + schema: + format: date-time + type: string + style: form + - description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + example: 2024-02-06T00:00:00+01:00 + explode: false + in: query + name: to + required: false + schema: + format: date-time + type: string + style: form + - description: "Use this parameter to filter the API's response based on different\ + \ data dimensions. You can serialize filters in your query to receive more\ + \ detailed breakdowns of your analytics. You must use `camelCase` for query\ + \ parameters.\n\n- If you do not set a value for `filterBy`, the API returns\ + \ the full dataset for your project.\n\nThese are the available breakdown\ + \ dimensions:\n\n- `mediaId`: Returns analytics based on the unique identifiers\ + \ of a video or a live stream.\n- `mediaType`: Returns analytics based on\ + \ the type of content. Possible values: `video` and `live-stream`. \n- `continent`:\ + \ Returns analytics based on the viewers' continent. The list of supported\ + \ continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`:\ + \ Returns analytics based on the viewers' country. The list of supported\ + \ country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\n\ + - `deviceType`: Returns analytics based on the type of device used by the\ + \ viewers. Possible response values are: `computer`, `phone`, `tablet`,\ + \ `tv`, `console`, `wearable`, `unknown`.\n- `operatingSystem`: Returns\ + \ analytics based on the operating system used by the viewers. Response\ + \ values include `windows`, `mac osx`, `android`, `ios`, `linux`.\n- `browser`:\ + \ Returns analytics based on the browser used by the viewers. Response values\ + \ include `chrome`, `firefox`, `edge`, `opera`.\n" + example: filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox + explode: true + in: query + name: filterBy + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Number of plays in a country over a specific timeframe: + value: + context: + metric: play + breakdown: country + timeframe: + from: 2024-04-28T07:15:05+00:00 + to: 2024-05-29T11:25:37+00:00 + data: + - metricValue: 7 + dimensionValue: FR + pagination: + currentPage: 1 + currentPageItems: 1 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 1 + links: + - rel: self + uri: /data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25 + - rel: first + uri: /data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25 + - rel: last + uri: /data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25 + schema: + $ref: '#/components/schemas/analytics-metrics-breakdown-response' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": + content: + application/json: + examples: + Invalid attribute: + description: This error occurs when a parameter you provided does + not exist, or isn't correct for this endpoint, has an invalid + value. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: This value must be of type string. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided + does not exist, isn't correct for this endpoint, or has an invalid + value. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 + schema: + $ref: '#/components/schemas/analytics-plays-400-error' + description: Bad request error + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + Unrecognized request URL: + value: + type: https://docs.api.video/reference/unrecognized-request-url + title: Unrecognized request URL. + status: 404 + schema: + $ref: '#/components/schemas/unrecognized-request-url' + description: Unrecognized request URL + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Retrieve metrics in a breakdown of dimensions + tags: + - Analytics v2.0 beta + x-client-action: getMetricsBreakdown + x-group-parameters: true + x-client-paginated: true + x-doctave: {} + /data/timeseries/{metric}: + get: + description: Retrieve countable metrics like the number of plays or impressions, + grouped by the time at which they occurred + operationId: GET_metrics-over-time + parameters: + - description: | + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. + - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. + - `start` is the number of times playback was started. + - `end` is the number of times playback has ended with the content watch until the end. + - `impression` is the number of times your content has been loaded and was ready for playback. + explode: false + in: path + name: metric + required: true + schema: + enum: + - play + - play-rate + - start + - end + - impression + type: string + style: simple + - description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 365 days ago, and April 1st 2024. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + example: from=2024-02-05T00:00:00+01:00 + explode: false + in: query + name: from + required: false + schema: + format: date-time + type: string + style: form + - description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + example: to=2024-02-06T00:00:00+01:00 + explode: false + in: query + name: to + required: false + schema: + format: date-time + type: string + style: form + - description: | + Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. + + - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. + + - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. + example: to=2024-02-06T00:00:00+01:00 + explode: false + in: query + name: interval + required: false + schema: + format: date-time + type: string + style: form + - description: "Use this parameter to filter the API's response based on different\ + \ data dimensions. You can serialize filters in your query to receive more\ + \ detailed breakdowns of your analytics. You must use `camelCase` for query\ + \ parameters.\n\n- If you do not set a value for `filterBy`, the API returns\ + \ the full dataset for your project.\n\nThese are the available breakdown\ + \ dimensions:\n\n- `mediaId`: Returns analytics based on the unique identifiers\ + \ of a video or a live stream.\n- `mediaType`: Returns analytics based on\ + \ the type of content. Possible values: `video` and `live-stream`. \n- `continent`:\ + \ Returns analytics based on the viewers' continent. The list of supported\ + \ continents names are based on the [GeoNames public database](https://www.geonames.org/countries/).\ + \ Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. \n- `country`:\ + \ Returns analytics based on the viewers' country. The list of supported\ + \ country names are based on the [GeoNames public database](https://www.geonames.org/countries/).\n\ + - `deviceType`: Returns analytics based on the type of device used by the\ + \ viewers. Possible response values are: `computer`, `phone`, `tablet`,\ + \ `tv`, `console`, `wearable`, `unknown`.\n- `operatingSystem`: Returns\ + \ analytics based on the operating system used by the viewers. Response\ + \ values include `windows`, `mac osx`, `android`, `ios`, `linux`.\n- `browser`:\ + \ Returns analytics based on the browser used by the viewers. Response values\ + \ include `chrome`, `firefox`, `edge`, `opera`.\n" + example: filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox + explode: true + in: query + name: filterBy + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Impression time from a certain date: + value: + context: + metric: play + interval: hour + timeframe: + from: 2024-05-28T11:08:39+00:00 + to: 2024-05-29T11:08:39+00:00 + data: + - emittedAt: 2024-05-29T07:00:00+00:00 + metricValue: 2 + - emittedAt: 2024-05-29T08:00:00+00:00 + metricValue: 1 + - emittedAt: 2024-05-29T09:00:00+00:00 + metricValue: 1 + pagination: + currentPage: 1 + currentPageItems: 3 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 3 + links: + - rel: self + uri: /data/timeseries/play?currentPage=1&pageSize=25 + - rel: first + uri: /data/timeseries/play?currentPage=1&pageSize=25 + - rel: last + uri: /data/timeseries/play?currentPage=1&pageSize=25 + schema: + $ref: '#/components/schemas/analytics-metrics-over-time-response' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": + content: + application/json: + examples: + Invalid attribute: + description: This error occurs when a parameter you provided does + not exist, or isn't correct for this endpoint, has an invalid + value. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: This value must be of type string. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided + does not exist, isn't correct for this endpoint, or has an invalid + value. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 + schema: + $ref: '#/components/schemas/analytics-plays-400-error' + description: Bad request error + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + Unrecognized request URL: + value: + type: https://docs.api.video/reference/unrecognized-request-url + title: Unrecognized request URL. + status: 404 + schema: + $ref: '#/components/schemas/unrecognized-request-url' + description: Unrecognized request URL + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Retrieve metrics over time + tags: + - Analytics v2.0 beta + x-client-action: getMetricsOverTime + x-group-parameters: true + x-client-paginated: true + x-doctave: {} + /analytics/videos/plays: + get: + deprecated: true + description: | + Retrieve filtered analytics about the number of plays for your videos in a project. + + This endpoint will be deprecated with the release of Analytics v2.0. + operationId: GET_analytics-videos-plays + parameters: + - description: | + Use this query parameter to set the start date for the time period that you want analytics for. + - The API returns analytics data including the day you set in `from`. + - The date you set must be **within the last 30 days**. + - The value you provide must follow the `YYYY-MM-DD` format. + example: 2023-06-01 + explode: true + in: query + name: from + required: true + schema: + format: date + type: string + style: form + - description: | + Use this optional query parameter to set the end date for the time period that you want analytics for. + - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. + - The date you set must be **within the last 30 days**. + - The value you provide must follow the `YYYY-MM-DD` format. + example: 2023-06-10 + explode: true + in: query + name: to + required: false + schema: + format: date + type: string + style: form + - description: |- + Use this query parameter to define the dimension that you want analytics for. + - `videoId`: Returns analytics based on the public video identifiers. + - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. + - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. + example: browser + explode: false + in: query + name: dimension + required: true + schema: + enum: + - videoId + - emittedAt + - country + - deviceType + - operatingSystem + - browser + type: string + style: form + - description: Use this query parameter to filter your results to a specific + video in a project that you want analytics for. You must use the `videoId:` + prefix when specifying a video ID. + example: videoId:vi3q7HxhApxRF1c8F8r6VeaI + explode: false + in: query + name: filter + required: false + schema: + type: string + style: form + - description: 'Choose the number of search results to return per page. Minimum + value: 1' + example: 2 + explode: true + in: query + name: currentPage + required: false + schema: + default: 1 + type: integer + style: form + - description: Results per page. Allowed values 1-100, default is 25. + example: 30 + explode: true + in: query + name: pageSize + required: false + schema: + default: 25 + type: integer + style: form + responses: + "200": + content: + application/json: + examples: + Dimension is videoId: + description: Breakdown video-plays by videoId for a project. + value: + data: + - value: vi3q7HxhApxRF1c8F8r6VeaI + plays: 100 + - value: vi3q7HxhApxRF1c8F8r6VeaF + plays: 10 + - value: vi3q7HxhApxRF1c8F8r6VeaH + plays: 1 + pagination: + currentPage: 1 + currentPageItems: 3 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 3 + links: + - rel: self + uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 + - rel: first + uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 + - rel: last + uri: /analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25 + Dimension is country: + description: Breakdown video-plays by country for a project, with + pagination set. + value: + data: + - value: france + plays: 100 + - value: united states + plays: 10 + - value: spain + plays: 1 + pagination: + currentPage: 1 + currentPageItems: 2 + pageSize: 2 + pagesTotal: 2 + itemsTotal: 3 + links: + - rel: self + uri: /analytics/videos/plays?dimension=country¤tPage=1&pageSize=2 + - rel: first + uri: /analytics/videos/plays?dimension=country¤tPage=1&pageSize=2 + - rel: next + uri: /analytics/videos/plays?dimension=country¤tPage=2&pageSize=1 + - rel: last + uri: /analytics/videos/plays?dimension=country¤tPage=2&pageSize=1 + Dimension is emittedAt, filtered for a videoId: + description: Breakdown video-plays by the time of play events, for + a specific video. + value: + data: + - value: 2023-06-10T10:00:00.000Z + plays: 100 + - value: 2023-06-10T11:00:00.000Z + plays: 10 + - value: 2023-06-10T12:00:00.000Z + plays: 1 + pagination: + currentPage: 1 + currentPageItems: 3 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 3 + links: + - rel: self + uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 + - rel: first + uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 + - rel: last + uri: /analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25 + schema: + $ref: '#/components/schemas/analytics-plays-response' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": + content: + application/json: + examples: + Missing parameter: + description: This error occurs when a required query-parameter is + missing. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: This value must be of type string. + name: dimension + Invalid parameter: + description: This error occurs when a required query-parameter format + is invalid. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be of the following structure(s): videoId:{videoId}' + name: filter + Dimension not allowed: + description: This error occurs when the dimension you requested + is not allowed for the endpoint. For example, the dimension `videoId` + is not allowed for the `/live-streams` endpoint. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' + name: dimension + Dimension unknown: + description: This error occurs when the dimension you requested + is unknown. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' + name: dimension + Invalid filter: + description: This error occurs when the format of the filter you + requested is invalid. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be of the following structure(s): videoId:{videoId}' + name: filter + Invalid videoId: + description: This error occurs when the videoId you requested does + not refer to an existing video. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: This value must refer to an existing video + name: filter + schema: + $ref: '#/components/schemas/analytics-plays-400-error' + description: Bad request error + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "403": + content: + application/json: + examples: + Analytics is disabled: + value: + type: https://docs.api.video/reference/authorization-disabled-analytics + title: You cannot get analytics from this project. + status: 403 + schema: + $ref: '#/components/schemas/403-error-schema' + description: Forbidden - Disabled Analytics + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + Endpoint not found: + value: + type: null + title: null + name: null + status: 404 + schema: $ref: '#/components/schemas/not-found' description: Not Found headers: @@ -11403,7 +12249,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -11742,8 +12588,11 @@ paths: \ }\n}\n" /analytics/live-streams/plays: get: - description: Retrieve filtered analytics about the number of plays for your - live streams in a project. + deprecated: true + description: | + Retrieve filtered analytics about the number of plays for your live streams in a project. + + This endpoint will be deprecated with the release of Analytics v2.0. operationId: GET_analytics-live-streams-plays parameters: - description: | @@ -12083,7 +12932,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -12516,7 +13365,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -12775,7 +13624,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -13006,7 +13855,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -13199,7 +14048,7 @@ paths: content: application/json: examples: - response: + Too many requests: value: type: https://docs.api.video/reference/too-many-requests title: Too many requests. @@ -15164,6 +16013,136 @@ components: description: The name of the parameter that caused the error. type: string type: object + analytics-aggregated-metrics-response: + example: + data: 356.2 + context: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + aggregation: count + properties: + context: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context' + data: + example: 356.2 + format: float + type: number + required: + - context + - data + title: Analytics v2.0 response for aggregated metrics + type: object + analytics-metrics-breakdown-response: + example: + pagination: + itemsTotal: 123 + pagesTotal: 7 + pageSize: 20 + currentPage: 3 + currentPageItems: 20 + links: + first: + rel: first + uri: /videos/search?currentPage=1&pageSize=20 + previous: + rel: previous + uri: /videos/search?currentPage=2&pageSize=20 + next: + rel: next + uri: /videos/search?currentPage=4&pageSize=20 + last: + rel: last + uri: /videos/search?currentPage=6&pageSize=20 + data: + - dimensionValue: dimensionValue + metricValue: 0.8008282 + - dimensionValue: dimensionValue + metricValue: 0.8008282 + context: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + breakdown: country + properties: + context: + $ref: '#/components/schemas/analytics_metrics_breakdown_response_context' + data: + description: Returns an array of dimensions and their respective metrics. + items: + $ref: '#/components/schemas/analytics_metrics_breakdown_response_data' + type: array + pagination: + $ref: '#/components/schemas/pagination' + required: + - context + - data + - pagination + title: Analytics v2.0 response for metrics breakdown by dimension + type: object + analytics-metrics-over-time-response: + example: + pagination: + itemsTotal: 123 + pagesTotal: 7 + pageSize: 20 + currentPage: 3 + currentPageItems: 20 + links: + first: + rel: first + uri: /videos/search?currentPage=1&pageSize=20 + previous: + rel: previous + uri: /videos/search?currentPage=2&pageSize=20 + next: + rel: next + uri: /videos/search?currentPage=4&pageSize=20 + last: + rel: last + uri: /videos/search?currentPage=6&pageSize=20 + data: + - emittedAt: emittedAt + metricValue: 0.8008282 + - emittedAt: emittedAt + metricValue: 0.8008282 + context: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + interval: day + properties: + context: + $ref: '#/components/schemas/analytics_metrics_over_time_response_context' + data: + description: Returns an array of metrics and the timestamps . + items: + $ref: '#/components/schemas/analytics_metrics_over_time_response_data' + type: array + pagination: + $ref: '#/components/schemas/pagination' + required: + - context + - data + - pagination + title: Analytics v2.0 response for metrics over time + type: object + unrecognized-request-url: + properties: + type: + description: A link to the error documentation. + type: string + title: + description: A description of the error that occurred. + type: string + status: + description: The HTTP status code. + type: integer + title: Unrecognized request URL + type: object webhooks-list-response: example: pagination: @@ -15721,6 +16700,150 @@ components: example: path/to/my/logo/mylogo.jpg type: string type: object + analytics_aggregated_metrics_response_context_timeframe: + description: Returns the starting and ending date-times of the period you want + analytics for. + example: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + properties: + from: + description: Returns the starting date-time of the period you want analytics + for in ATOM date-time format. + example: 2024-05-28T11:15:07Z + format: date-time + type: string + to: + description: Returns the starting date-time of the period you want analytics + for in ATOM date-time format. + example: 2024-05-29T11:15:07Z + format: date-time + type: string + type: object + analytics_aggregated_metrics_response_context: + example: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + aggregation: count + properties: + metric: + description: Returns the metric you selected. + enum: + - play + - start + - end + - impression + - impression-time + - watch-time + example: impression + type: string + aggregation: + description: Returns the aggregation you selected. + enum: + - count + - rate + - total + - average + - sum + example: count + type: string + timeframe: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context_timeframe' + type: object + analytics_metrics_breakdown_response_context: + example: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + breakdown: country + properties: + metric: + description: Returns the metric you selected. + enum: + - play + - play-rate + - start + - end + - impression + example: impression + type: string + breakdown: + description: Returns the dimension you selected. + enum: + - media-id + - media-type + - continent + - country + - device-type + - operating-system + - browser + example: country + type: string + timeframe: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context_timeframe' + type: object + analytics_metrics_breakdown_response_data: + example: + dimensionValue: dimensionValue + metricValue: 0.8008282 + properties: + dimensionValue: + description: Returns a specific value for the dimension you selected, based + on the data. For example if you select `continent` as a dimension, then + `dimensionValue` returns values like `EU` or "AZ". + type: string + metricValue: + description: Returns the data for a specific dimension value. + format: float + type: number + type: object + analytics_metrics_over_time_response_context: + example: + timeframe: + from: 2024-05-28T11:15:07Z + to: 2024-05-29T11:15:07Z + metric: impression + interval: day + properties: + metric: + description: Returns the metric you selected. + enum: + - play + - play-rate + - start + - end + - impression + example: impression + type: string + interval: + description: Returns the interval you selected. + enum: + - hour + - day + example: day + type: string + timeframe: + $ref: '#/components/schemas/analytics_aggregated_metrics_response_context_timeframe' + type: object + analytics_metrics_over_time_response_data: + example: + emittedAt: emittedAt + metricValue: 0.8008282 + properties: + emittedAt: + description: Returns the timestamp of the event that belongs to a specific + metric in ATOM date-time format. For example, if you set `play` with an + `hour` interval in your request, then `emittedAt` returns the hourly timestamps + of every play event within the timeframe you defined. + type: string + metricValue: + description: Returns the data for a specific metric value. + format: float + type: number + type: object video_status_ingest_receivedParts: properties: parts: diff --git a/api_analytics.go b/api_analytics.go index c749010..8153120 100644 --- a/api_analytics.go +++ b/api_analytics.go @@ -131,8 +131,14 @@ type AnalyticsService struct { * GetLiveStreamsPlays Get play events for live stream * Retrieve filtered analytics about the number of plays for your live streams in a project. + + +This endpoint will be deprecated with the release of Analytics v2.0. + + + * @return AnalyticsApiGetLiveStreamsPlaysRequest - */ +*/ func (s *AnalyticsService) GetLiveStreamsPlays(r AnalyticsApiGetLiveStreamsPlaysRequest) (*AnalyticsPlaysResponse, error) { @@ -143,9 +149,15 @@ func (s *AnalyticsService) GetLiveStreamsPlays(r AnalyticsApiGetLiveStreamsPlays /* * GetLiveStreamsPlays Get play events for live stream * Retrieve filtered analytics about the number of plays for your live streams in a project. + + + +This endpoint will be deprecated with the release of Analytics v2.0. + + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return AnalyticsApiGetLiveStreamsPlaysRequest - */ +*/ func (s *AnalyticsService) GetLiveStreamsPlaysWithContext(ctx context.Context, r AnalyticsApiGetLiveStreamsPlaysRequest) (*AnalyticsPlaysResponse, error) { var localVarPostBody interface{} @@ -190,8 +202,14 @@ func (s *AnalyticsService) GetLiveStreamsPlaysWithContext(ctx context.Context, r * GetVideosPlays Get play events for video * Retrieve filtered analytics about the number of plays for your videos in a project. + + +This endpoint will be deprecated with the release of Analytics v2.0. + + + * @return AnalyticsApiGetVideosPlaysRequest - */ +*/ func (s *AnalyticsService) GetVideosPlays(r AnalyticsApiGetVideosPlaysRequest) (*AnalyticsPlaysResponse, error) { @@ -202,9 +220,15 @@ func (s *AnalyticsService) GetVideosPlays(r AnalyticsApiGetVideosPlaysRequest) ( /* * GetVideosPlays Get play events for video * Retrieve filtered analytics about the number of plays for your videos in a project. + + + +This endpoint will be deprecated with the release of Analytics v2.0. + + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return AnalyticsApiGetVideosPlaysRequest - */ +*/ func (s *AnalyticsService) GetVideosPlaysWithContext(ctx context.Context, r AnalyticsApiGetVideosPlaysRequest) (*AnalyticsPlaysResponse, error) { var localVarPostBody interface{} diff --git a/api_analytics_v20_beta.go b/api_analytics_v20_beta.go new file mode 100644 index 0000000..52795ab --- /dev/null +++ b/api_analytics_v20_beta.go @@ -0,0 +1,328 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( + "context" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type AnalyticsV20BetaApiGetAggregatedMetricsRequest struct { + from *string + to *string + filterBy *string +} + +func (r AnalyticsV20BetaApiGetAggregatedMetricsRequest) From(from string) AnalyticsV20BetaApiGetAggregatedMetricsRequest { + r.from = &from + return r +} +func (r AnalyticsV20BetaApiGetAggregatedMetricsRequest) To(to string) AnalyticsV20BetaApiGetAggregatedMetricsRequest { + r.to = &to + return r +} +func (r AnalyticsV20BetaApiGetAggregatedMetricsRequest) FilterBy(filterBy string) AnalyticsV20BetaApiGetAggregatedMetricsRequest { + r.filterBy = &filterBy + return r +} + +type AnalyticsV20BetaApiGetMetricsBreakdownRequest struct { + from *string + to *string + filterBy *string +} + +func (r AnalyticsV20BetaApiGetMetricsBreakdownRequest) From(from string) AnalyticsV20BetaApiGetMetricsBreakdownRequest { + r.from = &from + return r +} +func (r AnalyticsV20BetaApiGetMetricsBreakdownRequest) To(to string) AnalyticsV20BetaApiGetMetricsBreakdownRequest { + r.to = &to + return r +} +func (r AnalyticsV20BetaApiGetMetricsBreakdownRequest) FilterBy(filterBy string) AnalyticsV20BetaApiGetMetricsBreakdownRequest { + r.filterBy = &filterBy + return r +} + +type AnalyticsV20BetaApiGetMetricsOverTimeRequest struct { + from *string + to *string + interval *string + filterBy *string +} + +func (r AnalyticsV20BetaApiGetMetricsOverTimeRequest) From(from string) AnalyticsV20BetaApiGetMetricsOverTimeRequest { + r.from = &from + return r +} +func (r AnalyticsV20BetaApiGetMetricsOverTimeRequest) To(to string) AnalyticsV20BetaApiGetMetricsOverTimeRequest { + r.to = &to + return r +} +func (r AnalyticsV20BetaApiGetMetricsOverTimeRequest) Interval(interval string) AnalyticsV20BetaApiGetMetricsOverTimeRequest { + r.interval = &interval + return r +} +func (r AnalyticsV20BetaApiGetMetricsOverTimeRequest) FilterBy(filterBy string) AnalyticsV20BetaApiGetMetricsOverTimeRequest { + r.filterBy = &filterBy + return r +} + +type AnalyticsV20BetaServiceI interface { + /* + * GetAggregatedMetrics Retrieve aggregated metrics + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + * @param aggregation Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + * @return AnalyticsV20BetaApiGetAggregatedMetricsRequest + */ + + GetAggregatedMetrics(metric string, aggregation string, r AnalyticsV20BetaApiGetAggregatedMetricsRequest) (*AnalyticsAggregatedMetricsResponse, error) + + /* + * GetAggregatedMetrics Retrieve aggregated metrics + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + * @param aggregation Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + * @return AnalyticsV20BetaApiGetAggregatedMetricsRequest + */ + + GetAggregatedMetricsWithContext(ctx context.Context, metric string, aggregation string, r AnalyticsV20BetaApiGetAggregatedMetricsRequest) (*AnalyticsAggregatedMetricsResponse, error) + + /* + * GetMetricsBreakdown Retrieve metrics in a breakdown of dimensions + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + * @param breakdown Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `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`. + * @return AnalyticsV20BetaApiGetMetricsBreakdownRequest + */ + + GetMetricsBreakdown(metric string, breakdown string, r AnalyticsV20BetaApiGetMetricsBreakdownRequest) (*AnalyticsMetricsBreakdownResponse, error) + + /* + * GetMetricsBreakdown Retrieve metrics in a breakdown of dimensions + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + * @param breakdown Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `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`. + * @return AnalyticsV20BetaApiGetMetricsBreakdownRequest + */ + + GetMetricsBreakdownWithContext(ctx context.Context, metric string, breakdown string, r AnalyticsV20BetaApiGetMetricsBreakdownRequest) (*AnalyticsMetricsBreakdownResponse, error) + + /* + * GetMetricsOverTime Retrieve metrics over time + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `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. + * @return AnalyticsV20BetaApiGetMetricsOverTimeRequest + */ + + GetMetricsOverTime(metric string, r AnalyticsV20BetaApiGetMetricsOverTimeRequest) (*AnalyticsMetricsOverTimeResponse, error) + + /* + * GetMetricsOverTime Retrieve metrics over time + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + * @return AnalyticsV20BetaApiGetMetricsOverTimeRequest + */ + + GetMetricsOverTimeWithContext(ctx context.Context, metric string, r AnalyticsV20BetaApiGetMetricsOverTimeRequest) (*AnalyticsMetricsOverTimeResponse, error) +} + +// AnalyticsV20BetaService communicating with the AnalyticsV20Beta +// endpoints of the api.video API +type AnalyticsV20BetaService struct { + client *Client +} + +/* + * GetAggregatedMetrics Retrieve aggregated metrics + * Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + * @param aggregation Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + * @return AnalyticsV20BetaApiGetAggregatedMetricsRequest + */ + +func (s *AnalyticsV20BetaService) GetAggregatedMetrics(metric string, aggregation string, r AnalyticsV20BetaApiGetAggregatedMetricsRequest) (*AnalyticsAggregatedMetricsResponse, error) { + + return s.GetAggregatedMetricsWithContext(context.Background(), metric, aggregation, r) + +} + +/* + * GetAggregatedMetrics Retrieve aggregated metrics + * Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. + * @param aggregation Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. + * @return AnalyticsV20BetaApiGetAggregatedMetricsRequest + */ + +func (s *AnalyticsV20BetaService) GetAggregatedMetricsWithContext(ctx context.Context, metric string, aggregation string, r AnalyticsV20BetaApiGetAggregatedMetricsRequest) (*AnalyticsAggregatedMetricsResponse, error) { + var localVarPostBody interface{} + + localVarPath := "/data/metrics/{metric}/{aggregation}" + localVarPath = strings.Replace(localVarPath, "{"+"metric"+"}", url.PathEscape(parameterToString(metric, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"aggregation"+"}", url.PathEscape(parameterToString(aggregation, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + if r.from != nil { + localVarQueryParams.Add("from", parameterToString(*r.from, "")) + } + if r.to != nil { + localVarQueryParams.Add("to", parameterToString(*r.to, "")) + } + if r.filterBy != nil { + localVarQueryParams.Add("filterBy", parameterToString(*r.filterBy, "")) + } + + req, err := s.client.prepareRequest(ctx, http.MethodGet, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(AnalyticsAggregatedMetricsResponse) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} + +/* + * GetMetricsBreakdown Retrieve metrics in a breakdown of dimensions + * Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + * @param breakdown Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `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`. + * @return AnalyticsV20BetaApiGetMetricsBreakdownRequest + */ + +func (s *AnalyticsV20BetaService) GetMetricsBreakdown(metric string, breakdown string, r AnalyticsV20BetaApiGetMetricsBreakdownRequest) (*AnalyticsMetricsBreakdownResponse, error) { + + return s.GetMetricsBreakdownWithContext(context.Background(), metric, breakdown, r) + +} + +/* + * GetMetricsBreakdown Retrieve metrics in a breakdown of dimensions + * Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + * @param breakdown Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. These are the available dimensions: - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `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`. + * @return AnalyticsV20BetaApiGetMetricsBreakdownRequest + */ + +func (s *AnalyticsV20BetaService) GetMetricsBreakdownWithContext(ctx context.Context, metric string, breakdown string, r AnalyticsV20BetaApiGetMetricsBreakdownRequest) (*AnalyticsMetricsBreakdownResponse, error) { + var localVarPostBody interface{} + + localVarPath := "/data/buckets/{metric}/{breakdown}" + localVarPath = strings.Replace(localVarPath, "{"+"metric"+"}", url.PathEscape(parameterToString(metric, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"breakdown"+"}", url.PathEscape(parameterToString(breakdown, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + if r.from != nil { + localVarQueryParams.Add("from", parameterToString(*r.from, "")) + } + if r.to != nil { + localVarQueryParams.Add("to", parameterToString(*r.to, "")) + } + if r.filterBy != nil { + localVarQueryParams.Add("filterBy", parameterToString(*r.filterBy, "")) + } + + req, err := s.client.prepareRequest(ctx, http.MethodGet, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(AnalyticsMetricsBreakdownResponse) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} + +/* + * GetMetricsOverTime Retrieve metrics over time + * Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred + + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + * @return AnalyticsV20BetaApiGetMetricsOverTimeRequest + */ + +func (s *AnalyticsV20BetaService) GetMetricsOverTime(metric string, r AnalyticsV20BetaApiGetMetricsOverTimeRequest) (*AnalyticsMetricsOverTimeResponse, error) { + + return s.GetMetricsOverTimeWithContext(context.Background(), metric, r) + +} + +/* + * GetMetricsOverTime Retrieve metrics over time + * Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param metric Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. - `start` is the number of times playback was started. - `end` is the number of times playback has ended with the content watch until the end. - `impression` is the number of times your content has been loaded and was ready for playback. + * @return AnalyticsV20BetaApiGetMetricsOverTimeRequest + */ + +func (s *AnalyticsV20BetaService) GetMetricsOverTimeWithContext(ctx context.Context, metric string, r AnalyticsV20BetaApiGetMetricsOverTimeRequest) (*AnalyticsMetricsOverTimeResponse, error) { + var localVarPostBody interface{} + + localVarPath := "/data/timeseries/{metric}" + localVarPath = strings.Replace(localVarPath, "{"+"metric"+"}", url.PathEscape(parameterToString(metric, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + if r.from != nil { + localVarQueryParams.Add("from", parameterToString(*r.from, "")) + } + if r.to != nil { + localVarQueryParams.Add("to", parameterToString(*r.to, "")) + } + if r.interval != nil { + localVarQueryParams.Add("interval", parameterToString(*r.interval, "")) + } + if r.filterBy != nil { + localVarQueryParams.Add("filterBy", parameterToString(*r.filterBy, "")) + } + + req, err := s.client.prepareRequest(ctx, http.MethodGet, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(AnalyticsMetricsOverTimeResponse) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} diff --git a/client.go b/client.go index 5f15b26..1db89b6 100644 --- a/client.go +++ b/client.go @@ -32,6 +32,7 @@ type Client struct { AdvancedAuthentication AdvancedAuthenticationServiceI Analytics AnalyticsServiceI + AnalyticsV20Beta AnalyticsV20BetaServiceI Captions CaptionsServiceI Chapters ChaptersServiceI LiveStreams LiveStreamsServiceI @@ -179,6 +180,7 @@ func (cb *Builder) Build() *Client { c.AdvancedAuthentication = &AdvancedAuthenticationService{client: c} c.Analytics = &AnalyticsService{client: c} + c.AnalyticsV20Beta = &AnalyticsV20BetaService{client: c} c.Captions = &CaptionsService{client: c} c.Chapters = &ChaptersService{client: c} c.LiveStreams = &LiveStreamsService{client: c} diff --git a/docs/AnalyticsAggregatedMetricsResponse.md b/docs/AnalyticsAggregatedMetricsResponse.md new file mode 100644 index 0000000..08be642 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponse.md @@ -0,0 +1,72 @@ +# AnalyticsAggregatedMetricsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**Data** | **float32** | | + +## Methods + +### NewAnalyticsAggregatedMetricsResponse + +`func NewAnalyticsAggregatedMetricsResponse(context AnalyticsAggregatedMetricsResponseContext, data float32, ) *AnalyticsAggregatedMetricsResponse` + +NewAnalyticsAggregatedMetricsResponse instantiates a new AnalyticsAggregatedMetricsResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsAggregatedMetricsResponseWithDefaults + +`func NewAnalyticsAggregatedMetricsResponseWithDefaults() *AnalyticsAggregatedMetricsResponse` + +NewAnalyticsAggregatedMetricsResponseWithDefaults instantiates a new AnalyticsAggregatedMetricsResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContext + +`func (o *AnalyticsAggregatedMetricsResponse) GetContext() AnalyticsAggregatedMetricsResponseContext` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *AnalyticsAggregatedMetricsResponse) GetContextOk() (*AnalyticsAggregatedMetricsResponseContext, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *AnalyticsAggregatedMetricsResponse) SetContext(v AnalyticsAggregatedMetricsResponseContext)` + +SetContext sets Context field to given value. + + +### GetData + +`func (o *AnalyticsAggregatedMetricsResponse) GetData() float32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AnalyticsAggregatedMetricsResponse) GetDataOk() (*float32, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *AnalyticsAggregatedMetricsResponse) SetData(v float32)` + +SetData sets Data field to given value. + + + +[[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..60b1728 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContext.md @@ -0,0 +1,108 @@ +# AnalyticsAggregatedMetricsResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | Pointer to **string** | Returns the metric you selected. | [optional] +**Aggregation** | Pointer to **string** | Returns the aggregation you selected. | [optional] +**Timeframe** | Pointer to [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +## Methods + +### NewAnalyticsAggregatedMetricsResponseContext + +`func NewAnalyticsAggregatedMetricsResponseContext() *AnalyticsAggregatedMetricsResponseContext` + +NewAnalyticsAggregatedMetricsResponseContext instantiates a new AnalyticsAggregatedMetricsResponseContext object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsAggregatedMetricsResponseContextWithDefaults + +`func NewAnalyticsAggregatedMetricsResponseContextWithDefaults() *AnalyticsAggregatedMetricsResponseContext` + +NewAnalyticsAggregatedMetricsResponseContextWithDefaults instantiates a new AnalyticsAggregatedMetricsResponseContext object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMetric + +`func (o *AnalyticsAggregatedMetricsResponseContext) GetMetric() string` + +GetMetric returns the Metric field if non-nil, zero value otherwise. + +### GetMetricOk + +`func (o *AnalyticsAggregatedMetricsResponseContext) GetMetricOk() (*string, bool)` + +GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetric + +`func (o *AnalyticsAggregatedMetricsResponseContext) SetMetric(v string)` + +SetMetric sets Metric field to given value. + +### HasMetric + +`func (o *AnalyticsAggregatedMetricsResponseContext) HasMetric() bool` + +HasMetric returns a boolean if a field has been set. + +### GetAggregation + +`func (o *AnalyticsAggregatedMetricsResponseContext) GetAggregation() string` + +GetAggregation returns the Aggregation field if non-nil, zero value otherwise. + +### GetAggregationOk + +`func (o *AnalyticsAggregatedMetricsResponseContext) GetAggregationOk() (*string, bool)` + +GetAggregationOk returns a tuple with the Aggregation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregation + +`func (o *AnalyticsAggregatedMetricsResponseContext) SetAggregation(v string)` + +SetAggregation sets Aggregation field to given value. + +### HasAggregation + +`func (o *AnalyticsAggregatedMetricsResponseContext) HasAggregation() bool` + +HasAggregation returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *AnalyticsAggregatedMetricsResponseContext) GetTimeframe() AnalyticsAggregatedMetricsResponseContextTimeframe` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *AnalyticsAggregatedMetricsResponseContext) GetTimeframeOk() (*AnalyticsAggregatedMetricsResponseContextTimeframe, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *AnalyticsAggregatedMetricsResponseContext) SetTimeframe(v AnalyticsAggregatedMetricsResponseContextTimeframe)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *AnalyticsAggregatedMetricsResponseContext) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + + +[[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..354c5e0 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md @@ -0,0 +1,82 @@ +# AnalyticsAggregatedMetricsResponseContextTimeframe + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | Pointer to **string** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] +**To** | Pointer to **string** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] + +## Methods + +### NewAnalyticsAggregatedMetricsResponseContextTimeframe + +`func NewAnalyticsAggregatedMetricsResponseContextTimeframe() *AnalyticsAggregatedMetricsResponseContextTimeframe` + +NewAnalyticsAggregatedMetricsResponseContextTimeframe instantiates a new AnalyticsAggregatedMetricsResponseContextTimeframe object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsAggregatedMetricsResponseContextTimeframeWithDefaults + +`func NewAnalyticsAggregatedMetricsResponseContextTimeframeWithDefaults() *AnalyticsAggregatedMetricsResponseContextTimeframe` + +NewAnalyticsAggregatedMetricsResponseContextTimeframeWithDefaults instantiates a new AnalyticsAggregatedMetricsResponseContextTimeframe object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFrom + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetFrom() string` + +GetFrom returns the From field if non-nil, zero value otherwise. + +### GetFromOk + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetFromOk() (*string, bool)` + +GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrom + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) SetFrom(v string)` + +SetFrom sets From field to given value. + +### HasFrom + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) HasFrom() bool` + +HasFrom returns a boolean if a field has been set. + +### GetTo + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetTo() string` + +GetTo returns the To field if non-nil, zero value otherwise. + +### GetToOk + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetToOk() (*string, bool)` + +GetToOk returns a tuple with the To field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTo + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) SetTo(v string)` + +SetTo sets To field to given value. + +### HasTo + +`func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) HasTo() bool` + +HasTo returns a boolean if a field has been set. + + +[[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/AnalyticsMetricsBreakdownResponse.md b/docs/AnalyticsMetricsBreakdownResponse.md new file mode 100644 index 0000000..3968666 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponse.md @@ -0,0 +1,93 @@ +# AnalyticsMetricsBreakdownResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Context** | [**AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | | +**Data** | [**[]AnalyticsMetricsBreakdownResponseData**](AnalyticsMetricsBreakdownResponseData.md) | Returns an array of dimensions and their respective metrics. | +**Pagination** | [**Pagination**](Pagination.md) | | + +## Methods + +### NewAnalyticsMetricsBreakdownResponse + +`func NewAnalyticsMetricsBreakdownResponse(context AnalyticsMetricsBreakdownResponseContext, data []AnalyticsMetricsBreakdownResponseData, pagination Pagination, ) *AnalyticsMetricsBreakdownResponse` + +NewAnalyticsMetricsBreakdownResponse instantiates a new AnalyticsMetricsBreakdownResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsMetricsBreakdownResponseWithDefaults + +`func NewAnalyticsMetricsBreakdownResponseWithDefaults() *AnalyticsMetricsBreakdownResponse` + +NewAnalyticsMetricsBreakdownResponseWithDefaults instantiates a new AnalyticsMetricsBreakdownResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContext + +`func (o *AnalyticsMetricsBreakdownResponse) GetContext() AnalyticsMetricsBreakdownResponseContext` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *AnalyticsMetricsBreakdownResponse) GetContextOk() (*AnalyticsMetricsBreakdownResponseContext, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *AnalyticsMetricsBreakdownResponse) SetContext(v AnalyticsMetricsBreakdownResponseContext)` + +SetContext sets Context field to given value. + + +### GetData + +`func (o *AnalyticsMetricsBreakdownResponse) GetData() []AnalyticsMetricsBreakdownResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AnalyticsMetricsBreakdownResponse) GetDataOk() (*[]AnalyticsMetricsBreakdownResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *AnalyticsMetricsBreakdownResponse) SetData(v []AnalyticsMetricsBreakdownResponseData)` + +SetData sets Data field to given value. + + +### GetPagination + +`func (o *AnalyticsMetricsBreakdownResponse) GetPagination() Pagination` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *AnalyticsMetricsBreakdownResponse) GetPaginationOk() (*Pagination, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *AnalyticsMetricsBreakdownResponse) SetPagination(v Pagination)` + +SetPagination sets Pagination field to given value. + + + +[[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..20081f0 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseContext.md @@ -0,0 +1,108 @@ +# AnalyticsMetricsBreakdownResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | Pointer to **string** | Returns the metric you selected. | [optional] +**Breakdown** | Pointer to **string** | Returns the dimension you selected. | [optional] +**Timeframe** | Pointer to [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +## Methods + +### NewAnalyticsMetricsBreakdownResponseContext + +`func NewAnalyticsMetricsBreakdownResponseContext() *AnalyticsMetricsBreakdownResponseContext` + +NewAnalyticsMetricsBreakdownResponseContext instantiates a new AnalyticsMetricsBreakdownResponseContext object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsMetricsBreakdownResponseContextWithDefaults + +`func NewAnalyticsMetricsBreakdownResponseContextWithDefaults() *AnalyticsMetricsBreakdownResponseContext` + +NewAnalyticsMetricsBreakdownResponseContextWithDefaults instantiates a new AnalyticsMetricsBreakdownResponseContext object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMetric + +`func (o *AnalyticsMetricsBreakdownResponseContext) GetMetric() string` + +GetMetric returns the Metric field if non-nil, zero value otherwise. + +### GetMetricOk + +`func (o *AnalyticsMetricsBreakdownResponseContext) GetMetricOk() (*string, bool)` + +GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetric + +`func (o *AnalyticsMetricsBreakdownResponseContext) SetMetric(v string)` + +SetMetric sets Metric field to given value. + +### HasMetric + +`func (o *AnalyticsMetricsBreakdownResponseContext) HasMetric() bool` + +HasMetric returns a boolean if a field has been set. + +### GetBreakdown + +`func (o *AnalyticsMetricsBreakdownResponseContext) GetBreakdown() string` + +GetBreakdown returns the Breakdown field if non-nil, zero value otherwise. + +### GetBreakdownOk + +`func (o *AnalyticsMetricsBreakdownResponseContext) GetBreakdownOk() (*string, bool)` + +GetBreakdownOk returns a tuple with the Breakdown field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBreakdown + +`func (o *AnalyticsMetricsBreakdownResponseContext) SetBreakdown(v string)` + +SetBreakdown sets Breakdown field to given value. + +### HasBreakdown + +`func (o *AnalyticsMetricsBreakdownResponseContext) HasBreakdown() bool` + +HasBreakdown returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *AnalyticsMetricsBreakdownResponseContext) GetTimeframe() AnalyticsAggregatedMetricsResponseContextTimeframe` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *AnalyticsMetricsBreakdownResponseContext) GetTimeframeOk() (*AnalyticsAggregatedMetricsResponseContextTimeframe, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *AnalyticsMetricsBreakdownResponseContext) SetTimeframe(v AnalyticsAggregatedMetricsResponseContextTimeframe)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *AnalyticsMetricsBreakdownResponseContext) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + + +[[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..8ebeac0 --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseData.md @@ -0,0 +1,82 @@ +# AnalyticsMetricsBreakdownResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DimensionValue** | Pointer to **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** | Pointer to **float32** | Returns the data for a specific dimension value. | [optional] + +## Methods + +### NewAnalyticsMetricsBreakdownResponseData + +`func NewAnalyticsMetricsBreakdownResponseData() *AnalyticsMetricsBreakdownResponseData` + +NewAnalyticsMetricsBreakdownResponseData instantiates a new AnalyticsMetricsBreakdownResponseData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsMetricsBreakdownResponseDataWithDefaults + +`func NewAnalyticsMetricsBreakdownResponseDataWithDefaults() *AnalyticsMetricsBreakdownResponseData` + +NewAnalyticsMetricsBreakdownResponseDataWithDefaults instantiates a new AnalyticsMetricsBreakdownResponseData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDimensionValue + +`func (o *AnalyticsMetricsBreakdownResponseData) GetDimensionValue() string` + +GetDimensionValue returns the DimensionValue field if non-nil, zero value otherwise. + +### GetDimensionValueOk + +`func (o *AnalyticsMetricsBreakdownResponseData) GetDimensionValueOk() (*string, bool)` + +GetDimensionValueOk returns a tuple with the DimensionValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDimensionValue + +`func (o *AnalyticsMetricsBreakdownResponseData) SetDimensionValue(v string)` + +SetDimensionValue sets DimensionValue field to given value. + +### HasDimensionValue + +`func (o *AnalyticsMetricsBreakdownResponseData) HasDimensionValue() bool` + +HasDimensionValue returns a boolean if a field has been set. + +### GetMetricValue + +`func (o *AnalyticsMetricsBreakdownResponseData) GetMetricValue() float32` + +GetMetricValue returns the MetricValue field if non-nil, zero value otherwise. + +### GetMetricValueOk + +`func (o *AnalyticsMetricsBreakdownResponseData) GetMetricValueOk() (*float32, bool)` + +GetMetricValueOk returns a tuple with the MetricValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetricValue + +`func (o *AnalyticsMetricsBreakdownResponseData) SetMetricValue(v float32)` + +SetMetricValue sets MetricValue field to given value. + +### HasMetricValue + +`func (o *AnalyticsMetricsBreakdownResponseData) HasMetricValue() bool` + +HasMetricValue returns a boolean if a field has been set. + + +[[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..68d18ae --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponse.md @@ -0,0 +1,93 @@ +# AnalyticsMetricsOverTimeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | | +**Data** | [**[]AnalyticsMetricsOverTimeResponseData**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . | +**Pagination** | [**Pagination**](Pagination.md) | | + +## Methods + +### NewAnalyticsMetricsOverTimeResponse + +`func NewAnalyticsMetricsOverTimeResponse(context AnalyticsMetricsOverTimeResponseContext, data []AnalyticsMetricsOverTimeResponseData, pagination Pagination, ) *AnalyticsMetricsOverTimeResponse` + +NewAnalyticsMetricsOverTimeResponse instantiates a new AnalyticsMetricsOverTimeResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsMetricsOverTimeResponseWithDefaults + +`func NewAnalyticsMetricsOverTimeResponseWithDefaults() *AnalyticsMetricsOverTimeResponse` + +NewAnalyticsMetricsOverTimeResponseWithDefaults instantiates a new AnalyticsMetricsOverTimeResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContext + +`func (o *AnalyticsMetricsOverTimeResponse) GetContext() AnalyticsMetricsOverTimeResponseContext` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *AnalyticsMetricsOverTimeResponse) GetContextOk() (*AnalyticsMetricsOverTimeResponseContext, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *AnalyticsMetricsOverTimeResponse) SetContext(v AnalyticsMetricsOverTimeResponseContext)` + +SetContext sets Context field to given value. + + +### GetData + +`func (o *AnalyticsMetricsOverTimeResponse) GetData() []AnalyticsMetricsOverTimeResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AnalyticsMetricsOverTimeResponse) GetDataOk() (*[]AnalyticsMetricsOverTimeResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *AnalyticsMetricsOverTimeResponse) SetData(v []AnalyticsMetricsOverTimeResponseData)` + +SetData sets Data field to given value. + + +### GetPagination + +`func (o *AnalyticsMetricsOverTimeResponse) GetPagination() Pagination` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *AnalyticsMetricsOverTimeResponse) GetPaginationOk() (*Pagination, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *AnalyticsMetricsOverTimeResponse) SetPagination(v Pagination)` + +SetPagination sets Pagination field to given value. + + + +[[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..5cd5ddf --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseContext.md @@ -0,0 +1,108 @@ +# AnalyticsMetricsOverTimeResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metric** | Pointer to **string** | Returns the metric you selected. | [optional] +**Interval** | Pointer to **string** | Returns the interval you selected. | [optional] +**Timeframe** | Pointer to [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +## Methods + +### NewAnalyticsMetricsOverTimeResponseContext + +`func NewAnalyticsMetricsOverTimeResponseContext() *AnalyticsMetricsOverTimeResponseContext` + +NewAnalyticsMetricsOverTimeResponseContext instantiates a new AnalyticsMetricsOverTimeResponseContext object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsMetricsOverTimeResponseContextWithDefaults + +`func NewAnalyticsMetricsOverTimeResponseContextWithDefaults() *AnalyticsMetricsOverTimeResponseContext` + +NewAnalyticsMetricsOverTimeResponseContextWithDefaults instantiates a new AnalyticsMetricsOverTimeResponseContext object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMetric + +`func (o *AnalyticsMetricsOverTimeResponseContext) GetMetric() string` + +GetMetric returns the Metric field if non-nil, zero value otherwise. + +### GetMetricOk + +`func (o *AnalyticsMetricsOverTimeResponseContext) GetMetricOk() (*string, bool)` + +GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetric + +`func (o *AnalyticsMetricsOverTimeResponseContext) SetMetric(v string)` + +SetMetric sets Metric field to given value. + +### HasMetric + +`func (o *AnalyticsMetricsOverTimeResponseContext) HasMetric() bool` + +HasMetric returns a boolean if a field has been set. + +### GetInterval + +`func (o *AnalyticsMetricsOverTimeResponseContext) GetInterval() string` + +GetInterval returns the Interval field if non-nil, zero value otherwise. + +### GetIntervalOk + +`func (o *AnalyticsMetricsOverTimeResponseContext) GetIntervalOk() (*string, bool)` + +GetIntervalOk returns a tuple with the Interval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInterval + +`func (o *AnalyticsMetricsOverTimeResponseContext) SetInterval(v string)` + +SetInterval sets Interval field to given value. + +### HasInterval + +`func (o *AnalyticsMetricsOverTimeResponseContext) HasInterval() bool` + +HasInterval returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *AnalyticsMetricsOverTimeResponseContext) GetTimeframe() AnalyticsAggregatedMetricsResponseContextTimeframe` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *AnalyticsMetricsOverTimeResponseContext) GetTimeframeOk() (*AnalyticsAggregatedMetricsResponseContextTimeframe, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *AnalyticsMetricsOverTimeResponseContext) SetTimeframe(v AnalyticsAggregatedMetricsResponseContextTimeframe)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *AnalyticsMetricsOverTimeResponseContext) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + + +[[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..1c58eb3 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseData.md @@ -0,0 +1,82 @@ +# AnalyticsMetricsOverTimeResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmittedAt** | Pointer to **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** | Pointer to **float32** | Returns the data for a specific metric value. | [optional] + +## Methods + +### NewAnalyticsMetricsOverTimeResponseData + +`func NewAnalyticsMetricsOverTimeResponseData() *AnalyticsMetricsOverTimeResponseData` + +NewAnalyticsMetricsOverTimeResponseData instantiates a new AnalyticsMetricsOverTimeResponseData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnalyticsMetricsOverTimeResponseDataWithDefaults + +`func NewAnalyticsMetricsOverTimeResponseDataWithDefaults() *AnalyticsMetricsOverTimeResponseData` + +NewAnalyticsMetricsOverTimeResponseDataWithDefaults instantiates a new AnalyticsMetricsOverTimeResponseData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEmittedAt + +`func (o *AnalyticsMetricsOverTimeResponseData) GetEmittedAt() string` + +GetEmittedAt returns the EmittedAt field if non-nil, zero value otherwise. + +### GetEmittedAtOk + +`func (o *AnalyticsMetricsOverTimeResponseData) GetEmittedAtOk() (*string, bool)` + +GetEmittedAtOk returns a tuple with the EmittedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmittedAt + +`func (o *AnalyticsMetricsOverTimeResponseData) SetEmittedAt(v string)` + +SetEmittedAt sets EmittedAt field to given value. + +### HasEmittedAt + +`func (o *AnalyticsMetricsOverTimeResponseData) HasEmittedAt() bool` + +HasEmittedAt returns a boolean if a field has been set. + +### GetMetricValue + +`func (o *AnalyticsMetricsOverTimeResponseData) GetMetricValue() float32` + +GetMetricValue returns the MetricValue field if non-nil, zero value otherwise. + +### GetMetricValueOk + +`func (o *AnalyticsMetricsOverTimeResponseData) GetMetricValueOk() (*float32, bool)` + +GetMetricValueOk returns a tuple with the MetricValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetricValue + +`func (o *AnalyticsMetricsOverTimeResponseData) SetMetricValue(v float32)` + +SetMetricValue sets MetricValue field to given value. + +### HasMetricValue + +`func (o *AnalyticsMetricsOverTimeResponseData) HasMetricValue() bool` + +HasMetricValue returns a boolean if a field has been set. + + +[[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/AnalyticsV20Beta.md b/docs/AnalyticsV20Beta.md new file mode 100644 index 0000000..534b82c --- /dev/null +++ b/docs/AnalyticsV20Beta.md @@ -0,0 +1,236 @@ +# \AnalyticsV20Beta + +All URIs are relative to *https://ws.api.video* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAggregatedMetrics**](AnalyticsV20Beta.md#GetAggregatedMetrics) | **Get** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics +[**GetMetricsBreakdown**](AnalyticsV20Beta.md#GetMetricsBreakdown) | **Get** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions +[**GetMetricsOverTime**](AnalyticsV20Beta.md#GetMetricsOverTime) | **Get** /data/timeseries/{metric} | Retrieve metrics over time + + + +## GetAggregatedMetrics + +> GetAggregatedMetrics(metric string, aggregation string, r AnalyticsV20BetaApiGetAggregatedMetricsRequest) (*AnalyticsAggregatedMetricsResponse, error) + + +> GetAggregatedMetricsWithContext(ctx context.Context, metric string, aggregation string, r AnalyticsV20BetaApiGetAggregatedMetricsRequest) (*AnalyticsAggregatedMetricsResponse, error) + + + +Retrieve aggregated metrics + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + req := apivideosdk.AnalyticsV20BetaApiGetAggregatedMetricsRequest{} + + req.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. + req.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. + req.From(time.Now()) // string | 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 365 days ago, and April 1st 2024. - 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`. + req.To(time.Now()) // string | 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. + req.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`. + + res, err := client.AnalyticsV20Beta.GetAggregatedMetrics(metric string, aggregation string, req) + + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsV20Beta.GetAggregatedMetrics``: %v\n", err) + } + // response from `GetAggregatedMetrics`: AnalyticsAggregatedMetricsResponse + fmt.Fprintf(os.Stdout, "Response from `AnalyticsV20Beta.GetAggregatedMetrics`: %v\n", res) +} +``` +### Path 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. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**from** | **string** | 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 365 days ago, and April 1st 2024. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` - The API ignores this parameter when you call `/data/metrics/play/total`. | +**to** | **string** | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | +**filterBy** | **string** | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | + +### Return type + +[**AnalyticsAggregatedMetricsResponse**](AnalyticsAggregatedMetricsResponse.md) + +[[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 + +> GetMetricsBreakdown(metric string, breakdown string, r AnalyticsV20BetaApiGetMetricsBreakdownRequest) (*AnalyticsMetricsBreakdownResponse, error) + + +> GetMetricsBreakdownWithContext(ctx context.Context, metric string, breakdown string, r AnalyticsV20BetaApiGetMetricsBreakdownRequest) (*AnalyticsMetricsBreakdownResponse, error) + + + +Retrieve metrics in a breakdown of dimensions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + req := apivideosdk.AnalyticsV20BetaApiGetMetricsBreakdownRequest{} + + req.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. + req.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`. + req.From(time.Now()) // string | 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 365 days ago, and April 1st 2024. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + req.To(time.Now()) // string | 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. + req.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`. + + res, err := client.AnalyticsV20Beta.GetMetricsBreakdown(metric string, breakdown string, req) + + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsV20Beta.GetMetricsBreakdown``: %v\n", err) + } + // response from `GetMetricsBreakdown`: AnalyticsMetricsBreakdownResponse + fmt.Fprintf(os.Stdout, "Response from `AnalyticsV20Beta.GetMetricsBreakdown`: %v\n", res) +} +``` +### Path 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. - `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. | +**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`. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**from** | **string** | 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 365 days ago, and April 1st 2024. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | +**to** | **string** | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | +**filterBy** | **string** | 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`. | + +### Return type + +[**AnalyticsMetricsBreakdownResponse**](AnalyticsMetricsBreakdownResponse.md) + +[[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) + + +## GetMetricsOverTime + +> GetMetricsOverTime(metric string, r AnalyticsV20BetaApiGetMetricsOverTimeRequest) (*AnalyticsMetricsOverTimeResponse, error) + + +> GetMetricsOverTimeWithContext(ctx context.Context, metric string, r AnalyticsV20BetaApiGetMetricsOverTimeRequest) (*AnalyticsMetricsOverTimeResponse, error) + + + +Retrieve metrics over time + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + req := apivideosdk.AnalyticsV20BetaApiGetMetricsOverTimeRequest{} + + req.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. + req.From(time.Now()) // string | 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 365 days ago, and April 1st 2024. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + req.To(time.Now()) // string | 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. + req.Interval(time.Now()) // 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`. + req.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`. + + res, err := client.AnalyticsV20Beta.GetMetricsOverTime(metric string, req) + + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsV20Beta.GetMetricsOverTime``: %v\n", err) + } + // response from `GetMetricsOverTime`: AnalyticsMetricsOverTimeResponse + fmt.Fprintf(os.Stdout, "Response from `AnalyticsV20Beta.GetMetricsOverTime`: %v\n", res) +} +``` +### Path 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. - `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. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**from** | **string** | 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 365 days ago, and April 1st 2024. - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` | +**to** | **string** | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | +**interval** | **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`. | +**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`. | + +### Return type + +[**AnalyticsMetricsOverTimeResponse**](AnalyticsMetricsOverTimeResponse.md) + +[[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/UnrecognizedRequestUrl.md b/docs/UnrecognizedRequestUrl.md new file mode 100644 index 0000000..6418e4a --- /dev/null +++ b/docs/UnrecognizedRequestUrl.md @@ -0,0 +1,108 @@ +# UnrecognizedRequestUrl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | A link to the error documentation. | [optional] +**Title** | Pointer to **string** | A description of the error that occurred. | [optional] +**Status** | Pointer to **int32** | The HTTP status code. | [optional] + +## Methods + +### NewUnrecognizedRequestUrl + +`func NewUnrecognizedRequestUrl() *UnrecognizedRequestUrl` + +NewUnrecognizedRequestUrl instantiates a new UnrecognizedRequestUrl object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUnrecognizedRequestUrlWithDefaults + +`func NewUnrecognizedRequestUrlWithDefaults() *UnrecognizedRequestUrl` + +NewUnrecognizedRequestUrlWithDefaults instantiates a new UnrecognizedRequestUrl object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *UnrecognizedRequestUrl) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UnrecognizedRequestUrl) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UnrecognizedRequestUrl) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UnrecognizedRequestUrl) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetTitle + +`func (o *UnrecognizedRequestUrl) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *UnrecognizedRequestUrl) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *UnrecognizedRequestUrl) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *UnrecognizedRequestUrl) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetStatus + +`func (o *UnrecognizedRequestUrl) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *UnrecognizedRequestUrl) GetStatusOk() (*int32, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *UnrecognizedRequestUrl) SetStatus(v int32)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *UnrecognizedRequestUrl) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[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/model_analytics_aggregated_metrics_response.go b/model_analytics_aggregated_metrics_response.go new file mode 100644 index 0000000..c246401 --- /dev/null +++ b/model_analytics_aggregated_metrics_response.go @@ -0,0 +1,115 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsAggregatedMetricsResponse struct for AnalyticsAggregatedMetricsResponse +type AnalyticsAggregatedMetricsResponse struct { + Context AnalyticsAggregatedMetricsResponseContext `json:"context"` + Data float32 `json:"data"` +} + +// NewAnalyticsAggregatedMetricsResponse instantiates a new AnalyticsAggregatedMetricsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsAggregatedMetricsResponse(context AnalyticsAggregatedMetricsResponseContext, data float32) *AnalyticsAggregatedMetricsResponse { + this := AnalyticsAggregatedMetricsResponse{} + this.Context = context + this.Data = data + return &this +} + +// NewAnalyticsAggregatedMetricsResponseWithDefaults instantiates a new AnalyticsAggregatedMetricsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsAggregatedMetricsResponseWithDefaults() *AnalyticsAggregatedMetricsResponse { + this := AnalyticsAggregatedMetricsResponse{} + return &this +} + +// GetContext returns the Context field value +func (o *AnalyticsAggregatedMetricsResponse) GetContext() AnalyticsAggregatedMetricsResponseContext { + if o == nil { + var ret AnalyticsAggregatedMetricsResponseContext + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *AnalyticsAggregatedMetricsResponse) GetContextOk() (*AnalyticsAggregatedMetricsResponseContext, bool) { + if o == nil { + return nil, false + } + return &o.Context, true +} + +// SetContext sets field value +func (o *AnalyticsAggregatedMetricsResponse) SetContext(v AnalyticsAggregatedMetricsResponseContext) { + o.Context = v +} + +// GetData returns the Data field value +func (o *AnalyticsAggregatedMetricsResponse) GetData() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *AnalyticsAggregatedMetricsResponse) GetDataOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *AnalyticsAggregatedMetricsResponse) SetData(v float32) { + o.Data = v +} + +type NullableAnalyticsAggregatedMetricsResponse struct { + value *AnalyticsAggregatedMetricsResponse + isSet bool +} + +func (v NullableAnalyticsAggregatedMetricsResponse) Get() *AnalyticsAggregatedMetricsResponse { + return v.value +} + +func (v *NullableAnalyticsAggregatedMetricsResponse) Set(val *AnalyticsAggregatedMetricsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsAggregatedMetricsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsAggregatedMetricsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsAggregatedMetricsResponse(val *AnalyticsAggregatedMetricsResponse) *NullableAnalyticsAggregatedMetricsResponse { + return &NullableAnalyticsAggregatedMetricsResponse{value: val, isSet: true} +} diff --git a/model_analytics_aggregated_metrics_response_context.go b/model_analytics_aggregated_metrics_response_context.go new file mode 100644 index 0000000..9234109 --- /dev/null +++ b/model_analytics_aggregated_metrics_response_context.go @@ -0,0 +1,164 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsAggregatedMetricsResponseContext struct for AnalyticsAggregatedMetricsResponseContext +type AnalyticsAggregatedMetricsResponseContext struct { + // Returns the metric you selected. + Metric *string `json:"metric,omitempty"` + // Returns the aggregation you selected. + Aggregation *string `json:"aggregation,omitempty"` + Timeframe *AnalyticsAggregatedMetricsResponseContextTimeframe `json:"timeframe,omitempty"` +} + +// NewAnalyticsAggregatedMetricsResponseContext instantiates a new AnalyticsAggregatedMetricsResponseContext object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsAggregatedMetricsResponseContext() *AnalyticsAggregatedMetricsResponseContext { + this := AnalyticsAggregatedMetricsResponseContext{} + return &this +} + +// NewAnalyticsAggregatedMetricsResponseContextWithDefaults instantiates a new AnalyticsAggregatedMetricsResponseContext object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsAggregatedMetricsResponseContextWithDefaults() *AnalyticsAggregatedMetricsResponseContext { + this := AnalyticsAggregatedMetricsResponseContext{} + return &this +} + +// GetMetric returns the Metric field value if set, zero value otherwise. +func (o *AnalyticsAggregatedMetricsResponseContext) GetMetric() string { + if o == nil || o.Metric == nil { + var ret string + return ret + } + return *o.Metric +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsAggregatedMetricsResponseContext) GetMetricOk() (*string, bool) { + if o == nil || o.Metric == nil { + return nil, false + } + return o.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (o *AnalyticsAggregatedMetricsResponseContext) HasMetric() bool { + if o != nil && o.Metric != nil { + return true + } + + return false +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *AnalyticsAggregatedMetricsResponseContext) SetMetric(v string) { + o.Metric = &v +} + +// GetAggregation returns the Aggregation field value if set, zero value otherwise. +func (o *AnalyticsAggregatedMetricsResponseContext) GetAggregation() string { + if o == nil || o.Aggregation == nil { + var ret string + return ret + } + return *o.Aggregation +} + +// GetAggregationOk returns a tuple with the Aggregation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsAggregatedMetricsResponseContext) GetAggregationOk() (*string, bool) { + if o == nil || o.Aggregation == nil { + return nil, false + } + return o.Aggregation, true +} + +// HasAggregation returns a boolean if a field has been set. +func (o *AnalyticsAggregatedMetricsResponseContext) HasAggregation() bool { + if o != nil && o.Aggregation != nil { + return true + } + + return false +} + +// SetAggregation gets a reference to the given string and assigns it to the Aggregation field. +func (o *AnalyticsAggregatedMetricsResponseContext) SetAggregation(v string) { + o.Aggregation = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *AnalyticsAggregatedMetricsResponseContext) GetTimeframe() AnalyticsAggregatedMetricsResponseContextTimeframe { + if o == nil || o.Timeframe == nil { + var ret AnalyticsAggregatedMetricsResponseContextTimeframe + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsAggregatedMetricsResponseContext) GetTimeframeOk() (*AnalyticsAggregatedMetricsResponseContextTimeframe, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *AnalyticsAggregatedMetricsResponseContext) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given AnalyticsAggregatedMetricsResponseContextTimeframe and assigns it to the Timeframe field. +func (o *AnalyticsAggregatedMetricsResponseContext) SetTimeframe(v AnalyticsAggregatedMetricsResponseContextTimeframe) { + o.Timeframe = &v +} + +type NullableAnalyticsAggregatedMetricsResponseContext struct { + value *AnalyticsAggregatedMetricsResponseContext + isSet bool +} + +func (v NullableAnalyticsAggregatedMetricsResponseContext) Get() *AnalyticsAggregatedMetricsResponseContext { + return v.value +} + +func (v *NullableAnalyticsAggregatedMetricsResponseContext) Set(val *AnalyticsAggregatedMetricsResponseContext) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsAggregatedMetricsResponseContext) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsAggregatedMetricsResponseContext) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsAggregatedMetricsResponseContext(val *AnalyticsAggregatedMetricsResponseContext) *NullableAnalyticsAggregatedMetricsResponseContext { + return &NullableAnalyticsAggregatedMetricsResponseContext{value: val, isSet: true} +} diff --git a/model_analytics_aggregated_metrics_response_context_timeframe.go b/model_analytics_aggregated_metrics_response_context_timeframe.go new file mode 100644 index 0000000..f19102f --- /dev/null +++ b/model_analytics_aggregated_metrics_response_context_timeframe.go @@ -0,0 +1,131 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsAggregatedMetricsResponseContextTimeframe Returns the starting and ending date-times of the period you want analytics for. +type AnalyticsAggregatedMetricsResponseContextTimeframe struct { + // Returns the starting date-time of the period you want analytics for in ATOM date-time format. + From *string `json:"from,omitempty"` + // Returns the starting date-time of the period you want analytics for in ATOM date-time format. + To *string `json:"to,omitempty"` +} + +// NewAnalyticsAggregatedMetricsResponseContextTimeframe instantiates a new AnalyticsAggregatedMetricsResponseContextTimeframe object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsAggregatedMetricsResponseContextTimeframe() *AnalyticsAggregatedMetricsResponseContextTimeframe { + this := AnalyticsAggregatedMetricsResponseContextTimeframe{} + return &this +} + +// NewAnalyticsAggregatedMetricsResponseContextTimeframeWithDefaults instantiates a new AnalyticsAggregatedMetricsResponseContextTimeframe object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsAggregatedMetricsResponseContextTimeframeWithDefaults() *AnalyticsAggregatedMetricsResponseContextTimeframe { + this := AnalyticsAggregatedMetricsResponseContextTimeframe{} + return &this +} + +// GetFrom returns the From field value if set, zero value otherwise. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetFrom() string { + if o == nil || o.From == nil { + var ret string + return ret + } + return *o.From +} + +// GetFromOk returns a tuple with the From field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetFromOk() (*string, bool) { + if o == nil || o.From == nil { + return nil, false + } + return o.From, true +} + +// HasFrom returns a boolean if a field has been set. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) HasFrom() bool { + if o != nil && o.From != nil { + return true + } + + return false +} + +// SetFrom gets a reference to the given string and assigns it to the From field. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) SetFrom(v string) { + o.From = &v +} + +// GetTo returns the To field value if set, zero value otherwise. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetTo() string { + if o == nil || o.To == nil { + var ret string + return ret + } + return *o.To +} + +// GetToOk returns a tuple with the To field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) GetToOk() (*string, bool) { + if o == nil || o.To == nil { + return nil, false + } + return o.To, true +} + +// HasTo returns a boolean if a field has been set. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) HasTo() bool { + if o != nil && o.To != nil { + return true + } + + return false +} + +// SetTo gets a reference to the given string and assigns it to the To field. +func (o *AnalyticsAggregatedMetricsResponseContextTimeframe) SetTo(v string) { + o.To = &v +} + +type NullableAnalyticsAggregatedMetricsResponseContextTimeframe struct { + value *AnalyticsAggregatedMetricsResponseContextTimeframe + isSet bool +} + +func (v NullableAnalyticsAggregatedMetricsResponseContextTimeframe) Get() *AnalyticsAggregatedMetricsResponseContextTimeframe { + return v.value +} + +func (v *NullableAnalyticsAggregatedMetricsResponseContextTimeframe) Set(val *AnalyticsAggregatedMetricsResponseContextTimeframe) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsAggregatedMetricsResponseContextTimeframe) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsAggregatedMetricsResponseContextTimeframe) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsAggregatedMetricsResponseContextTimeframe(val *AnalyticsAggregatedMetricsResponseContextTimeframe) *NullableAnalyticsAggregatedMetricsResponseContextTimeframe { + return &NullableAnalyticsAggregatedMetricsResponseContextTimeframe{value: val, isSet: true} +} diff --git a/model_analytics_metrics_breakdown_response.go b/model_analytics_metrics_breakdown_response.go new file mode 100644 index 0000000..d06551b --- /dev/null +++ b/model_analytics_metrics_breakdown_response.go @@ -0,0 +1,142 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsMetricsBreakdownResponse struct for AnalyticsMetricsBreakdownResponse +type AnalyticsMetricsBreakdownResponse struct { + Context AnalyticsMetricsBreakdownResponseContext `json:"context"` + // Returns an array of dimensions and their respective metrics. + Data []AnalyticsMetricsBreakdownResponseData `json:"data"` + Pagination Pagination `json:"pagination"` +} + +// NewAnalyticsMetricsBreakdownResponse instantiates a new AnalyticsMetricsBreakdownResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsMetricsBreakdownResponse(context AnalyticsMetricsBreakdownResponseContext, data []AnalyticsMetricsBreakdownResponseData, pagination Pagination) *AnalyticsMetricsBreakdownResponse { + this := AnalyticsMetricsBreakdownResponse{} + this.Context = context + this.Data = data + this.Pagination = pagination + return &this +} + +// NewAnalyticsMetricsBreakdownResponseWithDefaults instantiates a new AnalyticsMetricsBreakdownResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsMetricsBreakdownResponseWithDefaults() *AnalyticsMetricsBreakdownResponse { + this := AnalyticsMetricsBreakdownResponse{} + return &this +} + +// GetContext returns the Context field value +func (o *AnalyticsMetricsBreakdownResponse) GetContext() AnalyticsMetricsBreakdownResponseContext { + if o == nil { + var ret AnalyticsMetricsBreakdownResponseContext + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponse) GetContextOk() (*AnalyticsMetricsBreakdownResponseContext, bool) { + if o == nil { + return nil, false + } + return &o.Context, true +} + +// SetContext sets field value +func (o *AnalyticsMetricsBreakdownResponse) SetContext(v AnalyticsMetricsBreakdownResponseContext) { + o.Context = v +} + +// GetData returns the Data field value +func (o *AnalyticsMetricsBreakdownResponse) GetData() []AnalyticsMetricsBreakdownResponseData { + if o == nil { + var ret []AnalyticsMetricsBreakdownResponseData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponse) GetDataOk() (*[]AnalyticsMetricsBreakdownResponseData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *AnalyticsMetricsBreakdownResponse) SetData(v []AnalyticsMetricsBreakdownResponseData) { + o.Data = v +} + +// GetPagination returns the Pagination field value +func (o *AnalyticsMetricsBreakdownResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *AnalyticsMetricsBreakdownResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +type NullableAnalyticsMetricsBreakdownResponse struct { + value *AnalyticsMetricsBreakdownResponse + isSet bool +} + +func (v NullableAnalyticsMetricsBreakdownResponse) Get() *AnalyticsMetricsBreakdownResponse { + return v.value +} + +func (v *NullableAnalyticsMetricsBreakdownResponse) Set(val *AnalyticsMetricsBreakdownResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsMetricsBreakdownResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsMetricsBreakdownResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsMetricsBreakdownResponse(val *AnalyticsMetricsBreakdownResponse) *NullableAnalyticsMetricsBreakdownResponse { + return &NullableAnalyticsMetricsBreakdownResponse{value: val, isSet: true} +} diff --git a/model_analytics_metrics_breakdown_response_context.go b/model_analytics_metrics_breakdown_response_context.go new file mode 100644 index 0000000..479fcc5 --- /dev/null +++ b/model_analytics_metrics_breakdown_response_context.go @@ -0,0 +1,164 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsMetricsBreakdownResponseContext struct for AnalyticsMetricsBreakdownResponseContext +type AnalyticsMetricsBreakdownResponseContext struct { + // Returns the metric you selected. + Metric *string `json:"metric,omitempty"` + // Returns the dimension you selected. + Breakdown *string `json:"breakdown,omitempty"` + Timeframe *AnalyticsAggregatedMetricsResponseContextTimeframe `json:"timeframe,omitempty"` +} + +// NewAnalyticsMetricsBreakdownResponseContext instantiates a new AnalyticsMetricsBreakdownResponseContext object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsMetricsBreakdownResponseContext() *AnalyticsMetricsBreakdownResponseContext { + this := AnalyticsMetricsBreakdownResponseContext{} + return &this +} + +// NewAnalyticsMetricsBreakdownResponseContextWithDefaults instantiates a new AnalyticsMetricsBreakdownResponseContext object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsMetricsBreakdownResponseContextWithDefaults() *AnalyticsMetricsBreakdownResponseContext { + this := AnalyticsMetricsBreakdownResponseContext{} + return &this +} + +// GetMetric returns the Metric field value if set, zero value otherwise. +func (o *AnalyticsMetricsBreakdownResponseContext) GetMetric() string { + if o == nil || o.Metric == nil { + var ret string + return ret + } + return *o.Metric +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponseContext) GetMetricOk() (*string, bool) { + if o == nil || o.Metric == nil { + return nil, false + } + return o.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (o *AnalyticsMetricsBreakdownResponseContext) HasMetric() bool { + if o != nil && o.Metric != nil { + return true + } + + return false +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *AnalyticsMetricsBreakdownResponseContext) SetMetric(v string) { + o.Metric = &v +} + +// GetBreakdown returns the Breakdown field value if set, zero value otherwise. +func (o *AnalyticsMetricsBreakdownResponseContext) GetBreakdown() string { + if o == nil || o.Breakdown == nil { + var ret string + return ret + } + return *o.Breakdown +} + +// GetBreakdownOk returns a tuple with the Breakdown field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponseContext) GetBreakdownOk() (*string, bool) { + if o == nil || o.Breakdown == nil { + return nil, false + } + return o.Breakdown, true +} + +// HasBreakdown returns a boolean if a field has been set. +func (o *AnalyticsMetricsBreakdownResponseContext) HasBreakdown() bool { + if o != nil && o.Breakdown != nil { + return true + } + + return false +} + +// SetBreakdown gets a reference to the given string and assigns it to the Breakdown field. +func (o *AnalyticsMetricsBreakdownResponseContext) SetBreakdown(v string) { + o.Breakdown = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *AnalyticsMetricsBreakdownResponseContext) GetTimeframe() AnalyticsAggregatedMetricsResponseContextTimeframe { + if o == nil || o.Timeframe == nil { + var ret AnalyticsAggregatedMetricsResponseContextTimeframe + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponseContext) GetTimeframeOk() (*AnalyticsAggregatedMetricsResponseContextTimeframe, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *AnalyticsMetricsBreakdownResponseContext) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given AnalyticsAggregatedMetricsResponseContextTimeframe and assigns it to the Timeframe field. +func (o *AnalyticsMetricsBreakdownResponseContext) SetTimeframe(v AnalyticsAggregatedMetricsResponseContextTimeframe) { + o.Timeframe = &v +} + +type NullableAnalyticsMetricsBreakdownResponseContext struct { + value *AnalyticsMetricsBreakdownResponseContext + isSet bool +} + +func (v NullableAnalyticsMetricsBreakdownResponseContext) Get() *AnalyticsMetricsBreakdownResponseContext { + return v.value +} + +func (v *NullableAnalyticsMetricsBreakdownResponseContext) Set(val *AnalyticsMetricsBreakdownResponseContext) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsMetricsBreakdownResponseContext) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsMetricsBreakdownResponseContext) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsMetricsBreakdownResponseContext(val *AnalyticsMetricsBreakdownResponseContext) *NullableAnalyticsMetricsBreakdownResponseContext { + return &NullableAnalyticsMetricsBreakdownResponseContext{value: val, isSet: true} +} diff --git a/model_analytics_metrics_breakdown_response_data.go b/model_analytics_metrics_breakdown_response_data.go new file mode 100644 index 0000000..a280e91 --- /dev/null +++ b/model_analytics_metrics_breakdown_response_data.go @@ -0,0 +1,131 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsMetricsBreakdownResponseData struct for AnalyticsMetricsBreakdownResponseData +type AnalyticsMetricsBreakdownResponseData struct { + // 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\". + DimensionValue *string `json:"dimensionValue,omitempty"` + // Returns the data for a specific dimension value. + MetricValue *float32 `json:"metricValue,omitempty"` +} + +// NewAnalyticsMetricsBreakdownResponseData instantiates a new AnalyticsMetricsBreakdownResponseData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsMetricsBreakdownResponseData() *AnalyticsMetricsBreakdownResponseData { + this := AnalyticsMetricsBreakdownResponseData{} + return &this +} + +// NewAnalyticsMetricsBreakdownResponseDataWithDefaults instantiates a new AnalyticsMetricsBreakdownResponseData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsMetricsBreakdownResponseDataWithDefaults() *AnalyticsMetricsBreakdownResponseData { + this := AnalyticsMetricsBreakdownResponseData{} + return &this +} + +// GetDimensionValue returns the DimensionValue field value if set, zero value otherwise. +func (o *AnalyticsMetricsBreakdownResponseData) GetDimensionValue() string { + if o == nil || o.DimensionValue == nil { + var ret string + return ret + } + return *o.DimensionValue +} + +// GetDimensionValueOk returns a tuple with the DimensionValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponseData) GetDimensionValueOk() (*string, bool) { + if o == nil || o.DimensionValue == nil { + return nil, false + } + return o.DimensionValue, true +} + +// HasDimensionValue returns a boolean if a field has been set. +func (o *AnalyticsMetricsBreakdownResponseData) HasDimensionValue() bool { + if o != nil && o.DimensionValue != nil { + return true + } + + return false +} + +// SetDimensionValue gets a reference to the given string and assigns it to the DimensionValue field. +func (o *AnalyticsMetricsBreakdownResponseData) SetDimensionValue(v string) { + o.DimensionValue = &v +} + +// GetMetricValue returns the MetricValue field value if set, zero value otherwise. +func (o *AnalyticsMetricsBreakdownResponseData) GetMetricValue() float32 { + if o == nil || o.MetricValue == nil { + var ret float32 + return ret + } + return *o.MetricValue +} + +// GetMetricValueOk returns a tuple with the MetricValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsBreakdownResponseData) GetMetricValueOk() (*float32, bool) { + if o == nil || o.MetricValue == nil { + return nil, false + } + return o.MetricValue, true +} + +// HasMetricValue returns a boolean if a field has been set. +func (o *AnalyticsMetricsBreakdownResponseData) HasMetricValue() bool { + if o != nil && o.MetricValue != nil { + return true + } + + return false +} + +// SetMetricValue gets a reference to the given float32 and assigns it to the MetricValue field. +func (o *AnalyticsMetricsBreakdownResponseData) SetMetricValue(v float32) { + o.MetricValue = &v +} + +type NullableAnalyticsMetricsBreakdownResponseData struct { + value *AnalyticsMetricsBreakdownResponseData + isSet bool +} + +func (v NullableAnalyticsMetricsBreakdownResponseData) Get() *AnalyticsMetricsBreakdownResponseData { + return v.value +} + +func (v *NullableAnalyticsMetricsBreakdownResponseData) Set(val *AnalyticsMetricsBreakdownResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsMetricsBreakdownResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsMetricsBreakdownResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsMetricsBreakdownResponseData(val *AnalyticsMetricsBreakdownResponseData) *NullableAnalyticsMetricsBreakdownResponseData { + return &NullableAnalyticsMetricsBreakdownResponseData{value: val, isSet: true} +} diff --git a/model_analytics_metrics_over_time_response.go b/model_analytics_metrics_over_time_response.go new file mode 100644 index 0000000..eb2c48c --- /dev/null +++ b/model_analytics_metrics_over_time_response.go @@ -0,0 +1,142 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsMetricsOverTimeResponse struct for AnalyticsMetricsOverTimeResponse +type AnalyticsMetricsOverTimeResponse struct { + Context AnalyticsMetricsOverTimeResponseContext `json:"context"` + // Returns an array of metrics and the timestamps . + Data []AnalyticsMetricsOverTimeResponseData `json:"data"` + Pagination Pagination `json:"pagination"` +} + +// NewAnalyticsMetricsOverTimeResponse instantiates a new AnalyticsMetricsOverTimeResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsMetricsOverTimeResponse(context AnalyticsMetricsOverTimeResponseContext, data []AnalyticsMetricsOverTimeResponseData, pagination Pagination) *AnalyticsMetricsOverTimeResponse { + this := AnalyticsMetricsOverTimeResponse{} + this.Context = context + this.Data = data + this.Pagination = pagination + return &this +} + +// NewAnalyticsMetricsOverTimeResponseWithDefaults instantiates a new AnalyticsMetricsOverTimeResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsMetricsOverTimeResponseWithDefaults() *AnalyticsMetricsOverTimeResponse { + this := AnalyticsMetricsOverTimeResponse{} + return &this +} + +// GetContext returns the Context field value +func (o *AnalyticsMetricsOverTimeResponse) GetContext() AnalyticsMetricsOverTimeResponseContext { + if o == nil { + var ret AnalyticsMetricsOverTimeResponseContext + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponse) GetContextOk() (*AnalyticsMetricsOverTimeResponseContext, bool) { + if o == nil { + return nil, false + } + return &o.Context, true +} + +// SetContext sets field value +func (o *AnalyticsMetricsOverTimeResponse) SetContext(v AnalyticsMetricsOverTimeResponseContext) { + o.Context = v +} + +// GetData returns the Data field value +func (o *AnalyticsMetricsOverTimeResponse) GetData() []AnalyticsMetricsOverTimeResponseData { + if o == nil { + var ret []AnalyticsMetricsOverTimeResponseData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponse) GetDataOk() (*[]AnalyticsMetricsOverTimeResponseData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *AnalyticsMetricsOverTimeResponse) SetData(v []AnalyticsMetricsOverTimeResponseData) { + o.Data = v +} + +// GetPagination returns the Pagination field value +func (o *AnalyticsMetricsOverTimeResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *AnalyticsMetricsOverTimeResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +type NullableAnalyticsMetricsOverTimeResponse struct { + value *AnalyticsMetricsOverTimeResponse + isSet bool +} + +func (v NullableAnalyticsMetricsOverTimeResponse) Get() *AnalyticsMetricsOverTimeResponse { + return v.value +} + +func (v *NullableAnalyticsMetricsOverTimeResponse) Set(val *AnalyticsMetricsOverTimeResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsMetricsOverTimeResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsMetricsOverTimeResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsMetricsOverTimeResponse(val *AnalyticsMetricsOverTimeResponse) *NullableAnalyticsMetricsOverTimeResponse { + return &NullableAnalyticsMetricsOverTimeResponse{value: val, isSet: true} +} diff --git a/model_analytics_metrics_over_time_response_context.go b/model_analytics_metrics_over_time_response_context.go new file mode 100644 index 0000000..7e23f32 --- /dev/null +++ b/model_analytics_metrics_over_time_response_context.go @@ -0,0 +1,164 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsMetricsOverTimeResponseContext struct for AnalyticsMetricsOverTimeResponseContext +type AnalyticsMetricsOverTimeResponseContext struct { + // Returns the metric you selected. + Metric *string `json:"metric,omitempty"` + // Returns the interval you selected. + Interval *string `json:"interval,omitempty"` + Timeframe *AnalyticsAggregatedMetricsResponseContextTimeframe `json:"timeframe,omitempty"` +} + +// NewAnalyticsMetricsOverTimeResponseContext instantiates a new AnalyticsMetricsOverTimeResponseContext object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsMetricsOverTimeResponseContext() *AnalyticsMetricsOverTimeResponseContext { + this := AnalyticsMetricsOverTimeResponseContext{} + return &this +} + +// NewAnalyticsMetricsOverTimeResponseContextWithDefaults instantiates a new AnalyticsMetricsOverTimeResponseContext object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsMetricsOverTimeResponseContextWithDefaults() *AnalyticsMetricsOverTimeResponseContext { + this := AnalyticsMetricsOverTimeResponseContext{} + return &this +} + +// GetMetric returns the Metric field value if set, zero value otherwise. +func (o *AnalyticsMetricsOverTimeResponseContext) GetMetric() string { + if o == nil || o.Metric == nil { + var ret string + return ret + } + return *o.Metric +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponseContext) GetMetricOk() (*string, bool) { + if o == nil || o.Metric == nil { + return nil, false + } + return o.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (o *AnalyticsMetricsOverTimeResponseContext) HasMetric() bool { + if o != nil && o.Metric != nil { + return true + } + + return false +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *AnalyticsMetricsOverTimeResponseContext) SetMetric(v string) { + o.Metric = &v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *AnalyticsMetricsOverTimeResponseContext) GetInterval() string { + if o == nil || o.Interval == nil { + var ret string + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponseContext) GetIntervalOk() (*string, bool) { + if o == nil || o.Interval == nil { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *AnalyticsMetricsOverTimeResponseContext) HasInterval() bool { + if o != nil && o.Interval != nil { + return true + } + + return false +} + +// SetInterval gets a reference to the given string and assigns it to the Interval field. +func (o *AnalyticsMetricsOverTimeResponseContext) SetInterval(v string) { + o.Interval = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *AnalyticsMetricsOverTimeResponseContext) GetTimeframe() AnalyticsAggregatedMetricsResponseContextTimeframe { + if o == nil || o.Timeframe == nil { + var ret AnalyticsAggregatedMetricsResponseContextTimeframe + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponseContext) GetTimeframeOk() (*AnalyticsAggregatedMetricsResponseContextTimeframe, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *AnalyticsMetricsOverTimeResponseContext) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given AnalyticsAggregatedMetricsResponseContextTimeframe and assigns it to the Timeframe field. +func (o *AnalyticsMetricsOverTimeResponseContext) SetTimeframe(v AnalyticsAggregatedMetricsResponseContextTimeframe) { + o.Timeframe = &v +} + +type NullableAnalyticsMetricsOverTimeResponseContext struct { + value *AnalyticsMetricsOverTimeResponseContext + isSet bool +} + +func (v NullableAnalyticsMetricsOverTimeResponseContext) Get() *AnalyticsMetricsOverTimeResponseContext { + return v.value +} + +func (v *NullableAnalyticsMetricsOverTimeResponseContext) Set(val *AnalyticsMetricsOverTimeResponseContext) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsMetricsOverTimeResponseContext) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsMetricsOverTimeResponseContext) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsMetricsOverTimeResponseContext(val *AnalyticsMetricsOverTimeResponseContext) *NullableAnalyticsMetricsOverTimeResponseContext { + return &NullableAnalyticsMetricsOverTimeResponseContext{value: val, isSet: true} +} diff --git a/model_analytics_metrics_over_time_response_data.go b/model_analytics_metrics_over_time_response_data.go new file mode 100644 index 0000000..f815902 --- /dev/null +++ b/model_analytics_metrics_over_time_response_data.go @@ -0,0 +1,131 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// AnalyticsMetricsOverTimeResponseData struct for AnalyticsMetricsOverTimeResponseData +type AnalyticsMetricsOverTimeResponseData struct { + // 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. + EmittedAt *string `json:"emittedAt,omitempty"` + // Returns the data for a specific metric value. + MetricValue *float32 `json:"metricValue,omitempty"` +} + +// NewAnalyticsMetricsOverTimeResponseData instantiates a new AnalyticsMetricsOverTimeResponseData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnalyticsMetricsOverTimeResponseData() *AnalyticsMetricsOverTimeResponseData { + this := AnalyticsMetricsOverTimeResponseData{} + return &this +} + +// NewAnalyticsMetricsOverTimeResponseDataWithDefaults instantiates a new AnalyticsMetricsOverTimeResponseData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnalyticsMetricsOverTimeResponseDataWithDefaults() *AnalyticsMetricsOverTimeResponseData { + this := AnalyticsMetricsOverTimeResponseData{} + return &this +} + +// GetEmittedAt returns the EmittedAt field value if set, zero value otherwise. +func (o *AnalyticsMetricsOverTimeResponseData) GetEmittedAt() string { + if o == nil || o.EmittedAt == nil { + var ret string + return ret + } + return *o.EmittedAt +} + +// GetEmittedAtOk returns a tuple with the EmittedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponseData) GetEmittedAtOk() (*string, bool) { + if o == nil || o.EmittedAt == nil { + return nil, false + } + return o.EmittedAt, true +} + +// HasEmittedAt returns a boolean if a field has been set. +func (o *AnalyticsMetricsOverTimeResponseData) HasEmittedAt() bool { + if o != nil && o.EmittedAt != nil { + return true + } + + return false +} + +// SetEmittedAt gets a reference to the given string and assigns it to the EmittedAt field. +func (o *AnalyticsMetricsOverTimeResponseData) SetEmittedAt(v string) { + o.EmittedAt = &v +} + +// GetMetricValue returns the MetricValue field value if set, zero value otherwise. +func (o *AnalyticsMetricsOverTimeResponseData) GetMetricValue() float32 { + if o == nil || o.MetricValue == nil { + var ret float32 + return ret + } + return *o.MetricValue +} + +// GetMetricValueOk returns a tuple with the MetricValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnalyticsMetricsOverTimeResponseData) GetMetricValueOk() (*float32, bool) { + if o == nil || o.MetricValue == nil { + return nil, false + } + return o.MetricValue, true +} + +// HasMetricValue returns a boolean if a field has been set. +func (o *AnalyticsMetricsOverTimeResponseData) HasMetricValue() bool { + if o != nil && o.MetricValue != nil { + return true + } + + return false +} + +// SetMetricValue gets a reference to the given float32 and assigns it to the MetricValue field. +func (o *AnalyticsMetricsOverTimeResponseData) SetMetricValue(v float32) { + o.MetricValue = &v +} + +type NullableAnalyticsMetricsOverTimeResponseData struct { + value *AnalyticsMetricsOverTimeResponseData + isSet bool +} + +func (v NullableAnalyticsMetricsOverTimeResponseData) Get() *AnalyticsMetricsOverTimeResponseData { + return v.value +} + +func (v *NullableAnalyticsMetricsOverTimeResponseData) Set(val *AnalyticsMetricsOverTimeResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableAnalyticsMetricsOverTimeResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableAnalyticsMetricsOverTimeResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnalyticsMetricsOverTimeResponseData(val *AnalyticsMetricsOverTimeResponseData) *NullableAnalyticsMetricsOverTimeResponseData { + return &NullableAnalyticsMetricsOverTimeResponseData{value: val, isSet: true} +} diff --git a/model_unrecognized_request_url.go b/model_unrecognized_request_url.go new file mode 100644 index 0000000..3c4d6f8 --- /dev/null +++ b/model_unrecognized_request_url.go @@ -0,0 +1,165 @@ +/* + * api.video + * + * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// UnrecognizedRequestUrl struct for UnrecognizedRequestUrl +type UnrecognizedRequestUrl struct { + // A link to the error documentation. + Type *string `json:"type,omitempty"` + // A description of the error that occurred. + Title *string `json:"title,omitempty"` + // The HTTP status code. + Status *int32 `json:"status,omitempty"` +} + +// NewUnrecognizedRequestUrl instantiates a new UnrecognizedRequestUrl object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUnrecognizedRequestUrl() *UnrecognizedRequestUrl { + this := UnrecognizedRequestUrl{} + return &this +} + +// NewUnrecognizedRequestUrlWithDefaults instantiates a new UnrecognizedRequestUrl object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUnrecognizedRequestUrlWithDefaults() *UnrecognizedRequestUrl { + this := UnrecognizedRequestUrl{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UnrecognizedRequestUrl) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnrecognizedRequestUrl) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UnrecognizedRequestUrl) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UnrecognizedRequestUrl) SetType(v string) { + o.Type = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *UnrecognizedRequestUrl) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnrecognizedRequestUrl) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *UnrecognizedRequestUrl) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *UnrecognizedRequestUrl) SetTitle(v string) { + o.Title = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UnrecognizedRequestUrl) GetStatus() int32 { + if o == nil || o.Status == nil { + var ret int32 + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnrecognizedRequestUrl) GetStatusOk() (*int32, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UnrecognizedRequestUrl) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given int32 and assigns it to the Status field. +func (o *UnrecognizedRequestUrl) SetStatus(v int32) { + o.Status = &v +} + +type NullableUnrecognizedRequestUrl struct { + value *UnrecognizedRequestUrl + isSet bool +} + +func (v NullableUnrecognizedRequestUrl) Get() *UnrecognizedRequestUrl { + return v.value +} + +func (v *NullableUnrecognizedRequestUrl) Set(val *UnrecognizedRequestUrl) { + v.value = val + v.isSet = true +} + +func (v NullableUnrecognizedRequestUrl) IsSet() bool { + return v.isSet +} + +func (v *NullableUnrecognizedRequestUrl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUnrecognizedRequestUrl(val *UnrecognizedRequestUrl) *NullableUnrecognizedRequestUrl { + return &NullableUnrecognizedRequestUrl{value: val, isSet: true} +}