diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 02760bf..ba85e5b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -11,7 +11,6 @@ Sources/APIs/CaptionsAPI.swift Sources/APIs/ChaptersAPI.swift Sources/APIs/LiveStreamsAPI.swift Sources/APIs/PlayerThemesAPI.swift -Sources/APIs/RawStatisticsAPI.swift Sources/APIs/UploadTokensAPI.swift Sources/APIs/VideosAPI.swift Sources/APIs/WatermarksAPI.swift @@ -64,9 +63,6 @@ Sources/Models/PlayerThemeCreationPayload.swift Sources/Models/PlayerThemeUpdatePayload.swift Sources/Models/PlayerThemesListResponse.swift Sources/Models/Quality.swift -Sources/Models/RawStatisticsListLiveStreamAnalyticsResponse.swift -Sources/Models/RawStatisticsListPlayerSessionEventsResponse.swift -Sources/Models/RawStatisticsListSessionsResponse.swift Sources/Models/RefreshTokenPayload.swift Sources/Models/RestreamsRequestObject.swift Sources/Models/RestreamsResponseObject.swift @@ -150,10 +146,6 @@ docs/PlayerThemeUpdatePayload.md docs/PlayerThemesAPI.md docs/PlayerThemesListResponse.md docs/Quality.md -docs/RawStatisticsAPI.md -docs/RawStatisticsListLiveStreamAnalyticsResponse.md -docs/RawStatisticsListPlayerSessionEventsResponse.md -docs/RawStatisticsListSessionsResponse.md docs/RefreshTokenPayload.md docs/RestreamsRequestObject.md docs/RestreamsResponseObject.md diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 0fd006c..2dedf5b 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -1887f11face54a0a043265ab98f1d56e2ac08c39bef0c30dbaa6fc9dfdefb3db \ No newline at end of file +15641308b8635d4681dbd94d4931525c407a0a10b8e7487da2365559b4d4adf2 \ No newline at end of file diff --git a/README.md b/README.md index 2baea16..00764d0 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ - [ChaptersAPI](#ChaptersAPI) - [LiveStreamsAPI](#LiveStreamsAPI) - [PlayerThemesAPI](#PlayerThemesAPI) - - [RawStatisticsAPI](#RawStatisticsAPI) - [UploadTokensAPI](#UploadTokensAPI) - [VideosAPI](#VideosAPI) - [WatermarksAPI](#WatermarksAPI) @@ -190,23 +189,6 @@ Method | HTTP request | Description [**deleteLogo**](docs/PlayerThemesAPI.md#deleteLogo) | **DELETE** /players/{playerId}/logo | Delete logo -### RawStatisticsAPI - -#### Retrieve an instance of RawStatisticsAPI: - -```swift -RawStatisticsAPI -``` - -#### Endpoints - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**listLiveStreamSessions**](docs/RawStatisticsAPI.md#listLiveStreamSessions) | **GET** /analytics/live-streams/{liveStreamId} | List live stream player sessions -[**listSessionEvents**](docs/RawStatisticsAPI.md#listSessionEvents) | **GET** /analytics/sessions/{sessionId}/events | List player session events -[**listVideoSessions**](docs/RawStatisticsAPI.md#listVideoSessions) | **GET** /analytics/videos/{videoId} | List video player sessions - - ### UploadTokensAPI #### Retrieve an instance of UploadTokensAPI: @@ -324,9 +306,6 @@ Method | HTTP request | Description - [PlayerThemeUpdatePayload](docs/PlayerThemeUpdatePayload.md) - [PlayerThemesListResponse](docs/PlayerThemesListResponse.md) - [Quality](docs/Quality.md) - - [RawStatisticsListLiveStreamAnalyticsResponse](docs/RawStatisticsListLiveStreamAnalyticsResponse.md) - - [RawStatisticsListPlayerSessionEventsResponse](docs/RawStatisticsListPlayerSessionEventsResponse.md) - - [RawStatisticsListSessionsResponse](docs/RawStatisticsListSessionsResponse.md) - [RefreshTokenPayload](docs/RefreshTokenPayload.md) - [RestreamsRequestObject](docs/RestreamsRequestObject.md) - [RestreamsResponseObject](docs/RestreamsResponseObject.md) diff --git a/Sources/APIs/LiveStreamsAPI.swift b/Sources/APIs/LiveStreamsAPI.swift index 0dc9798..34a1d23 100644 --- a/Sources/APIs/LiveStreamsAPI.swift +++ b/Sources/APIs/LiveStreamsAPI.swift @@ -110,7 +110,7 @@ open class LiveStreamsAPI { /** Update a live stream - - parameter liveStreamId: (path) The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. + - parameter liveStreamId: (path) The unique ID for the live stream that you want to update information for such as player details. - parameter liveStreamUpdatePayload: (body) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects. @@ -132,7 +132,7 @@ open class LiveStreamsAPI { Update a live stream - PATCH /live-streams/{liveStreamId} - Updates the livestream object. - - parameter liveStreamId: (path) The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. + - parameter liveStreamId: (path) The unique ID for the live stream that you want to update information for such as player details. - parameter liveStreamUpdatePayload: (body) - returns: RequestBuilder */ diff --git a/Sources/APIs/RawStatisticsAPI.swift b/Sources/APIs/RawStatisticsAPI.swift deleted file mode 100644 index d0638ad..0000000 --- a/Sources/APIs/RawStatisticsAPI.swift +++ /dev/null @@ -1,193 +0,0 @@ -// -// RawStatisticsAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -open class RawStatisticsAPI { - - /** - List live stream player sessions - - - parameter liveStreamId: (path) The unique identifier for the live stream you want to retrieve analytics for. - - parameter period: (query) Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\" - - 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 listLiveStreamSessions(liveStreamId: String, period: String, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: RawStatisticsListLiveStreamAnalyticsResponse?, _ error: Error?) -> Void)) -> RequestTask { - return listLiveStreamSessionsWithRequestBuilder(liveStreamId: liveStreamId, period: period, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - - /** - List live stream player sessions - - GET /analytics/live-streams/{liveStreamId} - - parameter liveStreamId: (path) The unique identifier for the live stream you want to retrieve analytics for. - - parameter period: (query) Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\" - - 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 - */ - open class func listLiveStreamSessionsWithRequestBuilder(liveStreamId: String, period: String, currentPage: Int? = nil, pageSize: Int? = nil) -> RequestBuilder { - var localVariablePath = "/analytics/live-streams/{liveStreamId}" - let liveStreamIdPreEscape = "\(APIHelper.mapValueToPathItem(liveStreamId))" - let liveStreamIdPostEscape = liveStreamIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{liveStreamId}", with: liveStreamIdPostEscape, options: .literal, range: nil) - let localVariableURLString = ApiVideoClient.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "period": period.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) - } - - - /** - List player session events - - - parameter sessionId: (path) A unique identifier you can use to reference and track a session with. - - 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 listSessionEvents(sessionId: String, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: RawStatisticsListPlayerSessionEventsResponse?, _ error: Error?) -> Void)) -> RequestTask { - return listSessionEventsWithRequestBuilder(sessionId: sessionId, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - - /** - List player session events - - GET /analytics/sessions/{sessionId}/events - - Useful to track and measure video's engagement. - - parameter sessionId: (path) A unique identifier you can use to reference and track a session with. - - 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 - */ - open class func listSessionEventsWithRequestBuilder(sessionId: String, currentPage: Int? = nil, pageSize: Int? = nil) -> RequestBuilder { - var localVariablePath = "/analytics/sessions/{sessionId}/events" - let sessionIdPreEscape = "\(APIHelper.mapValueToPathItem(sessionId))" - let sessionIdPostEscape = sessionIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{sessionId}", with: sessionIdPostEscape, options: .literal, range: nil) - let localVariableURLString = ApiVideoClient.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "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) - } - - - /** - List video player sessions - - - parameter videoId: (path) The unique identifier for the video you want to retrieve session information for. - - parameter period: (query) Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 - - parameter metadata: (query) Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with. (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 listVideoSessions(videoId: String, period: String, metadata: [String: String]? = nil, currentPage: Int? = nil, pageSize: Int? = nil, apiResponseQueue: DispatchQueue = ApiVideoClient.apiResponseQueue, completion: @escaping ((_ data: RawStatisticsListSessionsResponse?, _ error: Error?) -> Void)) -> RequestTask { - return listVideoSessionsWithRequestBuilder(videoId: videoId, period: period, metadata: metadata, currentPage: currentPage, pageSize: pageSize).execute(apiResponseQueue) { result in - switch result { - case let .success(response): - completion(response.body, nil) - case let .failure(error): - completion(nil, error) - } - } - } - - - /** - List video player sessions - - GET /analytics/videos/{videoId} - - Retrieve all available user sessions for a specific video. Tutorials that use the [analytics endpoint](https://api.video/blog/endpoints/analytics). - - parameter videoId: (path) The unique identifier for the video you want to retrieve session information for. - - parameter period: (query) Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 - - parameter metadata: (query) Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with. (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 - */ - open class func listVideoSessionsWithRequestBuilder(videoId: String, period: String, metadata: [String: String]? = nil, currentPage: Int? = nil, pageSize: Int? = nil) -> RequestBuilder { - var localVariablePath = "/analytics/videos/{videoId}" - let videoIdPreEscape = "\(APIHelper.mapValueToPathItem(videoId))" - let videoIdPostEscape = videoIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - localVariablePath = localVariablePath.replacingOccurrences(of: "{videoId}", with: videoIdPostEscape, options: .literal, range: nil) - let localVariableURLString = ApiVideoClient.basePath + localVariablePath - let localVariableParameters: [String: Any]? = nil - - var localVariableUrlComponents = URLComponents(string: localVariableURLString) - localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ - "period": period.encodeToJSON(), - "metadata": metadata?.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/LiveStream.swift b/Sources/Models/LiveStream.swift index 939b9ce..7f09206 100644 --- a/Sources/Models/LiveStream.swift +++ b/Sources/Models/LiveStream.swift @@ -18,8 +18,6 @@ public struct LiveStream: Codable, Hashable { public var name: String? /** The unique, private stream key that you use to begin streaming. */ public var streamKey: String? - /** Whether you are recording or not. */ - public var record: Bool? /** Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos). */ public var _public: Bool? public var assets: LiveStreamAssets? @@ -34,11 +32,10 @@ public struct LiveStream: Codable, Hashable { /** When the player was last updated, presented in ISO-8601 format. */ public var updatedAt: Date? - public init(liveStreamId: String, name: String? = nil, streamKey: String? = nil, record: Bool? = nil, _public: Bool? = nil, assets: LiveStreamAssets? = nil, playerId: String? = nil, broadcasting: Bool? = nil, restreams: [RestreamsResponseObject], createdAt: Date? = nil, updatedAt: Date? = nil) { + public init(liveStreamId: String, name: String? = nil, streamKey: String? = nil, _public: Bool? = nil, assets: LiveStreamAssets? = nil, playerId: String? = nil, broadcasting: Bool? = nil, restreams: [RestreamsResponseObject], createdAt: Date? = nil, updatedAt: Date? = nil) { self.liveStreamId = liveStreamId self.name = name self.streamKey = streamKey - self.record = record self._public = _public self.assets = assets self.playerId = playerId @@ -52,7 +49,6 @@ public struct LiveStream: Codable, Hashable { case liveStreamId case name case streamKey - case record case _public = "public" case assets case playerId @@ -69,7 +65,6 @@ public struct LiveStream: Codable, Hashable { try container.encode(liveStreamId, forKey: .liveStreamId) try container.encodeIfPresent(name, forKey: .name) try container.encodeIfPresent(streamKey, forKey: .streamKey) - try container.encodeIfPresent(record, forKey: .record) try container.encodeIfPresent(_public, forKey: ._public) try container.encodeIfPresent(assets, forKey: .assets) try container.encodeIfPresent(playerId, forKey: .playerId) diff --git a/Sources/Models/LiveStreamCreationPayload.swift b/Sources/Models/LiveStreamCreationPayload.swift index dc0242a..edfae25 100644 --- a/Sources/Models/LiveStreamCreationPayload.swift +++ b/Sources/Models/LiveStreamCreationPayload.swift @@ -14,8 +14,6 @@ public struct LiveStreamCreationPayload: Codable, Hashable { /** Add a name for your live stream here. */ public var name: String - /** Whether you are recording or not. True for record, false for not record. */ - public var record: Bool? = false /** Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos). */ public var _public: Bool? /** The unique identifier for the player. */ @@ -23,9 +21,8 @@ public struct LiveStreamCreationPayload: Codable, Hashable { /** Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. */ public var restreams: [RestreamsRequestObject]? - public init(name: String, record: Bool? = false, _public: Bool? = nil, playerId: String? = nil, restreams: [RestreamsRequestObject]? = nil) { + public init(name: String, _public: Bool? = nil, playerId: String? = nil, restreams: [RestreamsRequestObject]? = nil) { self.name = name - self.record = record self._public = _public self.playerId = playerId self.restreams = restreams @@ -33,7 +30,6 @@ public struct LiveStreamCreationPayload: Codable, Hashable { public enum CodingKeys: String, CodingKey, CaseIterable { case name - case record case _public = "public" case playerId case restreams @@ -44,7 +40,6 @@ public struct LiveStreamCreationPayload: Codable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) - try container.encodeIfPresent(record, forKey: .record) try container.encodeIfPresent(_public, forKey: ._public) try container.encodeIfPresent(playerId, forKey: .playerId) try container.encodeIfPresent(restreams, forKey: .restreams) diff --git a/Sources/Models/LiveStreamUpdatePayload.swift b/Sources/Models/LiveStreamUpdatePayload.swift index 4b806c1..ef07c7a 100644 --- a/Sources/Models/LiveStreamUpdatePayload.swift +++ b/Sources/Models/LiveStreamUpdatePayload.swift @@ -16,17 +16,14 @@ public struct LiveStreamUpdatePayload: Codable, Hashable { public var name: String? /** Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos). */ public var _public: Bool? - /** Use this to indicate whether you want the recording on or off. On is true, off is false. */ - public var record: Bool? /** The unique ID for the player associated with a live stream that you want to update. */ public var playerId: String? /** Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. */ public var restreams: [RestreamsRequestObject]? - public init(name: String? = nil, _public: Bool? = nil, record: Bool? = nil, playerId: String? = nil, restreams: [RestreamsRequestObject]? = nil) { + public init(name: String? = nil, _public: Bool? = nil, playerId: String? = nil, restreams: [RestreamsRequestObject]? = nil) { self.name = name self._public = _public - self.record = record self.playerId = playerId self.restreams = restreams } @@ -34,7 +31,6 @@ public struct LiveStreamUpdatePayload: Codable, Hashable { public enum CodingKeys: String, CodingKey, CaseIterable { case name case _public = "public" - case record case playerId case restreams } @@ -45,7 +41,6 @@ public struct LiveStreamUpdatePayload: Codable, Hashable { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent(name, forKey: .name) try container.encodeIfPresent(_public, forKey: ._public) - try container.encodeIfPresent(record, forKey: .record) try container.encodeIfPresent(playerId, forKey: .playerId) try container.encodeIfPresent(restreams, forKey: .restreams) } diff --git a/Sources/Models/RawStatisticsListLiveStreamAnalyticsResponse.swift b/Sources/Models/RawStatisticsListLiveStreamAnalyticsResponse.swift deleted file mode 100644 index e6ccf6f..0000000 --- a/Sources/Models/RawStatisticsListLiveStreamAnalyticsResponse.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// RawStatisticsListLiveStreamAnalyticsResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct RawStatisticsListLiveStreamAnalyticsResponse: Codable, Hashable { - - public var data: [LiveStreamSession] - public var pagination: Pagination - - public init(data: [LiveStreamSession], pagination: Pagination) { - self.data = data - self.pagination = pagination - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case data - case pagination - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(data, forKey: .data) - try container.encode(pagination, forKey: .pagination) - } -} - diff --git a/Sources/Models/RawStatisticsListPlayerSessionEventsResponse.swift b/Sources/Models/RawStatisticsListPlayerSessionEventsResponse.swift deleted file mode 100644 index 7459912..0000000 --- a/Sources/Models/RawStatisticsListPlayerSessionEventsResponse.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// RawStatisticsListPlayerSessionEventsResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct RawStatisticsListPlayerSessionEventsResponse: Codable, Hashable { - - public var data: [PlayerSessionEvent] - public var pagination: Pagination - - public init(data: [PlayerSessionEvent], pagination: Pagination) { - self.data = data - self.pagination = pagination - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case data - case pagination - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(data, forKey: .data) - try container.encode(pagination, forKey: .pagination) - } -} - diff --git a/Sources/Models/RawStatisticsListSessionsResponse.swift b/Sources/Models/RawStatisticsListSessionsResponse.swift deleted file mode 100644 index 661d520..0000000 --- a/Sources/Models/RawStatisticsListSessionsResponse.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// RawStatisticsListSessionsResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct RawStatisticsListSessionsResponse: Codable, Hashable { - - public var data: [VideoSession] - public var pagination: Pagination - - public init(data: [VideoSession], pagination: Pagination) { - self.data = data - self.pagination = pagination - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case data - case pagination - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(data, forKey: .data) - try container.encode(pagination, forKey: .pagination) - } -} - diff --git a/Tests/TestResources/payloads/livestreams/create/responses/200.json b/Tests/TestResources/payloads/livestreams/create/responses/200.json index f834d0a..d1f1df2 100644 --- a/Tests/TestResources/payloads/livestreams/create/responses/200.json +++ b/Tests/TestResources/payloads/livestreams/create/responses/200.json @@ -14,7 +14,6 @@ } ], "name" : "Live From New York", "public" : true, - "record" : true, "broadcasting" : false, "assets" : { "iframe" : "", diff --git a/Tests/TestResources/payloads/livestreams/get/responses/200.json b/Tests/TestResources/payloads/livestreams/get/responses/200.json index f834d0a..d1f1df2 100644 --- a/Tests/TestResources/payloads/livestreams/get/responses/200.json +++ b/Tests/TestResources/payloads/livestreams/get/responses/200.json @@ -14,7 +14,6 @@ } ], "name" : "Live From New York", "public" : true, - "record" : true, "broadcasting" : false, "assets" : { "iframe" : "", diff --git a/Tests/TestResources/payloads/livestreams/list/responses/200.json b/Tests/TestResources/payloads/livestreams/list/responses/200.json index 38c503a..2d797b8 100644 --- a/Tests/TestResources/payloads/livestreams/list/responses/200.json +++ b/Tests/TestResources/payloads/livestreams/list/responses/200.json @@ -15,7 +15,6 @@ } ], "name" : "Live Stream From the browser", "public" : true, - "record" : true, "broadcasting" : false, "assets" : { "iframe" : "", @@ -39,7 +38,6 @@ } ], "name" : "Live From New York", "public" : true, - "record" : true, "broadcasting" : false, "assets" : { "iframe" : "", diff --git a/Tests/TestResources/payloads/livestreams/update/responses/200.json b/Tests/TestResources/payloads/livestreams/update/responses/200.json index f834d0a..d1f1df2 100644 --- a/Tests/TestResources/payloads/livestreams/update/responses/200.json +++ b/Tests/TestResources/payloads/livestreams/update/responses/200.json @@ -14,7 +14,6 @@ } ], "name" : "Live From New York", "public" : true, - "record" : true, "broadcasting" : false, "assets" : { "iframe" : "", diff --git a/Tests/TestResources/payloads/rawstatistics/listLiveStreamSessions/responses/200.json b/Tests/TestResources/payloads/rawstatistics/listLiveStreamSessions/responses/200.json deleted file mode 100644 index 140bfd1..0000000 --- a/Tests/TestResources/payloads/rawstatistics/listLiveStreamSessions/responses/200.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "data" : [ { - "session" : { - "sessionId" : "ps4zRWVOv2If2vzKJLMr3jQo", - "loadedAt" : "2018-09-11T13:04:37.890Z", - "endedAt" : "2018-09-11T14:47:22.186Z" - }, - "location" : { - "country" : "France", - "city" : "Paris" - }, - "referrer" : { - "url" : "unknown", - "medium" : "unknown", - "source" : "unknown", - "searchTerm" : "unknown" - }, - "device" : { - "type" : "desktop", - "vendor" : "unknown", - "model" : "unknown" - }, - "os" : { - "name" : "unknown", - "shortname" : "unknown", - "version" : "unknown" - }, - "client" : { - "type" : "browser", - "name" : "Firefox", - "version" : "61.0" - } - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 1, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 1, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/Tests/TestResources/payloads/rawstatistics/listLiveStreamSessions/responses/404.json b/Tests/TestResources/payloads/rawstatistics/listLiveStreamSessions/responses/404.json deleted file mode 100644 index 9efa63b..0000000 --- a/Tests/TestResources/payloads/rawstatistics/listLiveStreamSessions/responses/404.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type" : "https://docs.api.video/docs/resourcenot_found", - "title" : "The requested resource was not found.", - "name" : "liveStreamId", - "status" : 404 -} \ No newline at end of file diff --git a/Tests/TestResources/payloads/rawstatistics/listSessionEvents/responses/200.json b/Tests/TestResources/payloads/rawstatistics/listSessionEvents/responses/200.json deleted file mode 100644 index e444836..0000000 --- a/Tests/TestResources/payloads/rawstatistics/listSessionEvents/responses/200.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "data" : [ { - "type" : "ready", - "emittedAt" : "2020-09-15T09:47:42.000Z", - "at" : 0 - }, { - "type" : "play", - "emittedAt" : "2020-09-15T21:35:57.000Z", - "at" : 0 - }, { - "type" : "pause", - "emittedAt" : "2020-09-15T21:36:05.000Z", - "at" : 7 - }, { - "type" : "resume", - "emittedAt" : "2020-09-15T21:36:19.000Z", - "at" : 21 - }, { - "type" : "seek.forward", - "emittedAt" : "2020-09-15T21:36:19.000Z", - "from" : 7, - "to" : 21 - }, { - "type" : "end", - "emittedAt" : "2020-09-15T21:36:28.000Z", - "at" : 30 - }, { - "type" : "play", - "emittedAt" : "2020-09-15T21:36:29.000Z", - "at" : 0 - }, { - "type" : "seek.backward", - "emittedAt" : "2020-09-15T21:36:29.000Z", - "from" : 30, - "to" : 0 - }, { - "type" : "pause", - "emittedAt" : "2020-09-15T21:36:29.000Z", - "at" : 21 - }, { - "type" : "resume", - "emittedAt" : "2020-09-15T21:36:30.000Z", - "at" : 21 - }, { - "type" : "seek.forward", - "emittedAt" : "2020-09-15T21:36:30.000Z", - "from" : 0, - "to" : 21 - }, { - "type" : "pause", - "emittedAt" : "2020-09-15T21:36:33.000Z", - "at" : 20 - }, { - "type" : "resume", - "emittedAt" : "2020-09-15T21:36:33.000Z", - "at" : 20 - }, { - "type" : "seek.backward", - "emittedAt" : "2020-09-15T21:36:33.000Z", - "from" : 24, - "to" : 20 - }, { - "type" : "pause", - "emittedAt" : "2020-09-15T21:36:39.000Z", - "at" : 17 - }, { - "type" : "resume", - "emittedAt" : "2020-09-15T21:36:39.000Z", - "at" : 17 - }, { - "type" : "seek.forward", - "emittedAt" : "2020-09-15T21:36:39.000Z", - "from" : 17, - "to" : 17 - }, { - "type" : "pause", - "emittedAt" : "2020-09-15T21:36:41.000Z", - "at" : 19 - }, { - "type" : "ready", - "emittedAt" : "2020-09-17T09:20:47.000Z", - "at" : 0 - }, { - "type" : "ready", - "emittedAt" : "2020-09-17T09:41:01.000Z", - "at" : 0 - }, { - "type" : "ready", - "emittedAt" : "2020-09-17T09:41:08.000Z", - "at" : 0 - }, { - "type" : "play", - "emittedAt" : "2020-09-17T09:41:10.000Z", - "at" : 0 - }, { - "type" : "pause", - "emittedAt" : "2020-09-17T09:41:12.000Z", - "at" : 1 - }, { - "type" : "resume", - "emittedAt" : "2020-09-17T09:41:13.000Z", - "at" : 1 - }, { - "type" : "pause", - "emittedAt" : "2020-09-17T09:41:15.000Z", - "at" : 3 - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 25, - "pageSize" : 25, - "pagesTotal" : 2, - "itemsTotal" : 30, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=1&pageSize=25" - }, { - "rel" : "next", - "uri" : "/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=2&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=2&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/Tests/TestResources/payloads/rawstatistics/listSessionEvents/responses/404.json b/Tests/TestResources/payloads/rawstatistics/listSessionEvents/responses/404.json deleted file mode 100644 index 69b4332..0000000 --- a/Tests/TestResources/payloads/rawstatistics/listSessionEvents/responses/404.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type" : "https://docs.api.video/docs/resourcenot_found", - "title" : "The requested resource was not found.", - "name" : "videoId", - "status" : 404 -} \ No newline at end of file diff --git a/Tests/TestResources/payloads/rawstatistics/listVideoSessions/responses/200.json b/Tests/TestResources/payloads/rawstatistics/listVideoSessions/responses/200.json deleted file mode 100644 index 9c2c683..0000000 --- a/Tests/TestResources/payloads/rawstatistics/listVideoSessions/responses/200.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "data" : [ { - "session" : { - "sessionId" : "psEmFwGQUAXR2lFHj5nDOpy", - "loadedAt" : "2019-06-24T11:45:01.109Z", - "endedAt" : "2019-06-24T11:49:19.243Z" - }, - "location" : { - "country" : "France", - "city" : "Paris" - }, - "referrer" : { - "url" : "https://api.video", - "medium" : "organic", - "source" : "https://google.com", - "searchTerm" : "video encoding hosting and delivery" - }, - "device" : { - "type" : "desktop", - "vendor" : "Dell", - "model" : "unknown" - }, - "os" : { - "name" : "Microsoft Windows", - "shortname" : "W10", - "version" : "Windows10" - }, - "client" : { - "type" : "browser", - "name" : "Firefox", - "version" : "67.0" - } - } ], - "pagination" : { - "currentPage" : 1, - "currentPageItems" : 1, - "pageSize" : 25, - "pagesTotal" : 1, - "itemsTotal" : 1, - "links" : [ { - "rel" : "self", - "uri" : "/analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25" - }, { - "rel" : "first", - "uri" : "/analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25" - }, { - "rel" : "last", - "uri" : "/analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25" - } ] - } -} \ No newline at end of file diff --git a/Tests/TestResources/payloads/rawstatistics/listVideoSessions/responses/404.json b/Tests/TestResources/payloads/rawstatistics/listVideoSessions/responses/404.json deleted file mode 100644 index 69b4332..0000000 --- a/Tests/TestResources/payloads/rawstatistics/listVideoSessions/responses/404.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type" : "https://docs.api.video/docs/resourcenot_found", - "title" : "The requested resource was not found.", - "name" : "videoId", - "status" : 404 -} \ No newline at end of file diff --git a/docs/LiveStream.md b/docs/LiveStream.md index 8d52814..b419be3 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes **liveStreamId** | **String** | The unique identifier for the live stream. Live stream IDs begin with \"li.\" | **name** | **String** | The name of your live stream. | [optional] **streamKey** | **String** | The unique, private stream key that you use to begin streaming. | [optional] -**record** | **Bool** | Whether you are recording or not. | [optional] **_public** | **Bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos). | [optional] **assets** | [**LiveStreamAssets**](LiveStreamAssets.md) | | [optional] **playerId** | **String** | The unique identifier for the player. | [optional] diff --git a/docs/LiveStreamCreationPayload.md b/docs/LiveStreamCreationPayload.md index d7b4844..d9fabfd 100644 --- a/docs/LiveStreamCreationPayload.md +++ b/docs/LiveStreamCreationPayload.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Add a name for your live stream here. | -**record** | **Bool** | Whether you are recording or not. True for record, false for not record. | [optional] [default to false] **_public** | **Bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos). | [optional] **playerId** | **String** | The unique identifier for the player. | [optional] **restreams** | [RestreamsRequestObject] | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. | [optional] diff --git a/docs/LiveStreamUpdatePayload.md b/docs/LiveStreamUpdatePayload.md index 9048444..fd3973d 100644 --- a/docs/LiveStreamUpdatePayload.md +++ b/docs/LiveStreamUpdatePayload.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | The name you want to use for your live stream. | [optional] **_public** | **Bool** | Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos). | [optional] -**record** | **Bool** | Use this to indicate whether you want the recording on or off. On is true, off is false. | [optional] **playerId** | **String** | The unique ID for the player associated with a live stream that you want to update. | [optional] **restreams** | [RestreamsRequestObject] | Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed. | [optional] diff --git a/docs/LiveStreamsAPI.md b/docs/LiveStreamsAPI.md index fed89fd..29cd29d 100644 --- a/docs/LiveStreamsAPI.md +++ b/docs/LiveStreamsAPI.md @@ -28,7 +28,7 @@ Creates a livestream object. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import ApiVideoClient -let liveStreamCreationPayload = LiveStreamCreationPayload(name: "name_example", record: true, _public: false, playerId: "playerId_example", restreams: [RestreamsRequestObject(name: "name_example", serverUrl: "serverUrl_example", streamKey: "streamKey_example")]) // LiveStreamCreationPayload | +let liveStreamCreationPayload = LiveStreamCreationPayload(name: "name_example", _public: false, playerId: "playerId_example", restreams: [RestreamsRequestObject(name: "name_example", serverUrl: "serverUrl_example", streamKey: "streamKey_example")]) // LiveStreamCreationPayload | // Create live stream LiveStreamsAPI.create(liveStreamCreationPayload: liveStreamCreationPayload) { (response, error) in @@ -130,8 +130,8 @@ Updates the livestream object. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import ApiVideoClient -let liveStreamId = "liveStreamId_example" // String | The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. -let liveStreamUpdatePayload = LiveStreamUpdatePayload(name: "name_example", _public: false, record: true, playerId: "playerId_example", restreams: [RestreamsRequestObject(name: "name_example", serverUrl: "serverUrl_example", streamKey: "streamKey_example")]) // LiveStreamUpdatePayload | +let liveStreamId = "liveStreamId_example" // String | The unique ID for the live stream that you want to update information for such as player details. +let liveStreamUpdatePayload = LiveStreamUpdatePayload(name: "name_example", _public: false, playerId: "playerId_example", restreams: [RestreamsRequestObject(name: "name_example", serverUrl: "serverUrl_example", streamKey: "streamKey_example")]) // LiveStreamUpdatePayload | // Update a live stream LiveStreamsAPI.update(liveStreamId: liveStreamId, liveStreamUpdatePayload: liveStreamUpdatePayload) { (response, error) in @@ -150,7 +150,7 @@ LiveStreamsAPI.update(liveStreamId: liveStreamId, liveStreamUpdatePayload: liveS Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **liveStreamId** | **String** | The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. | + **liveStreamId** | **String** | The unique ID for the live stream that you want to update information for such as player details. | **liveStreamUpdatePayload** | [**LiveStreamUpdatePayload**](LiveStreamUpdatePayload.md) | | ### Return type diff --git a/docs/RawStatisticsAPI.md b/docs/RawStatisticsAPI.md deleted file mode 100644 index 85ec216..0000000 --- a/docs/RawStatisticsAPI.md +++ /dev/null @@ -1,180 +0,0 @@ -# RawStatisticsAPI - -All URIs are relative to *https://ws.api.video* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**listLiveStreamSessions**](RawStatisticsAPI.md#getanalyticslivestreamslivestreamid) | **GET** /analytics/live-streams/{liveStreamId} | List live stream player sessions -[**listSessionEvents**](RawStatisticsAPI.md#getanalyticssessionssessionidevents) | **GET** /analytics/sessions/{sessionId}/events | List player session events -[**listVideoSessions**](RawStatisticsAPI.md#getanalyticsvideosvideoid) | **GET** /analytics/videos/{videoId} | List video player sessions - - -# **listLiveStreamSessions** -```swift - open class func listLiveStreamSessions(liveStreamId: String, period: String, currentPage: Int? = nil, pageSize: Int? = nil, completion: @escaping (_ data: RawStatisticsListLiveStreamAnalyticsResponse?, _ error: Error?) -> Void) -``` - -List live stream player sessions - - -### 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 liveStreamId = "liveStreamId_example" // String | The unique identifier for the live stream you want to retrieve analytics for. -let period = "period_example" // String | Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\" -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) - -// List live stream player sessions -RawStatisticsAPI.listLiveStreamSessions(liveStreamId: liveStreamId, period: period, currentPage: currentPage, pageSize: pageSize) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **liveStreamId** | **String** | The unique identifier for the live stream you want to retrieve analytics for. | - **period** | **String** | Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\" | - **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 - -[**RawStatisticsListLiveStreamAnalyticsResponse**](RawStatisticsListLiveStreamAnalyticsResponse.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) - -# **listSessionEvents** -```swift - open class func listSessionEvents(sessionId: String, currentPage: Int? = nil, pageSize: Int? = nil, completion: @escaping (_ data: RawStatisticsListPlayerSessionEventsResponse?, _ error: Error?) -> Void) -``` - -List player session events - -Useful to track and measure video's engagement. - - -### 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 sessionId = "sessionId_example" // String | A unique identifier you can use to reference and track a session with. -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) - -// List player session events -RawStatisticsAPI.listSessionEvents(sessionId: sessionId, currentPage: currentPage, pageSize: pageSize) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sessionId** | **String** | A unique identifier you can use to reference and track a session with. | - **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 - -[**RawStatisticsListPlayerSessionEventsResponse**](RawStatisticsListPlayerSessionEventsResponse.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) - -# **listVideoSessions** -```swift - open class func listVideoSessions(videoId: String, period: String, metadata: [String: String]? = nil, currentPage: Int? = nil, pageSize: Int? = nil, completion: @escaping (_ data: RawStatisticsListSessionsResponse?, _ error: Error?) -> Void) -``` - -List video player sessions - -Retrieve all available user sessions for a specific video. Tutorials that use the [analytics endpoint](https://api.video/blog/endpoints/analytics). - - -### 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 videoId = "videoId_example" // String | The unique identifier for the video you want to retrieve session information for. -let period = "period_example" // String | Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 -let metadata = "TODO" // [String: String] | Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with. (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) - -// List video player sessions -RawStatisticsAPI.listVideoSessions(videoId: videoId, period: period, metadata: metadata, currentPage: currentPage, pageSize: pageSize) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **videoId** | **String** | The unique identifier for the video you want to retrieve session information for. | - **period** | **String** | Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 | - **metadata** | [**[String: String]**](String.md) | Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with. | [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 - -[**RawStatisticsListSessionsResponse**](RawStatisticsListSessionsResponse.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/RawStatisticsListLiveStreamAnalyticsResponse.md b/docs/RawStatisticsListLiveStreamAnalyticsResponse.md deleted file mode 100644 index 8c91977..0000000 --- a/docs/RawStatisticsListLiveStreamAnalyticsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# RawStatisticsListLiveStreamAnalyticsResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [LiveStreamSession] | | -**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/RawStatisticsListPlayerSessionEventsResponse.md b/docs/RawStatisticsListPlayerSessionEventsResponse.md deleted file mode 100644 index d3a1900..0000000 --- a/docs/RawStatisticsListPlayerSessionEventsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# RawStatisticsListPlayerSessionEventsResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [PlayerSessionEvent] | | -**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/RawStatisticsListSessionsResponse.md b/docs/RawStatisticsListSessionsResponse.md deleted file mode 100644 index b962546..0000000 --- a/docs/RawStatisticsListSessionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# RawStatisticsListSessionsResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [VideoSession] | | -**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) - -