Skip to content

Commit

Permalink
[DO NOT MERGE] Add Watch Data endpoints to OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Jun 4, 2024
1 parent e56eee4 commit 36e0d1c
Show file tree
Hide file tree
Showing 49 changed files with 592 additions and 782 deletions.
46 changes: 20 additions & 26 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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
Expand All @@ -43,12 +52,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
Expand All @@ -69,18 +72,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
Expand Down Expand Up @@ -108,7 +105,16 @@ 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/AuthenticatePayload.md
Expand All @@ -126,12 +132,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
Expand All @@ -153,19 +153,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
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d7b342ceb1a4805da9e3d6355384e34c1a99e1300d01cac3ae3218c5738f11f1
55f39ddf46e98ecf7cbe59e1f384f2ac698ce3f633e482cbd99b9441bfc55700
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ 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


#### CaptionsAPI
Expand Down Expand Up @@ -269,7 +269,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)
Expand All @@ -285,12 +294,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)
Expand All @@ -310,18 +313,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)
Expand Down
10 changes: 8 additions & 2 deletions Sources/APIs/AnalyticsAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<Response<AnalyticsPlaysResponse>, ErrorResponse>) -> Void) -> RequestTask {
return getLiveStreamsPlaysWithRequestBuilder(from: from, dimension: dimension, to: to, filter: filter, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue, completion)
Expand All @@ -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 &#x60;from&#x60;. - The date you set must be **within the last 30 days**. - The value you provide must follow the &#x60;YYYY-MM-DD&#x60; format.
- parameter dimension: (query) Use this query parameter to define the dimension that you want analytics for. - &#x60;liveStreamId&#x60;: Returns analytics based on the public live stream identifiers. - &#x60;emittedAt&#x60;: 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 &#x60;from&#x60; and &#x60;to&#x60; 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. - &#x60;country&#x60;: Returns analytics based on the viewers&#39; country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - &#x60;deviceType&#x60;: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: &#x60;computer&#x60;, &#x60;phone&#x60;, &#x60;tablet&#x60;, &#x60;tv&#x60;, &#x60;console&#x60;, &#x60;wearable&#x60;, &#x60;unknown&#x60;. - &#x60;operatingSystem&#x60;: Returns analytics based on the operating system used by the viewers during the play event. Response values include &#x60;windows&#x60;, &#x60;mac osx&#x60;, &#x60;android&#x60;, &#x60;ios&#x60;, &#x60;linux&#x60;. - &#x60;browser&#x60;: Returns analytics based on the browser used by the viewers during the play event. Response values include &#x60;chrome&#x60;, &#x60;firefox&#x60;, &#x60;edge&#x60;, &#x60;opera&#x60;.
Expand All @@ -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<AnalyticsPlaysResponse>
*/
@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<AnalyticsPlaysResponse> {
let localVariablePath = "/analytics/live-streams/plays"
let localVariableURLString = ApiVideoClient.basePath + localVariablePath
Expand Down Expand Up @@ -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
Expand All @@ -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<Response<AnalyticsPlaysResponse>, ErrorResponse>) -> Void) -> RequestTask {
return getVideosPlaysWithRequestBuilder(from: from, dimension: dimension, to: to, filter: filter, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue, completion)
Expand All @@ -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 &#x60;from&#x60;. - The date you set must be **within the last 30 days**. - The value you provide must follow the &#x60;YYYY-MM-DD&#x60; format.
- parameter dimension: (query) Use this query parameter to define the dimension that you want analytics for. - &#x60;videoId&#x60;: Returns analytics based on the public video identifiers. - &#x60;emittedAt&#x60;: 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 &#x60;from&#x60; and &#x60;to&#x60; 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. - &#x60;country&#x60;: Returns analytics based on the viewers&#39; country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - &#x60;deviceType&#x60;: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: &#x60;computer&#x60;, &#x60;phone&#x60;, &#x60;tablet&#x60;, &#x60;tv&#x60;, &#x60;console&#x60;, &#x60;wearable&#x60;, &#x60;unknown&#x60;. - &#x60;operatingSystem&#x60;: Returns analytics based on the operating system used by the viewers during the play event. Response values include &#x60;windows&#x60;, &#x60;mac osx&#x60;, &#x60;android&#x60;, &#x60;ios&#x60;, &#x60;linux&#x60;. - &#x60;browser&#x60;: Returns analytics based on the browser used by the viewers during the play event. Response values include &#x60;chrome&#x60;, &#x60;firefox&#x60;, &#x60;edge&#x60;, &#x60;opera&#x60;.
Expand All @@ -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<AnalyticsPlaysResponse>
*/
@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<AnalyticsPlaysResponse> {
let localVariablePath = "/analytics/videos/plays"
let localVariableURLString = ApiVideoClient.basePath + localVariablePath
Expand Down
Loading

0 comments on commit 36e0d1c

Please sign in to comment.