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
szekelyzol authored May 29, 2024
1 parent e56eee4 commit bd5ea6f
Show file tree
Hide file tree
Showing 42 changed files with 1,281 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -69,6 +79,7 @@ Sources/Models/RestreamsResponseObject.swift
Sources/Models/TokenCreationPayload.swift
Sources/Models/TokenListResponse.swift
Sources/Models/TooManyRequests.swift
Sources/Models/UnrecognizedRequestUrl.swift
Sources/Models/UploadToken.swift
Sources/Models/Video.swift
Sources/Models/VideoAssets.swift
Expand Down Expand Up @@ -108,9 +119,19 @@ docs/AccessToken.md
docs/AdditionalBadRequestErrors.md
docs/AdvancedAuthenticationAPI.md
docs/AnalyticsAPI.md
docs/AnalyticsAggregatedMetricsResponse.md
docs/AnalyticsAggregatedMetricsResponseContext.md
docs/AnalyticsAggregatedMetricsResponseContextTimeframe.md
docs/AnalyticsData.md
docs/AnalyticsMetricsBreakdownResponse.md
docs/AnalyticsMetricsBreakdownResponseContext.md
docs/AnalyticsMetricsBreakdownResponseData.md
docs/AnalyticsMetricsOverTimeResponse.md
docs/AnalyticsMetricsOverTimeResponseContext.md
docs/AnalyticsMetricsOverTimeResponseData.md
docs/AnalyticsPlays400Error.md
docs/AnalyticsPlaysResponse.md
docs/AnalyticsV20BetaAPI.md
docs/AuthenticatePayload.md
docs/BadRequest.md
docs/BytesRange.md
Expand Down Expand Up @@ -153,6 +174,7 @@ docs/RestreamsResponseObject.md
docs/TokenCreationPayload.md
docs/TokenListResponse.md
docs/TooManyRequests.md
docs/UnrecognizedRequestUrl.md
docs/UploadToken.md
docs/UploadTokensAPI.md
docs/Video.md
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
548f424dcead8e1cff88849a19d2f7339012ce69090abf66d12f7f30fa756e5d
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [Documentation](#documentation)
- [API Endpoints](#api-endpoints)
- [AnalyticsAPI](#AnalyticsAPI)
- [AnalyticsV20BetaAPI](#AnalyticsV20BetaAPI)
- [CaptionsAPI](#CaptionsAPI)
- [ChaptersAPI](#ChaptersAPI)
- [LiveStreamsAPI](#LiveStreamsAPI)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -310,6 +337,7 @@ Method | HTTP request | Description
- [TokenCreationPayload](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TokenCreationPayload.md)
- [TokenListResponse](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TokenListResponse.md)
- [TooManyRequests](https://github.com/apivideo/api.video-swift-client/blob/main/docs/TooManyRequests.md)
- [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-swift-client/blob/main/docs/UnrecognizedRequestUrl.md)
- [UploadToken](https://github.com/apivideo/api.video-swift-client/blob/main/docs/UploadToken.md)
- [Video](https://github.com/apivideo/api.video-swift-client/blob/main/docs/Video.md)
- [VideoAssets](https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideoAssets.md)
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 bd5ea6f

Please sign in to comment.