diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5dd3179..cd09f8a 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 @@ -43,12 +53,6 @@ Sources/Models/LiveStream.swift Sources/Models/LiveStreamAssets.swift Sources/Models/LiveStreamCreationPayload.swift Sources/Models/LiveStreamListResponse.swift -Sources/Models/LiveStreamSession.swift -Sources/Models/LiveStreamSessionClient.swift -Sources/Models/LiveStreamSessionDevice.swift -Sources/Models/LiveStreamSessionLocation.swift -Sources/Models/LiveStreamSessionReferrer.swift -Sources/Models/LiveStreamSessionSession.swift Sources/Models/LiveStreamUpdatePayload.swift Sources/Models/Metadata.swift Sources/Models/Model403ErrorSchema.swift @@ -69,18 +73,12 @@ 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 Sources/Models/VideoClip.swift Sources/Models/VideoCreationPayload.swift -Sources/Models/VideoSession.swift -Sources/Models/VideoSessionClient.swift -Sources/Models/VideoSessionDevice.swift -Sources/Models/VideoSessionLocation.swift -Sources/Models/VideoSessionOs.swift -Sources/Models/VideoSessionReferrer.swift -Sources/Models/VideoSessionSession.swift Sources/Models/VideoSource.swift Sources/Models/VideoSourceLiveStream.swift Sources/Models/VideoSourceLiveStreamLink.swift @@ -108,9 +106,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 @@ -126,12 +134,6 @@ docs/LiveStream.md docs/LiveStreamAssets.md docs/LiveStreamCreationPayload.md docs/LiveStreamListResponse.md -docs/LiveStreamSession.md -docs/LiveStreamSessionClient.md -docs/LiveStreamSessionDevice.md -docs/LiveStreamSessionLocation.md -docs/LiveStreamSessionReferrer.md -docs/LiveStreamSessionSession.md docs/LiveStreamUpdatePayload.md docs/LiveStreamsAPI.md docs/Metadata.md @@ -153,19 +155,13 @@ docs/RestreamsResponseObject.md docs/TokenCreationPayload.md docs/TokenListResponse.md docs/TooManyRequests.md +docs/UnrecognizedRequestUrl.md docs/UploadToken.md docs/UploadTokensAPI.md docs/Video.md docs/VideoAssets.md docs/VideoClip.md docs/VideoCreationPayload.md -docs/VideoSession.md -docs/VideoSessionClient.md -docs/VideoSessionDevice.md -docs/VideoSessionLocation.md -docs/VideoSessionOs.md -docs/VideoSessionReferrer.md -docs/VideoSessionSession.md docs/VideoSource.md docs/VideoSourceLiveStream.md docs/VideoSourceLiveStreamLink.md diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 644fa0c..ffe36c1 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 +a963a014cf593beae0a9362c3e4eb85b0e137c5be94d09f58e157dfbc9289458 \ No newline at end of file diff --git a/README.md b/README.md index ca33ecd..2c426cb 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) @@ -285,12 +312,6 @@ Method | HTTP request | Description - [LiveStreamAssets](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamAssets.md) - [LiveStreamCreationPayload](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamCreationPayload.md) - [LiveStreamListResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamListResponse.md) - - [LiveStreamSession](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamSession.md) - - [LiveStreamSessionClient](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamSessionClient.md) - - [LiveStreamSessionDevice](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamSessionDevice.md) - - [LiveStreamSessionLocation](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamSessionLocation.md) - - [LiveStreamSessionReferrer](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamSessionReferrer.md) - - [LiveStreamSessionSession](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamSessionSession.md) - [LiveStreamUpdatePayload](https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamUpdatePayload.md) - [Metadata](https://github.com/apivideo/api.video-swift-client/blob/main/docs/Metadata.md) - [Model403ErrorSchema](https://github.com/apivideo/api.video-swift-client/blob/main/docs/Model403ErrorSchema.md) @@ -310,18 +331,12 @@ 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) - [VideoClip](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoClip.md) - [VideoCreationPayload](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoCreationPayload.md) - - [VideoSession](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSession.md) - - [VideoSessionClient](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSessionClient.md) - - [VideoSessionDevice](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSessionDevice.md) - - [VideoSessionLocation](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSessionLocation.md) - - [VideoSessionOs](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSessionOs.md) - - [VideoSessionReferrer](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSessionReferrer.md) - - [VideoSessionSession](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSessionSession.md) - [VideoSource](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSource.md) - [VideoSourceLiveStream](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSourceLiveStream.md) - [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoSourceLiveStreamLink.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..af806d0 --- /dev/null +++ b/Sources/APIs/AnalyticsV20BetaAPI.swift @@ -0,0 +1,340 @@ +// +// 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 currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - 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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: currentPage, pageSize: pageSize, 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 currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - 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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: currentPage, pageSize: pageSize).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) + - parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - returns: RequestBuilder + */ + internal class func getAggregatedMetricsWithRequestBuilder(metric: MetricGetAggregatedMetrics, aggregation: AggregationGetAggregatedMetrics, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, currentPage: Int? = nil, pageSize: Int? = 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(), + "currentPage": currentPage?.encodeToJSON(), + "pageSize": pageSize?.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 currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - 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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: currentPage, pageSize: pageSize, 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 currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - 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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: currentPage, pageSize: pageSize).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) + - parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - returns: RequestBuilder + */ + internal class func getMetricsBreakdownWithRequestBuilder(metric: MetricGetMetricsBreakdown, breakdown: BreakdownGetMetricsBreakdown, from: Date? = nil, to: Date? = nil, filterBy: String? = nil, currentPage: Int? = nil, pageSize: Int? = 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(), + "currentPage": currentPage?.encodeToJSON(), + "pageSize": pageSize?.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 currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - 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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: currentPage, pageSize: pageSize, 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 currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - 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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: currentPage, pageSize: pageSize).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) + - parameter currentPage: (query) Choose the number of search results to return per page. Minimum value: 1 (optional, default to 1) + - parameter pageSize: (query) Results per page. Allowed values 1-100, default is 25. (optional, default to 25) + - returns: RequestBuilder + */ + internal class func getMetricsOverTimeWithRequestBuilder(metric: MetricGetMetricsOverTime, from: Date? = nil, to: Date? = nil, interval: Date? = nil, filterBy: String? = nil, currentPage: Int? = nil, pageSize: Int? = 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(), + "currentPage": currentPage?.encodeToJSON(), + "pageSize": pageSize?.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..2d6bb77 --- /dev/null +++ b/Sources/Models/AnalyticsAggregatedMetricsResponse.swift @@ -0,0 +1,40 @@ +// +// 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 var pagination: Pagination + + public init(context: AnalyticsAggregatedMetricsResponseContext, data: [Float], 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/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/LiveStreamSession.swift b/Sources/Models/LiveStreamSession.swift deleted file mode 100644 index 432dc2f..0000000 --- a/Sources/Models/LiveStreamSession.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// LiveStreamSession.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct LiveStreamSession: Codable, Hashable { - - public var session: LiveStreamSessionSession? - public var location: LiveStreamSessionLocation? - public var referrer: LiveStreamSessionReferrer? - public var device: LiveStreamSessionDevice? - public var os: VideoSessionOs? - public var client: LiveStreamSessionClient? - - public init(session: LiveStreamSessionSession? = nil, location: LiveStreamSessionLocation? = nil, referrer: LiveStreamSessionReferrer? = nil, device: LiveStreamSessionDevice? = nil, os: VideoSessionOs? = nil, client: LiveStreamSessionClient? = nil) { - self.session = session - self.location = location - self.referrer = referrer - self.device = device - self.os = os - self.client = client - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case session - case location - case referrer - case device - case os - case client - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(session, forKey: .session) - try container.encodeIfPresent(location, forKey: .location) - try container.encodeIfPresent(referrer, forKey: .referrer) - try container.encodeIfPresent(device, forKey: .device) - try container.encodeIfPresent(os, forKey: .os) - try container.encodeIfPresent(client, forKey: .client) - } -} - diff --git a/Sources/Models/LiveStreamSessionClient.swift b/Sources/Models/LiveStreamSessionClient.swift deleted file mode 100644 index eee824c..0000000 --- a/Sources/Models/LiveStreamSessionClient.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// LiveStreamSessionClient.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** What kind of browser the viewer is using for the live stream session. */ -public struct LiveStreamSessionClient: Codable, Hashable { - - /** The name of the browser used to view the live stream session. */ - public var name: String? - /** The version of the browser used to view the live stream session. */ - public var version: String? - /** The type of client used to view the live stream session. */ - public var type: String? - - public init(name: String? = nil, version: String? = nil, type: String? = nil) { - self.name = name - self.version = version - self.type = type - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case version - case type - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(version, forKey: .version) - try container.encodeIfPresent(type, forKey: .type) - } -} - diff --git a/Sources/Models/LiveStreamSessionDevice.swift b/Sources/Models/LiveStreamSessionDevice.swift deleted file mode 100644 index 1646f69..0000000 --- a/Sources/Models/LiveStreamSessionDevice.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// LiveStreamSessionDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** What type of device the user is on when in the live stream session. */ -public struct LiveStreamSessionDevice: Codable, Hashable { - - /** What the type is like desktop, laptop, mobile. */ - public var type: String? - /** If known, what the brand of the device is, like Apple, Dell, etc. */ - public var vendor: String? - /** The specific model of the device, if known. */ - public var model: String? - - public init(type: String? = nil, vendor: String? = nil, model: String? = nil) { - self.type = type - self.vendor = vendor - self.model = model - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case vendor - case model - } - - // 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(vendor, forKey: .vendor) - try container.encodeIfPresent(model, forKey: .model) - } -} - diff --git a/Sources/Models/LiveStreamSessionLocation.swift b/Sources/Models/LiveStreamSessionLocation.swift deleted file mode 100644 index 28d3560..0000000 --- a/Sources/Models/LiveStreamSessionLocation.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// LiveStreamSessionLocation.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** The location of the viewer of the live stream. */ -public struct LiveStreamSessionLocation: Codable, Hashable { - - /** The country of the viewer of the live stream. */ - public var country: String? - /** The city of the viewer of the live stream. */ - public var city: String? - - public init(country: String? = nil, city: String? = nil) { - self.country = country - self.city = city - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case country - case city - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(country, forKey: .country) - try container.encodeIfPresent(city, forKey: .city) - } -} - diff --git a/Sources/Models/LiveStreamSessionReferrer.swift b/Sources/Models/LiveStreamSessionReferrer.swift deleted file mode 100644 index 9ec500a..0000000 --- a/Sources/Models/LiveStreamSessionReferrer.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// LiveStreamSessionReferrer.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct LiveStreamSessionReferrer: Codable, Hashable { - - /** The website the viewer of the live stream was referred to in order to view the live stream. */ - public var url: String? - /** The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. */ - public var medium: String? - /** Where the viewer came from to see the live stream (usually where they searched from). */ - public var source: String? - /** What term they searched for that led them to the live stream. */ - public var searchTerm: String? - - public init(url: String? = nil, medium: String? = nil, source: String? = nil, searchTerm: String? = nil) { - self.url = url - self.medium = medium - self.source = source - self.searchTerm = searchTerm - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case url - case medium - case source - case searchTerm - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(url, forKey: .url) - try container.encodeIfPresent(medium, forKey: .medium) - try container.encodeIfPresent(source, forKey: .source) - try container.encodeIfPresent(searchTerm, forKey: .searchTerm) - } -} - diff --git a/Sources/Models/LiveStreamSessionSession.swift b/Sources/Models/LiveStreamSessionSession.swift deleted file mode 100644 index e18b5f7..0000000 --- a/Sources/Models/LiveStreamSessionSession.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// LiveStreamSessionSession.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct LiveStreamSessionSession: Codable, Hashable { - - /** A unique identifier for your session. You can use this to track what happens during a specific session. */ - public var sessionId: String? - /** When the session started, with the date and time presented in ISO-8601 format. */ - public var loadedAt: Date? - /** When the session ended, with the date and time presented in ISO-8601 format. */ - public var endedAt: Date? - - public init(sessionId: String? = nil, loadedAt: Date? = nil, endedAt: Date? = nil) { - self.sessionId = sessionId - self.loadedAt = loadedAt - self.endedAt = endedAt - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case sessionId - case loadedAt - case endedAt - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(sessionId, forKey: .sessionId) - try container.encodeIfPresent(loadedAt, forKey: .loadedAt) - try container.encodeIfPresent(endedAt, forKey: .endedAt) - } -} - 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/Sources/Models/VideoSession.swift b/Sources/Models/VideoSession.swift deleted file mode 100644 index 88ee365..0000000 --- a/Sources/Models/VideoSession.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// VideoSession.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct VideoSession: Codable, Hashable { - - public var session: VideoSessionSession? - public var location: VideoSessionLocation? - public var referrer: VideoSessionReferrer? - public var device: VideoSessionDevice? - public var os: VideoSessionOs? - public var client: VideoSessionClient? - - public init(session: VideoSessionSession? = nil, location: VideoSessionLocation? = nil, referrer: VideoSessionReferrer? = nil, device: VideoSessionDevice? = nil, os: VideoSessionOs? = nil, client: VideoSessionClient? = nil) { - self.session = session - self.location = location - self.referrer = referrer - self.device = device - self.os = os - self.client = client - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case session - case location - case referrer - case device - case os - case client - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(session, forKey: .session) - try container.encodeIfPresent(location, forKey: .location) - try container.encodeIfPresent(referrer, forKey: .referrer) - try container.encodeIfPresent(device, forKey: .device) - try container.encodeIfPresent(os, forKey: .os) - try container.encodeIfPresent(client, forKey: .client) - } -} - diff --git a/Sources/Models/VideoSessionClient.swift b/Sources/Models/VideoSessionClient.swift deleted file mode 100644 index e970477..0000000 --- a/Sources/Models/VideoSessionClient.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// VideoSessionClient.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** What kind of browser the viewer is using for the video session. */ -public struct VideoSessionClient: Codable, Hashable { - - /** The name of the browser used to view the video session. */ - public var name: String? - /** The version of the browser used to view the video session. */ - public var version: String? - /** The type of client used to view the video session. */ - public var type: String? - - public init(name: String? = nil, version: String? = nil, type: String? = nil) { - self.name = name - self.version = version - self.type = type - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case version - case type - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(version, forKey: .version) - try container.encodeIfPresent(type, forKey: .type) - } -} - diff --git a/Sources/Models/VideoSessionDevice.swift b/Sources/Models/VideoSessionDevice.swift deleted file mode 100644 index 6f44859..0000000 --- a/Sources/Models/VideoSessionDevice.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// VideoSessionDevice.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** What type of device the user is on when in the video session. */ -public struct VideoSessionDevice: Codable, Hashable { - - /** What the type is like desktop, laptop, mobile. */ - public var type: String? - /** If known, what the brand of the device is, like Apple, Dell, etc. */ - public var vendor: String? - /** The specific model of the device, if known. */ - public var model: String? - - public init(type: String? = nil, vendor: String? = nil, model: String? = nil) { - self.type = type - self.vendor = vendor - self.model = model - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case type - case vendor - case model - } - - // 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(vendor, forKey: .vendor) - try container.encodeIfPresent(model, forKey: .model) - } -} - diff --git a/Sources/Models/VideoSessionLocation.swift b/Sources/Models/VideoSessionLocation.swift deleted file mode 100644 index f599c38..0000000 --- a/Sources/Models/VideoSessionLocation.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// VideoSessionLocation.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** The location of the viewer. */ -public struct VideoSessionLocation: Codable, Hashable { - - /** The country of the viewer. */ - public var country: String? - /** The city of the viewer. */ - public var city: String? - - public init(country: String? = nil, city: String? = nil) { - self.country = country - self.city = city - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case country - case city - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(country, forKey: .country) - try container.encodeIfPresent(city, forKey: .city) - } -} - diff --git a/Sources/Models/VideoSessionOs.swift b/Sources/Models/VideoSessionOs.swift deleted file mode 100644 index 6832ba6..0000000 --- a/Sources/Models/VideoSessionOs.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// VideoSessionOs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -/** The operating system the viewer is on. */ -public struct VideoSessionOs: Codable, Hashable { - - /** The name of the operating system. */ - public var name: String? - /** The nickname for the operating system, often representing the version. */ - public var shortname: String? - /** The version of the operating system. */ - public var version: String? - - public init(name: String? = nil, shortname: String? = nil, version: String? = nil) { - self.name = name - self.shortname = shortname - self.version = version - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case name - case shortname - case version - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(name, forKey: .name) - try container.encodeIfPresent(shortname, forKey: .shortname) - try container.encodeIfPresent(version, forKey: .version) - } -} - diff --git a/Sources/Models/VideoSessionReferrer.swift b/Sources/Models/VideoSessionReferrer.swift deleted file mode 100644 index 7e8af09..0000000 --- a/Sources/Models/VideoSessionReferrer.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// VideoSessionReferrer.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct VideoSessionReferrer: Codable, Hashable { - - /** The link the viewer used to reach the video session. */ - public var url: String? - /** How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. */ - public var medium: String? - /** The source the referrer came from to the video session. For example if they searched through google to find the stream. */ - public var source: String? - /** The search term they typed to arrive at the video session. */ - public var searchTerm: String? - - public init(url: String? = nil, medium: String? = nil, source: String? = nil, searchTerm: String? = nil) { - self.url = url - self.medium = medium - self.source = source - self.searchTerm = searchTerm - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case url - case medium - case source - case searchTerm - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(url, forKey: .url) - try container.encodeIfPresent(medium, forKey: .medium) - try container.encodeIfPresent(source, forKey: .source) - try container.encodeIfPresent(searchTerm, forKey: .searchTerm) - } -} - diff --git a/Sources/Models/VideoSessionSession.swift b/Sources/Models/VideoSessionSession.swift deleted file mode 100644 index ba702bb..0000000 --- a/Sources/Models/VideoSessionSession.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// VideoSessionSession.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct VideoSessionSession: Codable, Hashable { - - /** The unique identifier for the session that you can use to track what happens during it. */ - public var sessionId: String? - /** When the video session started, presented in ISO-8601 format. */ - public var loadedAt: Date? - /** When the video session ended, presented in ISO-8601 format. */ - public var endedAt: Date? - /** A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. */ - public var metadata: [Metadata]? - - public init(sessionId: String? = nil, loadedAt: Date? = nil, endedAt: Date? = nil, metadata: [Metadata]? = nil) { - self.sessionId = sessionId - self.loadedAt = loadedAt - self.endedAt = endedAt - self.metadata = metadata - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case sessionId - case loadedAt - case endedAt - case metadata - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(sessionId, forKey: .sessionId) - try container.encodeIfPresent(loadedAt, forKey: .loadedAt) - try container.encodeIfPresent(endedAt, forKey: .endedAt) - try container.encodeIfPresent(metadata, forKey: .metadata) - } -} - 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/LiveStreamSessionLocation.md b/docs/AnalyticsAggregatedMetricsResponse.md similarity index 53% rename from docs/LiveStreamSessionLocation.md rename to docs/AnalyticsAggregatedMetricsResponse.md index 757b141..d1bad36 100644 --- a/docs/LiveStreamSessionLocation.md +++ b/docs/AnalyticsAggregatedMetricsResponse.md @@ -1,10 +1,11 @@ -# LiveStreamSessionLocation +# AnalyticsAggregatedMetricsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**country** | **String** | The country of the viewer of the live stream. | [optional] -**city** | **String** | The city of the viewer of the live stream. | [optional] +**context** | [**AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**data** | **[Float]** | | +**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/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..3b6b1e1 --- /dev/null +++ b/docs/AnalyticsV20BetaAPI.md @@ -0,0 +1,203 @@ +# 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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: Int? = nil, pageSize: Int? = 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) +let currentPage = 987 // Int | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) +let pageSize = 987 // Int | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) + +// Retrieve aggregated metrics +AnalyticsV20BetaAPI.getAggregatedMetrics(metric: metric, aggregation: aggregation, from: from, to: to, filterBy: filterBy, currentPage: currentPage, pageSize: pageSize) { (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] + **currentPage** | **Int** | Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] + **pageSize** | **Int** | Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] + +### Return type + +[**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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: Int? = nil, pageSize: Int? = 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) +let currentPage = 987 // Int | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) +let pageSize = 987 // Int | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) + +// Retrieve metrics in a breakdown of dimensions +AnalyticsV20BetaAPI.getMetricsBreakdown(metric: metric, breakdown: breakdown, from: from, to: to, filterBy: filterBy, currentPage: currentPage, pageSize: pageSize) { (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] + **currentPage** | **Int** | Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] + **pageSize** | **Int** | Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] + +### Return type + +[**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, currentPage: Int? = nil, pageSize: Int? = 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, currentPage: Int? = nil, pageSize: Int? = 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) +let currentPage = 987 // Int | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) +let pageSize = 987 // Int | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) + +// Retrieve metrics over time +AnalyticsV20BetaAPI.getMetricsOverTime(metric: metric, from: from, to: to, interval: interval, filterBy: filterBy, currentPage: currentPage, pageSize: pageSize) { (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] + **currentPage** | **Int** | Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] + **pageSize** | **Int** | Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] + +### Return type + +[**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/LiveStreamSession.md b/docs/LiveStreamSession.md deleted file mode 100644 index 59a3c3b..0000000 --- a/docs/LiveStreamSession.md +++ /dev/null @@ -1,15 +0,0 @@ -# LiveStreamSession - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**session** | [**LiveStreamSessionSession**](LiveStreamSessionSession.md) | | [optional] -**location** | [**LiveStreamSessionLocation**](LiveStreamSessionLocation.md) | | [optional] -**referrer** | [**LiveStreamSessionReferrer**](LiveStreamSessionReferrer.md) | | [optional] -**device** | [**LiveStreamSessionDevice**](LiveStreamSessionDevice.md) | | [optional] -**os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional] -**client** | [**LiveStreamSessionClient**](LiveStreamSessionClient.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LiveStreamSessionClient.md b/docs/LiveStreamSessionClient.md deleted file mode 100644 index f8870cc..0000000 --- a/docs/LiveStreamSessionClient.md +++ /dev/null @@ -1,12 +0,0 @@ -# LiveStreamSessionClient - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the browser used to view the live stream session. | [optional] -**version** | **String** | The version of the browser used to view the live stream session. | [optional] -**type** | **String** | The type of client used to view the live stream session. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LiveStreamSessionDevice.md b/docs/LiveStreamSessionDevice.md deleted file mode 100644 index b189a51..0000000 --- a/docs/LiveStreamSessionDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# LiveStreamSessionDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | What the type is like desktop, laptop, mobile. | [optional] -**vendor** | **String** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**model** | **String** | The specific model of the device, if known. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LiveStreamSessionReferrer.md b/docs/LiveStreamSessionReferrer.md deleted file mode 100644 index 7459118..0000000 --- a/docs/LiveStreamSessionReferrer.md +++ /dev/null @@ -1,13 +0,0 @@ -# LiveStreamSessionReferrer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | The website the viewer of the live stream was referred to in order to view the live stream. | [optional] -**medium** | **String** | The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. | [optional] -**source** | **String** | Where the viewer came from to see the live stream (usually where they searched from). | [optional] -**searchTerm** | **String** | What term they searched for that led them to the live stream. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LiveStreamSessionSession.md b/docs/LiveStreamSessionSession.md deleted file mode 100644 index 88e0543..0000000 --- a/docs/LiveStreamSessionSession.md +++ /dev/null @@ -1,12 +0,0 @@ -# LiveStreamSessionSession - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sessionId** | **String** | A unique identifier for your session. You can use this to track what happens during a specific session. | [optional] -**loadedAt** | **Date** | When the session started, with the date and time presented in ISO-8601 format. | [optional] -**endedAt** | **Date** | When the session ended, with the date and time presented in ISO-8601 format. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VideoSessionLocation.md b/docs/UnrecognizedRequestUrl.md similarity index 53% rename from docs/VideoSessionLocation.md rename to docs/UnrecognizedRequestUrl.md index 22c137f..1a5b9bc 100644 --- a/docs/VideoSessionLocation.md +++ b/docs/UnrecognizedRequestUrl.md @@ -1,10 +1,11 @@ -# VideoSessionLocation +# UnrecognizedRequestUrl ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**country** | **String** | The country of the viewer. | [optional] -**city** | **String** | The city of the viewer. | [optional] +**type** | **String** | A link to the error documentation. | [optional] +**title** | **String** | A description of the error that occurred. | [optional] +**status** | **Int** | The HTTP status code. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoSession.md b/docs/VideoSession.md deleted file mode 100644 index 7964c36..0000000 --- a/docs/VideoSession.md +++ /dev/null @@ -1,15 +0,0 @@ -# VideoSession - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**session** | [**VideoSessionSession**](VideoSessionSession.md) | | [optional] -**location** | [**VideoSessionLocation**](VideoSessionLocation.md) | | [optional] -**referrer** | [**VideoSessionReferrer**](VideoSessionReferrer.md) | | [optional] -**device** | [**VideoSessionDevice**](VideoSessionDevice.md) | | [optional] -**os** | [**VideoSessionOs**](VideoSessionOs.md) | | [optional] -**client** | [**VideoSessionClient**](VideoSessionClient.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VideoSessionClient.md b/docs/VideoSessionClient.md deleted file mode 100644 index 3fa3a9d..0000000 --- a/docs/VideoSessionClient.md +++ /dev/null @@ -1,12 +0,0 @@ -# VideoSessionClient - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the browser used to view the video session. | [optional] -**version** | **String** | The version of the browser used to view the video session. | [optional] -**type** | **String** | The type of client used to view the video session. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VideoSessionDevice.md b/docs/VideoSessionDevice.md deleted file mode 100644 index 3004c1f..0000000 --- a/docs/VideoSessionDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# VideoSessionDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | What the type is like desktop, laptop, mobile. | [optional] -**vendor** | **String** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**model** | **String** | The specific model of the device, if known. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VideoSessionOs.md b/docs/VideoSessionOs.md deleted file mode 100644 index 585c99b..0000000 --- a/docs/VideoSessionOs.md +++ /dev/null @@ -1,12 +0,0 @@ -# VideoSessionOs - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the operating system. | [optional] -**shortname** | **String** | The nickname for the operating system, often representing the version. | [optional] -**version** | **String** | The version of the operating system. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VideoSessionReferrer.md b/docs/VideoSessionReferrer.md deleted file mode 100644 index 75cad4a..0000000 --- a/docs/VideoSessionReferrer.md +++ /dev/null @@ -1,13 +0,0 @@ -# VideoSessionReferrer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | The link the viewer used to reach the video session. | [optional] -**medium** | **String** | How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. | [optional] -**source** | **String** | The source the referrer came from to the video session. For example if they searched through google to find the stream. | [optional] -**searchTerm** | **String** | The search term they typed to arrive at the video session. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VideoSessionSession.md b/docs/VideoSessionSession.md deleted file mode 100644 index 68f1da3..0000000 --- a/docs/VideoSessionSession.md +++ /dev/null @@ -1,13 +0,0 @@ -# VideoSessionSession - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sessionId** | **String** | The unique identifier for the session that you can use to track what happens during it. | [optional] -**loadedAt** | **Date** | When the video session started, presented in ISO-8601 format. | [optional] -**endedAt** | **Date** | When the video session ended, presented in ISO-8601 format. | [optional] -**metadata** | [Metadata] | A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - -