From bd5ea6f551b5f933787a7d76791c4ebb6446e96d Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Wed, 29 May 2024 22:02:38 +0000 Subject: [PATCH] [DO NOT MERGE] Add Watch Data endpoints to OpenAPI spec --- .openapi-generator/FILES | 22 ++ .../oas_apivideo.yaml-defaut-cli.sha256 | 2 +- README.md | 32 +- Sources/APIs/AnalyticsAPI.swift | 10 +- Sources/APIs/AnalyticsV20BetaAPI.swift | 316 ++++++++++++++++++ .../AnalyticsAggregatedMetricsResponse.swift | 36 ++ ...ticsAggregatedMetricsResponseContext.swift | 57 ++++ ...gatedMetricsResponseContextTimeframe.swift | 39 +++ .../AnalyticsMetricsBreakdownResponse.swift | 41 +++ ...yticsMetricsBreakdownResponseContext.swift | 58 ++++ ...nalyticsMetricsBreakdownResponseData.swift | 38 +++ .../AnalyticsMetricsOverTimeResponse.swift | 41 +++ ...lyticsMetricsOverTimeResponseContext.swift | 53 +++ ...AnalyticsMetricsOverTimeResponseData.swift | 38 +++ Sources/Models/UnrecognizedRequestUrl.swift | 43 +++ .../getAggregatedMetrics/responses/200.json | 11 + .../getAggregatedMetrics/responses/400-0.json | 7 + .../getAggregatedMetrics/responses/400-1.json | 7 + .../getAggregatedMetrics/responses/404.json | 5 + .../getAggregatedMetrics/responses/429.json | 5 + .../getMetricsBreakdown/responses/200.json | 31 ++ .../getMetricsBreakdown/responses/400-0.json | 7 + .../getMetricsBreakdown/responses/400-1.json | 7 + .../getMetricsBreakdown/responses/404.json | 5 + .../getMetricsBreakdown/responses/429.json | 5 + .../getMetricsOverTime/responses/200.json | 37 ++ .../getMetricsOverTime/responses/400-0.json | 7 + .../getMetricsOverTime/responses/400-1.json | 7 + .../getMetricsOverTime/responses/404.json | 5 + .../getMetricsOverTime/responses/429.json | 5 + docs/AnalyticsAPI.md | 4 +- docs/AnalyticsAggregatedMetricsResponse.md | 11 + ...alyticsAggregatedMetricsResponseContext.md | 12 + ...gregatedMetricsResponseContextTimeframe.md | 11 + docs/AnalyticsMetricsBreakdownResponse.md | 12 + ...nalyticsMetricsBreakdownResponseContext.md | 12 + docs/AnalyticsMetricsBreakdownResponseData.md | 11 + docs/AnalyticsMetricsOverTimeResponse.md | 12 + ...AnalyticsMetricsOverTimeResponseContext.md | 12 + docs/AnalyticsMetricsOverTimeResponseData.md | 11 + docs/AnalyticsV20BetaAPI.md | 191 +++++++++++ docs/UnrecognizedRequestUrl.md | 12 + 42 files changed, 1281 insertions(+), 7 deletions(-) create mode 100644 Sources/APIs/AnalyticsV20BetaAPI.swift create mode 100644 Sources/Models/AnalyticsAggregatedMetricsResponse.swift create mode 100644 Sources/Models/AnalyticsAggregatedMetricsResponseContext.swift create mode 100644 Sources/Models/AnalyticsAggregatedMetricsResponseContextTimeframe.swift create mode 100644 Sources/Models/AnalyticsMetricsBreakdownResponse.swift create mode 100644 Sources/Models/AnalyticsMetricsBreakdownResponseContext.swift create mode 100644 Sources/Models/AnalyticsMetricsBreakdownResponseData.swift create mode 100644 Sources/Models/AnalyticsMetricsOverTimeResponse.swift create mode 100644 Sources/Models/AnalyticsMetricsOverTimeResponseContext.swift create mode 100644 Sources/Models/AnalyticsMetricsOverTimeResponseData.swift create mode 100644 Sources/Models/UnrecognizedRequestUrl.swift create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/200.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-0.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-1.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/404.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/429.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/200.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-0.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-1.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/404.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/429.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/200.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-0.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-1.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/404.json create mode 100644 Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/429.json create mode 100644 docs/AnalyticsAggregatedMetricsResponse.md create mode 100644 docs/AnalyticsAggregatedMetricsResponseContext.md create mode 100644 docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md create mode 100644 docs/AnalyticsMetricsBreakdownResponse.md create mode 100644 docs/AnalyticsMetricsBreakdownResponseContext.md create mode 100644 docs/AnalyticsMetricsBreakdownResponseData.md create mode 100644 docs/AnalyticsMetricsOverTimeResponse.md create mode 100644 docs/AnalyticsMetricsOverTimeResponseContext.md create mode 100644 docs/AnalyticsMetricsOverTimeResponseData.md create mode 100644 docs/AnalyticsV20BetaAPI.md create mode 100644 docs/UnrecognizedRequestUrl.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5dd3179..25f0fab 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,6 +7,7 @@ Sources/APIHelper.swift Sources/APIs.swift Sources/APIs/AdvancedAuthenticationAPI.swift Sources/APIs/AnalyticsAPI.swift +Sources/APIs/AnalyticsV20BetaAPI.swift Sources/APIs/CaptionsAPI.swift Sources/APIs/ChaptersAPI.swift Sources/APIs/LiveStreamsAPI.swift @@ -26,7 +27,16 @@ Sources/JSONEncodingHelper.swift Sources/Models.swift Sources/Models/AccessToken.swift Sources/Models/AdditionalBadRequestErrors.swift +Sources/Models/AnalyticsAggregatedMetricsResponse.swift +Sources/Models/AnalyticsAggregatedMetricsResponseContext.swift +Sources/Models/AnalyticsAggregatedMetricsResponseContextTimeframe.swift Sources/Models/AnalyticsData.swift +Sources/Models/AnalyticsMetricsBreakdownResponse.swift +Sources/Models/AnalyticsMetricsBreakdownResponseContext.swift +Sources/Models/AnalyticsMetricsBreakdownResponseData.swift +Sources/Models/AnalyticsMetricsOverTimeResponse.swift +Sources/Models/AnalyticsMetricsOverTimeResponseContext.swift +Sources/Models/AnalyticsMetricsOverTimeResponseData.swift Sources/Models/AnalyticsPlays400Error.swift Sources/Models/AnalyticsPlaysResponse.swift Sources/Models/AuthenticatePayload.swift @@ -69,6 +79,7 @@ Sources/Models/RestreamsResponseObject.swift Sources/Models/TokenCreationPayload.swift Sources/Models/TokenListResponse.swift Sources/Models/TooManyRequests.swift +Sources/Models/UnrecognizedRequestUrl.swift Sources/Models/UploadToken.swift Sources/Models/Video.swift Sources/Models/VideoAssets.swift @@ -108,9 +119,19 @@ docs/AccessToken.md docs/AdditionalBadRequestErrors.md docs/AdvancedAuthenticationAPI.md docs/AnalyticsAPI.md +docs/AnalyticsAggregatedMetricsResponse.md +docs/AnalyticsAggregatedMetricsResponseContext.md +docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md docs/AnalyticsData.md +docs/AnalyticsMetricsBreakdownResponse.md +docs/AnalyticsMetricsBreakdownResponseContext.md +docs/AnalyticsMetricsBreakdownResponseData.md +docs/AnalyticsMetricsOverTimeResponse.md +docs/AnalyticsMetricsOverTimeResponseContext.md +docs/AnalyticsMetricsOverTimeResponseData.md docs/AnalyticsPlays400Error.md docs/AnalyticsPlaysResponse.md +docs/AnalyticsV20BetaAPI.md docs/AuthenticatePayload.md docs/BadRequest.md docs/BytesRange.md @@ -153,6 +174,7 @@ docs/RestreamsResponseObject.md docs/TokenCreationPayload.md docs/TokenListResponse.md docs/TooManyRequests.md +docs/UnrecognizedRequestUrl.md docs/UploadToken.md docs/UploadTokensAPI.md docs/Video.md diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 644fa0c..54fd7b4 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -d7b342ceb1a4805da9e3d6355384e34c1a99e1300d01cac3ae3218c5738f11f1 \ No newline at end of file +548f424dcead8e1cff88849a19d2f7339012ce69090abf66d12f7f30fa756e5d \ No newline at end of file diff --git a/README.md b/README.md index ca33ecd..6813d19 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ - [Documentation](#documentation) - [API Endpoints](#api-endpoints) - [AnalyticsAPI](#AnalyticsAPI) + - [AnalyticsV20BetaAPI](#AnalyticsV20BetaAPI) - [CaptionsAPI](#CaptionsAPI) - [ChaptersAPI](#ChaptersAPI) - [LiveStreamsAPI](#LiveStreamsAPI) @@ -104,8 +105,25 @@ AnalyticsAPI Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLiveStreamsPlays**](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsAPI.md#getLiveStreamsPlays) | **GET** /analytics/live-streams/plays | Get play events for live stream -[**getVideosPlays**](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsAPI.md#getVideosPlays) | **GET** /analytics/videos/plays | Get play events for video +**(deprecated)** [**getLiveStreamsPlays**](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsAPI.md#getLiveStreamsPlays) | **GET** /analytics/live-streams/plays | Get play events for live stream +**(deprecated)** [**getVideosPlays**](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsAPI.md#getVideosPlays) | **GET** /analytics/videos/plays | Get play events for video + + +#### AnalyticsV20BetaAPI + +##### Retrieve an instance of AnalyticsV20BetaAPI: + +```swift +AnalyticsV20BetaAPI +``` + +##### Endpoints + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAggregatedMetrics**](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsV20BetaAPI.md#getAggregatedMetrics) | **GET** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics +[**getMetricsBreakdown**](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsV20BetaAPI.md#getMetricsBreakdown) | **GET** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsV20BetaAPI.md#getMetricsOverTime) | **GET** /data/timeseries/{metric} | Retrieve metrics over time #### CaptionsAPI @@ -269,7 +287,16 @@ Method | HTTP request | Description - [AccessToken](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AccessToken.md) - [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AdditionalBadRequestErrors.md) + - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsAggregatedMetricsResponse.md) + - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContext.md) + - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md) - [AnalyticsData](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsData.md) + - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsMetricsBreakdownResponse.md) + - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsMetricsBreakdownResponseContext.md) + - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsMetricsBreakdownResponseData.md) + - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsMetricsOverTimeResponse.md) + - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsMetricsOverTimeResponseContext.md) + - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsMetricsOverTimeResponseData.md) - [AnalyticsPlays400Error](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsPlays400Error.md) - [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AnalyticsPlaysResponse.md) - [AuthenticatePayload](https://github.com/apivideo/api.video-swift-client/blob/main/docs/AuthenticatePayload.md) @@ -310,6 +337,7 @@ Method | HTTP request | Description - [TokenCreationPayload](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TooManyRequests.md) + - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-swift-client/blob/main/docs/UnrecognizedRequestUrl.md) - [UploadToken](https://github.com/apivideo/api.video-swift-client/blob/main/docs/UploadToken.md) - [Video](https://github.com/apivideo/api.video-swift-client/blob/main/docs/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoAssets.md) diff --git a/Sources/APIs/AnalyticsAPI.swift b/Sources/APIs/AnalyticsAPI.swift index c1acaa4..29ce947 100644 --- a/Sources/APIs/AnalyticsAPI.swift +++ b/Sources/APIs/AnalyticsAPI.swift @@ -36,6 +36,7 @@ open class AnalyticsAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects. */ + @available(*, deprecated, message: "This operation is deprecated.") @discardableResult open class func getLiveStreamsPlays(from: Date, dimension: DimensionGetLiveStreamsPlays, to: Date? = nil, filter: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: AnalyticsPlaysResponse?, _ error: Error?) -> Void)) -> RequestTask { return getLiveStreamsPlays(from: from, dimension: dimension, to: to, filter: filter, currentPage: currentPage, pageSize: pageSize, apiResponseQueue: apiResponseQueue) { result in @@ -60,6 +61,7 @@ open class AnalyticsAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result of the request (incl. headers). */ + @available(*, deprecated, message: "This operation is deprecated.") @discardableResult open class func getLiveStreamsPlays(from: Date, dimension: DimensionGetLiveStreamsPlays, to: Date? = nil, filter: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) -> RequestTask { return getLiveStreamsPlaysWithRequestBuilder(from: from, dimension: dimension, to: to, filter: filter, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue, completion) @@ -69,7 +71,7 @@ open class AnalyticsAPI { /** Get play events for live stream - GET /analytics/live-streams/plays - - Retrieve filtered analytics about the number of plays for your live streams in a project. + - 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. - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter from: (query) 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. - parameter dimension: (query) Use this query parameter to define the dimension that you want analytics for. - `liveStreamId`: Returns analytics based on the public live stream identifiers. - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. @@ -79,6 +81,7 @@ open class AnalyticsAPI { - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - returns: RequestBuilder */ + @available(*, deprecated, message: "This operation is deprecated.") internal class func getLiveStreamsPlaysWithRequestBuilder(from: Date, dimension: DimensionGetLiveStreamsPlays, to: Date? = nil, filter: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil) -> RequestBuilder { let localVariablePath = "/analytics/live-streams/plays" let localVariableURLString = ApiVideoClient.basePath + localVariablePath @@ -130,6 +133,7 @@ open class AnalyticsAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects. */ + @available(*, deprecated, message: "This operation is deprecated.") @discardableResult open class func getVideosPlays(from: Date, dimension: DimensionGetVideosPlays, to: Date? = nil, filter: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: AnalyticsPlaysResponse?, _ error: Error?) -> Void)) -> RequestTask { return getVideosPlays(from: from, dimension: dimension, to: to, filter: filter, currentPage: currentPage, pageSize: pageSize, apiResponseQueue: apiResponseQueue) { result in @@ -154,6 +158,7 @@ open class AnalyticsAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result of the request (incl. headers). */ + @available(*, deprecated, message: "This operation is deprecated.") @discardableResult open class func getVideosPlays(from: Date, dimension: DimensionGetVideosPlays, to: Date? = nil, filter: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) -> RequestTask { return getVideosPlaysWithRequestBuilder(from: from, dimension: dimension, to: to, filter: filter, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue, completion) @@ -163,7 +168,7 @@ open class AnalyticsAPI { /** Get play events for video - GET /analytics/videos/plays - - Retrieve filtered analytics about the number of plays for your videos in a project. + - 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. - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] - parameter from: (query) 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. - parameter dimension: (query) 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`. @@ -173,6 +178,7 @@ open class AnalyticsAPI { - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) - returns: RequestBuilder */ + @available(*, deprecated, message: "This operation is deprecated.") internal class func getVideosPlaysWithRequestBuilder(from: Date, dimension: DimensionGetVideosPlays, to: Date? = nil, filter: String? = nil, currentPage: Int? = nil, pageSize: Int? = nil) -> RequestBuilder { let localVariablePath = "/analytics/videos/plays" let localVariableURLString = ApiVideoClient.basePath + localVariablePath diff --git a/Sources/APIs/AnalyticsV20BetaAPI.swift b/Sources/APIs/AnalyticsV20BetaAPI.swift new file mode 100644 index 0000000..ba959f4 --- /dev/null +++ b/Sources/APIs/AnalyticsV20BetaAPI.swift @@ -0,0 +1,316 @@ +// +// AnalyticsV20BetaAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class AnalyticsV20BetaAPI { + + /** + * enum for parameter metric + */ + public enum MetricGetAggregatedMetrics: String, CaseIterable { + case play = "play" + case start = "start" + case end = "end" + case impression = "impression" + case impressionTime = "impression-time" + case watchTime = "watch-time" + } + + /** + * enum for parameter aggregation + */ + public enum AggregationGetAggregatedMetrics: String, CaseIterable { + case count = "count" + case rate = "rate" + case total = "total" + case average = "average" + case sum = "sum" + } + + /** + Retrieve aggregated metrics + + - parameter metric: (path) 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. + - parameter aggregation: (path) 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. + - parameter from: (query) 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`. (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects. + */ + @discardableResult + open class func getAggregatedMetrics(metric: MetricGetAggregatedMetrics, aggregation: AggregationGetAggregatedMetrics, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: AnalyticsAggregatedMetricsResponse?, _ error: Error?) -> Void)) -> RequestTask { + return getAggregatedMetrics(metric: metric, aggregation: aggregation, from: from, to: to, filterBy: filterBy, apiResponseQueue: apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Retrieve aggregated metrics + + - parameter metric: (path) 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. + - parameter aggregation: (path) 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. + - parameter from: (query) 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`. (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result of the request (incl. headers). + */ + @discardableResult + open class func getAggregatedMetrics(metric: MetricGetAggregatedMetrics, aggregation: AggregationGetAggregatedMetrics, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) -> RequestTask { + return getAggregatedMetricsWithRequestBuilder(metric: metric, aggregation: aggregation, from: from, to: to, filterBy: filterBy).execute(apiResponseQueue, completion) + } + + + /** + Retrieve aggregated metrics + - GET /data/metrics/{metric}/{aggregation} + - Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] + - parameter metric: (path) 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. + - parameter aggregation: (path) 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. + - parameter from: (query) 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`. (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - returns: RequestBuilder + */ + internal class func getAggregatedMetricsWithRequestBuilder(metric: MetricGetAggregatedMetrics, aggregation: AggregationGetAggregatedMetrics, from: Date? = nil, to: Date? = nil, filterBy: String? = nil) -> RequestBuilder { + var localVariablePath = "/data/metrics/{metric}/{aggregation}" + let metricPreEscape = "\(metric.rawValue)" + let metricPostEscape = metricPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{metric}", with: metricPostEscape, options: .literal, range: nil) + let aggregationPreEscape = "\(aggregation.rawValue)" + let aggregationPostEscape = aggregationPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{aggregation}", with: aggregationPostEscape, options: .literal, range: nil) + let localVariableURLString = ApiVideoClient.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "from": from?.encodeToJSON(), + "to": to?.encodeToJSON(), + "filterBy": filterBy?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = ApiVideoClient.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + + /** + * enum for parameter metric + */ + public enum MetricGetMetricsBreakdown: String, CaseIterable { + case play = "play" + case playRate = "play-rate" + case start = "start" + case end = "end" + case impression = "impression" + } + + /** + * enum for parameter breakdown + */ + public enum BreakdownGetMetricsBreakdown: String, CaseIterable { + case mediaId = "media-id" + case mediaType = "media-type" + case continent = "continent" + case country = "country" + case deviceType = "device-type" + case operatingSystem = "operating-system" + case browser = "browser" + } + + /** + Retrieve metrics in a breakdown of dimensions + + - parameter metric: (path) 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. + - parameter breakdown: (path) 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`. + - parameter from: (query) 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` (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects. + */ + @discardableResult + open class func getMetricsBreakdown(metric: MetricGetMetricsBreakdown, breakdown: BreakdownGetMetricsBreakdown, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: AnalyticsMetricsBreakdownResponse?, _ error: Error?) -> Void)) -> RequestTask { + return getMetricsBreakdown(metric: metric, breakdown: breakdown, from: from, to: to, filterBy: filterBy, apiResponseQueue: apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Retrieve metrics in a breakdown of dimensions + + - parameter metric: (path) 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. + - parameter breakdown: (path) 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`. + - parameter from: (query) 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` (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result of the request (incl. headers). + */ + @discardableResult + open class func getMetricsBreakdown(metric: MetricGetMetricsBreakdown, breakdown: BreakdownGetMetricsBreakdown, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) -> RequestTask { + return getMetricsBreakdownWithRequestBuilder(metric: metric, breakdown: breakdown, from: from, to: to, filterBy: filterBy).execute(apiResponseQueue, completion) + } + + + /** + Retrieve metrics in a breakdown of dimensions + - GET /data/buckets/{metric}/{breakdown} + - Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] + - parameter metric: (path) 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. + - parameter breakdown: (path) 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`. + - parameter from: (query) 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` (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - returns: RequestBuilder + */ + internal class func getMetricsBreakdownWithRequestBuilder(metric: MetricGetMetricsBreakdown, breakdown: BreakdownGetMetricsBreakdown, from: Date? = nil, to: Date? = nil, filterBy: String? = nil) -> RequestBuilder { + var localVariablePath = "/data/buckets/{metric}/{breakdown}" + let metricPreEscape = "\(metric.rawValue)" + let metricPostEscape = metricPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{metric}", with: metricPostEscape, options: .literal, range: nil) + let breakdownPreEscape = "\(breakdown.rawValue)" + let breakdownPostEscape = breakdownPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{breakdown}", with: breakdownPostEscape, options: .literal, range: nil) + let localVariableURLString = ApiVideoClient.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "from": from?.encodeToJSON(), + "to": to?.encodeToJSON(), + "filterBy": filterBy?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = ApiVideoClient.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + + /** + * enum for parameter metric + */ + public enum MetricGetMetricsOverTime: String, CaseIterable { + case play = "play" + case playRate = "play-rate" + case start = "start" + case end = "end" + case impression = "impression" + } + + /** + Retrieve metrics over time + + - parameter metric: (path) 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. + - parameter from: (query) 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` (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter interval: (query) Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects. + */ + @discardableResult + open class func getMetricsOverTime(metric: MetricGetMetricsOverTime, from: Date? = nil, to: Date? = nil, interval: Date? = nil, filterBy: String? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: AnalyticsMetricsOverTimeResponse?, _ error: Error?) -> Void)) -> RequestTask { + return getMetricsOverTime(metric: metric, from: from, to: to, interval: interval, filterBy: filterBy, apiResponseQueue: apiResponseQueue) { result in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Retrieve metrics over time + + - parameter metric: (path) 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. + - parameter from: (query) 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` (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter interval: (query) Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result of the request (incl. headers). + */ + @discardableResult + open class func getMetricsOverTime(metric: MetricGetMetricsOverTime, from: Date? = nil, to: Date? = nil, interval: Date? = nil, filterBy: String? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) -> RequestTask { + return getMetricsOverTimeWithRequestBuilder(metric: metric, from: from, to: to, interval: interval, filterBy: filterBy).execute(apiResponseQueue, completion) + } + + + /** + Retrieve metrics over time + - GET /data/timeseries/{metric} + - Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred + - responseHeaders: [X-RateLimit-Limit(Int), X-RateLimit-Remaining(Int), X-RateLimit-Retry-After(Int)] + - parameter metric: (path) 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. + - parameter from: (query) 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` (optional) + - parameter to: (query) Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) + - parameter interval: (query) Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) + - parameter filterBy: (query) Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + - returns: RequestBuilder + */ + internal class func getMetricsOverTimeWithRequestBuilder(metric: MetricGetMetricsOverTime, from: Date? = nil, to: Date? = nil, interval: Date? = nil, filterBy: String? = nil) -> RequestBuilder { + var localVariablePath = "/data/timeseries/{metric}" + let metricPreEscape = "\(metric.rawValue)" + let metricPostEscape = metricPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{metric}", with: metricPostEscape, options: .literal, range: nil) + let localVariableURLString = ApiVideoClient.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "from": from?.encodeToJSON(), + "to": to?.encodeToJSON(), + "interval": interval?.encodeToJSON(), + "filterBy": filterBy?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = ApiVideoClient.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + +} diff --git a/Sources/Models/AnalyticsAggregatedMetricsResponse.swift b/Sources/Models/AnalyticsAggregatedMetricsResponse.swift new file mode 100644 index 0000000..638694b --- /dev/null +++ b/Sources/Models/AnalyticsAggregatedMetricsResponse.swift @@ -0,0 +1,36 @@ +// +// AnalyticsAggregatedMetricsResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsAggregatedMetricsResponse: Codable, Hashable { + + public var context: AnalyticsAggregatedMetricsResponseContext + public var data: Float + + public init(context: AnalyticsAggregatedMetricsResponseContext, data: Float) { + self.context = context + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case context + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(context, forKey: .context) + try container.encode(data, forKey: .data) + } +} + diff --git a/Sources/Models/AnalyticsAggregatedMetricsResponseContext.swift b/Sources/Models/AnalyticsAggregatedMetricsResponseContext.swift new file mode 100644 index 0000000..b23b03d --- /dev/null +++ b/Sources/Models/AnalyticsAggregatedMetricsResponseContext.swift @@ -0,0 +1,57 @@ +// +// AnalyticsAggregatedMetricsResponseContext.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsAggregatedMetricsResponseContext: Codable, Hashable { + + public enum Metric: String, Codable, CaseIterable { + case play = "play" + case start = "start" + case end = "end" + case impression = "impression" + case impressionTime = "impression-time" + case watchTime = "watch-time" + } + public enum Aggregation: String, Codable, CaseIterable { + case count = "count" + case rate = "rate" + case total = "total" + case average = "average" + case sum = "sum" + } + /** Returns the metric you selected. */ + public var metric: Metric? + /** Returns the aggregation you selected. */ + public var aggregation: Aggregation? + public var timeframe: AnalyticsAggregatedMetricsResponseContextTimeframe? + + public init(metric: Metric? = nil, aggregation: Aggregation? = nil, timeframe: AnalyticsAggregatedMetricsResponseContextTimeframe? = nil) { + self.metric = metric + self.aggregation = aggregation + self.timeframe = timeframe + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case metric + case aggregation + case timeframe + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(metric, forKey: .metric) + try container.encodeIfPresent(aggregation, forKey: .aggregation) + try container.encodeIfPresent(timeframe, forKey: .timeframe) + } +} + diff --git a/Sources/Models/AnalyticsAggregatedMetricsResponseContextTimeframe.swift b/Sources/Models/AnalyticsAggregatedMetricsResponseContextTimeframe.swift new file mode 100644 index 0000000..015c796 --- /dev/null +++ b/Sources/Models/AnalyticsAggregatedMetricsResponseContextTimeframe.swift @@ -0,0 +1,39 @@ +// +// AnalyticsAggregatedMetricsResponseContextTimeframe.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Returns the starting and ending date-times of the period you want analytics for. */ +public struct AnalyticsAggregatedMetricsResponseContextTimeframe: Codable, Hashable { + + /** Returns the starting date-time of the period you want analytics for in ATOM date-time format. */ + public var from: Date? + /** Returns the starting date-time of the period you want analytics for in ATOM date-time format. */ + public var to: Date? + + public init(from: Date? = nil, to: Date? = nil) { + self.from = from + self.to = to + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case from + case to + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(from, forKey: .from) + try container.encodeIfPresent(to, forKey: .to) + } +} + diff --git a/Sources/Models/AnalyticsMetricsBreakdownResponse.swift b/Sources/Models/AnalyticsMetricsBreakdownResponse.swift new file mode 100644 index 0000000..44a5dbb --- /dev/null +++ b/Sources/Models/AnalyticsMetricsBreakdownResponse.swift @@ -0,0 +1,41 @@ +// +// AnalyticsMetricsBreakdownResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsMetricsBreakdownResponse: Codable, Hashable { + + public var context: AnalyticsMetricsBreakdownResponseContext + /** Returns an array of dimensions and their respective metrics. */ + public var data: [AnalyticsMetricsBreakdownResponseData] + public var pagination: Pagination + + public init(context: AnalyticsMetricsBreakdownResponseContext, data: [AnalyticsMetricsBreakdownResponseData], pagination: Pagination) { + self.context = context + self.data = data + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case context + case data + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(context, forKey: .context) + try container.encode(data, forKey: .data) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/Sources/Models/AnalyticsMetricsBreakdownResponseContext.swift b/Sources/Models/AnalyticsMetricsBreakdownResponseContext.swift new file mode 100644 index 0000000..43fe63e --- /dev/null +++ b/Sources/Models/AnalyticsMetricsBreakdownResponseContext.swift @@ -0,0 +1,58 @@ +// +// AnalyticsMetricsBreakdownResponseContext.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsMetricsBreakdownResponseContext: Codable, Hashable { + + public enum Metric: String, Codable, CaseIterable { + case play = "play" + case playRate = "play-rate" + case start = "start" + case end = "end" + case impression = "impression" + } + public enum Breakdown: String, Codable, CaseIterable { + case mediaId = "media-id" + case mediaType = "media-type" + case continent = "continent" + case country = "country" + case deviceType = "device-type" + case operatingSystem = "operating-system" + case browser = "browser" + } + /** Returns the metric you selected. */ + public var metric: Metric? + /** Returns the dimension you selected. */ + public var breakdown: Breakdown? + public var timeframe: AnalyticsAggregatedMetricsResponseContextTimeframe? + + public init(metric: Metric? = nil, breakdown: Breakdown? = nil, timeframe: AnalyticsAggregatedMetricsResponseContextTimeframe? = nil) { + self.metric = metric + self.breakdown = breakdown + self.timeframe = timeframe + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case metric + case breakdown + case timeframe + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(metric, forKey: .metric) + try container.encodeIfPresent(breakdown, forKey: .breakdown) + try container.encodeIfPresent(timeframe, forKey: .timeframe) + } +} + diff --git a/Sources/Models/AnalyticsMetricsBreakdownResponseData.swift b/Sources/Models/AnalyticsMetricsBreakdownResponseData.swift new file mode 100644 index 0000000..16a1a59 --- /dev/null +++ b/Sources/Models/AnalyticsMetricsBreakdownResponseData.swift @@ -0,0 +1,38 @@ +// +// AnalyticsMetricsBreakdownResponseData.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsMetricsBreakdownResponseData: Codable, Hashable { + + /** 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\". */ + public var dimensionValue: String? + /** Returns the data for a specific dimension value. */ + public var metricValue: Float? + + public init(dimensionValue: String? = nil, metricValue: Float? = nil) { + self.dimensionValue = dimensionValue + self.metricValue = metricValue + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case dimensionValue + case metricValue + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(dimensionValue, forKey: .dimensionValue) + try container.encodeIfPresent(metricValue, forKey: .metricValue) + } +} + diff --git a/Sources/Models/AnalyticsMetricsOverTimeResponse.swift b/Sources/Models/AnalyticsMetricsOverTimeResponse.swift new file mode 100644 index 0000000..8fd8276 --- /dev/null +++ b/Sources/Models/AnalyticsMetricsOverTimeResponse.swift @@ -0,0 +1,41 @@ +// +// AnalyticsMetricsOverTimeResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsMetricsOverTimeResponse: Codable, Hashable { + + public var context: AnalyticsMetricsOverTimeResponseContext + /** Returns an array of metrics and the timestamps . */ + public var data: [AnalyticsMetricsOverTimeResponseData] + public var pagination: Pagination + + public init(context: AnalyticsMetricsOverTimeResponseContext, data: [AnalyticsMetricsOverTimeResponseData], pagination: Pagination) { + self.context = context + self.data = data + self.pagination = pagination + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case context + case data + case pagination + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(context, forKey: .context) + try container.encode(data, forKey: .data) + try container.encode(pagination, forKey: .pagination) + } +} + diff --git a/Sources/Models/AnalyticsMetricsOverTimeResponseContext.swift b/Sources/Models/AnalyticsMetricsOverTimeResponseContext.swift new file mode 100644 index 0000000..a6062b8 --- /dev/null +++ b/Sources/Models/AnalyticsMetricsOverTimeResponseContext.swift @@ -0,0 +1,53 @@ +// +// AnalyticsMetricsOverTimeResponseContext.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsMetricsOverTimeResponseContext: Codable, Hashable { + + public enum Metric: String, Codable, CaseIterable { + case play = "play" + case playRate = "play-rate" + case start = "start" + case end = "end" + case impression = "impression" + } + public enum Interval: String, Codable, CaseIterable { + case hour = "hour" + case day = "day" + } + /** Returns the metric you selected. */ + public var metric: Metric? + /** Returns the interval you selected. */ + public var interval: Interval? + public var timeframe: AnalyticsAggregatedMetricsResponseContextTimeframe? + + public init(metric: Metric? = nil, interval: Interval? = nil, timeframe: AnalyticsAggregatedMetricsResponseContextTimeframe? = nil) { + self.metric = metric + self.interval = interval + self.timeframe = timeframe + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case metric + case interval + case timeframe + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(metric, forKey: .metric) + try container.encodeIfPresent(interval, forKey: .interval) + try container.encodeIfPresent(timeframe, forKey: .timeframe) + } +} + diff --git a/Sources/Models/AnalyticsMetricsOverTimeResponseData.swift b/Sources/Models/AnalyticsMetricsOverTimeResponseData.swift new file mode 100644 index 0000000..5ad195b --- /dev/null +++ b/Sources/Models/AnalyticsMetricsOverTimeResponseData.swift @@ -0,0 +1,38 @@ +// +// AnalyticsMetricsOverTimeResponseData.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AnalyticsMetricsOverTimeResponseData: Codable, Hashable { + + /** 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. */ + public var emittedAt: String? + /** Returns the data for a specific metric value. */ + public var metricValue: Float? + + public init(emittedAt: String? = nil, metricValue: Float? = nil) { + self.emittedAt = emittedAt + self.metricValue = metricValue + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case emittedAt + case metricValue + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(emittedAt, forKey: .emittedAt) + try container.encodeIfPresent(metricValue, forKey: .metricValue) + } +} + diff --git a/Sources/Models/UnrecognizedRequestUrl.swift b/Sources/Models/UnrecognizedRequestUrl.swift new file mode 100644 index 0000000..560c2e1 --- /dev/null +++ b/Sources/Models/UnrecognizedRequestUrl.swift @@ -0,0 +1,43 @@ +// +// UnrecognizedRequestUrl.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UnrecognizedRequestUrl: Codable, Hashable { + + /** A link to the error documentation. */ + public var type: String? + /** A description of the error that occurred. */ + public var title: String? + /** The HTTP status code. */ + public var status: Int? + + public init(type: String? = nil, title: String? = nil, status: Int? = nil) { + self.type = type + self.title = title + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case title + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(title, forKey: .title) + try container.encodeIfPresent(status, forKey: .status) + } +} + diff --git a/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/200.json b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/200.json new file mode 100644 index 0000000..aad4f98 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/200.json @@ -0,0 +1,11 @@ +{ + "context" : { + "metric" : "impression", + "aggregation" : "count", + "timeframe" : { + "from" : "2024-05-28T11:15:07+00:00", + "to" : "2024-05-29T11:15:07+00:00" + } + }, + "data" : 346.5 +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-0.json b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-0.json new file mode 100644 index 0000000..4cbfb11 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "This value must be of type string.", + "name" : "metric" +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-1.json b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-1.json new file mode 100644 index 0000000..061e505 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/400-1.json @@ -0,0 +1,7 @@ +{ + "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" +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/404.json b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/429.json b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getAggregatedMetrics/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/200.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/200.json new file mode 100644 index 0000000..f5cdba3 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/200.json @@ -0,0 +1,31 @@ +{ + "context" : { + "metric" : "play", + "breakdown" : "country", + "timeframe" : { + "from" : "2024-04-28T07:15:05+00:00", + "to" : "2024-05-29T11:25:37+00:00" + } + }, + "data" : [ { + "metricValue" : 7, + "dimensionValue" : "FR" + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 1, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 1, + "links" : [ { + "rel" : "self", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-0.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-0.json new file mode 100644 index 0000000..4cbfb11 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "This value must be of type string.", + "name" : "metric" +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-1.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-1.json new file mode 100644 index 0000000..061e505 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/400-1.json @@ -0,0 +1,7 @@ +{ + "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" +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/404.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/429.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsBreakdown/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/200.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/200.json new file mode 100644 index 0000000..b5a6342 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/200.json @@ -0,0 +1,37 @@ +{ + "context" : { + "metric" : "play", + "interval" : "hour", + "timeframe" : { + "from" : "2024-05-28T11:08:39+00:00", + "to" : "2024-05-29T11:08:39+00:00" + } + }, + "data" : [ { + "emittedAt" : "2024-05-29T07:00:00+00:00", + "metricValue" : 2 + }, { + "emittedAt" : "2024-05-29T08:00:00+00:00", + "metricValue" : 1 + }, { + "emittedAt" : "2024-05-29T09:00:00+00:00", + "metricValue" : 1 + } ], + "pagination" : { + "currentPage" : 1, + "currentPageItems" : 3, + "pageSize" : 25, + "pagesTotal" : 1, + "itemsTotal" : 3, + "links" : [ { + "rel" : "self", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "first", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + }, { + "rel" : "last", + "uri" : "/data/timeseries/play?currentPage=1&pageSize=25" + } ] + } +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-0.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-0.json new file mode 100644 index 0000000..4cbfb11 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "This value must be of type string.", + "name" : "metric" +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-1.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-1.json new file mode 100644 index 0000000..061e505 --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/400-1.json @@ -0,0 +1,7 @@ +{ + "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" +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/404.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/404.json new file mode 100644 index 0000000..a1ef71d --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/404.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/unrecognized-request-url", + "title" : "Unrecognized request URL.", + "status" : 404 +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/429.json b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/Tests/TestResources/payloads/analyticsv20beta/getMetricsOverTime/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/docs/AnalyticsAPI.md b/docs/AnalyticsAPI.md index 1392737..94182f2 100644 --- a/docs/AnalyticsAPI.md +++ b/docs/AnalyticsAPI.md @@ -16,7 +16,7 @@ Method | HTTP request | Description Get play events for live stream -Retrieve filtered analytics about the number of plays for your live streams in a project. +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. ### Example @@ -78,7 +78,7 @@ Name | Type | Description | Notes Get play events for video -Retrieve filtered analytics about the number of plays for your videos in a project. +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. ### Example diff --git a/docs/AnalyticsAggregatedMetricsResponse.md b/docs/AnalyticsAggregatedMetricsResponse.md new file mode 100644 index 0000000..8f572d2 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponse.md @@ -0,0 +1,11 @@ +# AnalyticsAggregatedMetricsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**data** | **Float** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsAggregatedMetricsResponseContext.md b/docs/AnalyticsAggregatedMetricsResponseContext.md new file mode 100644 index 0000000..856505a --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContext.md @@ -0,0 +1,12 @@ +# AnalyticsAggregatedMetricsResponseContext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | **String** | Returns the metric you selected. | [optional] +**aggregation** | **String** | Returns the aggregation you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md new file mode 100644 index 0000000..0608d85 --- /dev/null +++ b/docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md @@ -0,0 +1,11 @@ +# AnalyticsAggregatedMetricsResponseContextTimeframe + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **Date** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] +**to** | **Date** | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] + +[[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..05c099d --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponse.md @@ -0,0 +1,12 @@ +# AnalyticsMetricsBreakdownResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | | +**data** | [AnalyticsMetricsBreakdownResponseData] | Returns an array of dimensions and their respective metrics. | +**pagination** | [**Pagination**](Pagination.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsMetricsBreakdownResponseContext.md b/docs/AnalyticsMetricsBreakdownResponseContext.md new file mode 100644 index 0000000..80ba98b --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseContext.md @@ -0,0 +1,12 @@ +# AnalyticsMetricsBreakdownResponseContext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | **String** | Returns the metric you selected. | [optional] +**breakdown** | **String** | Returns the dimension you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsMetricsBreakdownResponseData.md b/docs/AnalyticsMetricsBreakdownResponseData.md new file mode 100644 index 0000000..286b50b --- /dev/null +++ b/docs/AnalyticsMetricsBreakdownResponseData.md @@ -0,0 +1,11 @@ +# AnalyticsMetricsBreakdownResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensionValue** | **String** | Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\". | [optional] +**metricValue** | **Float** | Returns the data for a specific dimension value. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsMetricsOverTimeResponse.md b/docs/AnalyticsMetricsOverTimeResponse.md new file mode 100644 index 0000000..7af3ebb --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponse.md @@ -0,0 +1,12 @@ +# AnalyticsMetricsOverTimeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | | +**data** | [AnalyticsMetricsOverTimeResponseData] | Returns an array of metrics and the timestamps . | +**pagination** | [**Pagination**](Pagination.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsMetricsOverTimeResponseContext.md b/docs/AnalyticsMetricsOverTimeResponseContext.md new file mode 100644 index 0000000..74f23c0 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseContext.md @@ -0,0 +1,12 @@ +# AnalyticsMetricsOverTimeResponseContext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | **String** | Returns the metric you selected. | [optional] +**interval** | **String** | Returns the interval you selected. | [optional] +**timeframe** | [**AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsMetricsOverTimeResponseData.md b/docs/AnalyticsMetricsOverTimeResponseData.md new file mode 100644 index 0000000..4900de4 --- /dev/null +++ b/docs/AnalyticsMetricsOverTimeResponseData.md @@ -0,0 +1,11 @@ +# AnalyticsMetricsOverTimeResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emittedAt** | **String** | Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. | [optional] +**metricValue** | **Float** | Returns the data for a specific metric value. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalyticsV20BetaAPI.md b/docs/AnalyticsV20BetaAPI.md new file mode 100644 index 0000000..860e085 --- /dev/null +++ b/docs/AnalyticsV20BetaAPI.md @@ -0,0 +1,191 @@ +# AnalyticsV20BetaAPI + +All URIs are relative to *https://ws.api.video* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAggregatedMetrics**](AnalyticsV20BetaAPI.md#getaggregatedmetrics) | **GET** /data/metrics/{metric}/{aggregation} | Retrieve aggregated metrics +[**getMetricsBreakdown**](AnalyticsV20BetaAPI.md#getmetricsbreakdown) | **GET** /data/buckets/{metric}/{breakdown} | Retrieve metrics in a breakdown of dimensions +[**getMetricsOverTime**](AnalyticsV20BetaAPI.md#getmetricsovertime) | **GET** /data/timeseries/{metric} | Retrieve metrics over time + + +# **getAggregatedMetrics** +```swift + open class func getAggregatedMetrics(metric: Metric_getAggregatedMetrics, aggregation: Aggregation_getAggregatedMetrics, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, completion: @escaping (_ data: AnalyticsAggregatedMetricsResponse?, _ error: Error?) -> Void) + open class func getAggregatedMetrics(metric: Metric_getAggregatedMetrics, aggregation: Aggregation_getAggregatedMetrics, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) +``` + +Retrieve aggregated metrics + +Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import ApiVideoClient + +let 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. +let 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. +let from = Date() // Date | 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`. (optional) +let to = Date() // Date | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +let filterBy = "filterBy_example" // String | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + +// Retrieve aggregated metrics +AnalyticsV20BetaAPI.getAggregatedMetrics(metric: metric, aggregation: aggregation, from: from, to: to, filterBy: filterBy) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metric** | **String** | Use this path parameter to select a metric that you want analytics for. - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. | + **aggregation** | **String** | Use this path parameter to define a way of collecting data for the metric that you want analytics for. - `count` returns the overall number of events for the `play` metric. - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. - `total` calculates the total number of events for the `play` metric. - `average` calculates an average value for the selected metric. - `sum` adds up the total value of the select metric. | + **from** | **Date** | 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`. | [optional] + **to** | **Date** | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The API ignores this parameter when you call `/data/metrics/play/total`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | **String** | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [optional] + +### Return type + +[**AnalyticsAggregatedMetricsResponse**](AnalyticsAggregatedMetricsResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +```swift + open class func getMetricsBreakdown(metric: Metric_getMetricsBreakdown, breakdown: Breakdown_getMetricsBreakdown, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, completion: @escaping (_ data: AnalyticsMetricsBreakdownResponse?, _ error: Error?) -> Void) + open class func getMetricsBreakdown(metric: Metric_getMetricsBreakdown, breakdown: Breakdown_getMetricsBreakdown, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) +``` + +Retrieve metrics in a breakdown of dimensions + +Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import ApiVideoClient + +let 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. +let 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`. +let from = Date() // Date | 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` (optional) +let to = Date() // Date | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +let filterBy = "filterBy_example" // String | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + +// Retrieve metrics in a breakdown of dimensions +AnalyticsV20BetaAPI.getMetricsBreakdown(metric: metric, breakdown: breakdown, from: from, to: to, filterBy: filterBy) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### 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`. | + **from** | **Date** | 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` | [optional] + **to** | **Date** | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **filterBy** | **String** | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [optional] + +### Return type + +[**AnalyticsMetricsBreakdownResponse**](AnalyticsMetricsBreakdownResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +```swift + open class func getMetricsOverTime(metric: Metric_getMetricsOverTime, from: Date? = nil, to: Date? = nil, interval: Date? = nil, filterBy: String? = nil, completion: @escaping (_ data: AnalyticsMetricsOverTimeResponse?, _ error: Error?) -> Void) + open class func getMetricsOverTime(metric: Metric_getMetricsOverTime, from: Date? = nil, to: Date? = nil, interval: Date? = nil, filterBy: String? = nil, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) +``` + +Retrieve metrics over time + +Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import ApiVideoClient + +let 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. +let from = Date() // Date | 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` (optional) +let to = Date() // Date | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. (optional) +let interval = Date() // Date | Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. (optional) +let filterBy = "filterBy_example" // String | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. (optional) + +// Retrieve metrics over time +AnalyticsV20BetaAPI.getMetricsOverTime(metric: metric, from: from, to: to, interval: interval, filterBy: filterBy) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### 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. | + **from** | **Date** | 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` | [optional] + **to** | **Date** | Use this query parameter to define the ending date-time of the period you want analytics for. - If you do not set a value for `to`, the default assigned value is `now`. - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. | [optional] + **interval** | **Date** | Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. | [optional] + **filterBy** | **String** | Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. - If you do not set a value for `filterBy`, the API returns the full dataset for your project. These are the available breakdown dimensions: - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. | [optional] + +### Return type + +[**AnalyticsMetricsOverTimeResponse**](AnalyticsMetricsOverTimeResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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..1a5b9bc --- /dev/null +++ b/docs/UnrecognizedRequestUrl.md @@ -0,0 +1,12 @@ +# UnrecognizedRequestUrl + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | A link to the error documentation. | [optional] +**title** | **String** | A description of the error that occurred. | [optional] +**status** | **Int** | The HTTP status code. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +