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 5, 2024
1 parent e56eee4 commit f485a76
Show file tree
Hide file tree
Showing 32 changed files with 107 additions and 834 deletions.
28 changes: 2 additions & 26 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,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 +63,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 @@ -126,12 +114,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 +135,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
9ef51e903ea5ac11defcf41d7d64b096535604be88599008b13aab0d527f4e25
106 changes: 47 additions & 59 deletions README.md

Large diffs are not rendered by default.

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
52 changes: 0 additions & 52 deletions Sources/Models/LiveStreamSession.swift

This file was deleted.

44 changes: 0 additions & 44 deletions Sources/Models/LiveStreamSessionClient.swift

This file was deleted.

44 changes: 0 additions & 44 deletions Sources/Models/LiveStreamSessionDevice.swift

This file was deleted.

39 changes: 0 additions & 39 deletions Sources/Models/LiveStreamSessionLocation.swift

This file was deleted.

48 changes: 0 additions & 48 deletions Sources/Models/LiveStreamSessionReferrer.swift

This file was deleted.

Loading

0 comments on commit f485a76

Please sign in to comment.