From c57542396590a7afff5b6105e68f1b558b60ebcb Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Tue, 13 Sep 2022 16:02:53 +0000 Subject: [PATCH] feat(all) Date range param is required in analytics endpoints --- .../oas_apivideo.yaml-defaut-cli.sha256 | 2 +- ApiVideoUploader.podspec | 4 ++-- CHANGELOG.md | 3 +++ README.md | 4 ++-- Sources/APIs.swift | 2 +- Sources/APIs/AuthenticationAPI.swift | 8 ++++---- docs/AuthenticationAPI.md | 12 ++++++------ project.yml | 2 +- 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 1549f9f..bedb4e1 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -fa7ac2451c4cf442853cb5c85c8372aa1c7969a3232442adf3109d7346edc5f2 \ No newline at end of file +94990465713a14b6421dfb20f4a7e9ad69bcdc31aa22b7789aa907bbb3144304 \ No newline at end of file diff --git a/ApiVideoUploader.podspec b/ApiVideoUploader.podspec index 3cf11ed..bddc98e 100644 --- a/ApiVideoUploader.podspec +++ b/ApiVideoUploader.podspec @@ -4,8 +4,8 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.12' s.tvos.deployment_target = '10.0' s.watchos.deployment_target = '3.0' - s.version = '1.0.0' - s.source = { :git => 'https://github.com/apivideo/api.video-ios-uploader', :tag => 'v1.0.0' } + s.version = '1.0.1' + s.source = { :git => 'https://github.com/apivideo/api.video-ios-uploader', :tag => 'v1.0.1' } s.authors = { 'Ecosystem Team' => 'ecosystem@api.video' } s.license = { :type => 'MIT' } s.homepage = 'https://docs.api.video' diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6e2fe..69dce3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to this project will be documented in this file. +## [1.0.1] - 2022-09-13 +- period parameter is now mandatory in analytics endpoints + ## [1.0.0] - 2022-07-05 - Add SDK origin header diff --git a/README.md b/README.md index c51c48b..4746fd3 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,14 @@ It allows you to upload videos in two ways: Specify it in your `Cartfile`: ``` -github "apivideo/api.video-ios-uploader" ~> 1.0.0 +github "apivideo/api.video-ios-uploader" ~> 1.0.1 ``` Run `carthage update` ### CocoaPods -Add `pod 'ApiVideoUploader', '1.0.0'` in your `Podfile` +Add `pod 'ApiVideoUploader', '1.0.1'` in your `Podfile` Run `pod install` diff --git a/Sources/APIs.swift b/Sources/APIs.swift index 6e3765f..aa6a681 100644 --- a/Sources/APIs.swift +++ b/Sources/APIs.swift @@ -13,7 +13,7 @@ enum ApiVideoUploaderError: Error { public class ApiVideoUploader { public static var apiKey: String? = nil public static var basePath = "https://ws.api.video" - internal static var customHeaders:[String: String] = ["AV-Origin-Client": "ios-uploader:1.0.0"] + internal static var customHeaders:[String: String] = ["AV-Origin-Client": "ios-uploader:1.0.1"] private static var chunkSize: Int = 50 * 1024 * 1024 internal static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() internal static var credential = ApiVideoCredential() diff --git a/Sources/APIs/AuthenticationAPI.swift b/Sources/APIs/AuthenticationAPI.swift index c0bb716..f073fe7 100644 --- a/Sources/APIs/AuthenticationAPI.swift +++ b/Sources/APIs/AuthenticationAPI.swift @@ -13,7 +13,7 @@ import AnyCodable open class AuthenticationAPI { /** - Authenticate + Advanced - Authenticate (1/2) - parameter authenticatePayload: (body) - parameter apiResponseQueue: The queue on which api response is dispatched. @@ -33,7 +33,7 @@ open class AuthenticationAPI { /** - Authenticate + Advanced - Authenticate (1/2) - POST /auth/api-key - To get started, submit your API key in the body of your request. api.video returns an access token that is valid for one hour (3600 seconds). A refresh token is also returned. View a [tutorial](https://api.video/blog/tutorials/authentication-tutorial) on authentication. All tutorials using the [authentication endpoint](https://api.video/blog/endpoints/authenticate) - parameter authenticatePayload: (body) @@ -59,7 +59,7 @@ open class AuthenticationAPI { /** - Refresh token + Advanced - Refresh token (2/2) - parameter refreshTokenPayload: (body) - parameter apiResponseQueue: The queue on which api response is dispatched. @@ -79,7 +79,7 @@ open class AuthenticationAPI { /** - Refresh token + Advanced - Refresh token (2/2) - POST /auth/refresh - Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint. Send the refresh token in the body of your request. The api.video API returns a new access token that is valid for one hour (3600 seconds) and a new refresh token. - parameter refreshTokenPayload: (body) diff --git a/docs/AuthenticationAPI.md b/docs/AuthenticationAPI.md index 3e46a79..d46d691 100644 --- a/docs/AuthenticationAPI.md +++ b/docs/AuthenticationAPI.md @@ -4,8 +4,8 @@ All URIs are relative to *https://ws.api.video* Method | HTTP request | Description ------------- | ------------- | ------------- -[**authenticate**](AuthenticationAPI.md#postauthapikey) | **POST** /auth/api-key | Authenticate -[**refresh**](AuthenticationAPI.md#postauthrefresh) | **POST** /auth/refresh | Refresh token +[**authenticate**](AuthenticationAPI.md#postauthapikey) | **POST** /auth/api-key | Advanced - Authenticate (1/2) +[**refresh**](AuthenticationAPI.md#postauthrefresh) | **POST** /auth/refresh | Advanced - Refresh token (2/2) # **authenticate** @@ -13,7 +13,7 @@ Method | HTTP request | Description open class func authenticate(authenticatePayload: AuthenticatePayload, completion: @escaping (_ data: AccessToken?, _ error: Error?) -> Void) ``` -Authenticate +Advanced - Authenticate (1/2) To get started, submit your API key in the body of your request. api.video returns an access token that is valid for one hour (3600 seconds). A refresh token is also returned. View a [tutorial](https://api.video/blog/tutorials/authentication-tutorial) on authentication. All tutorials using the [authentication endpoint](https://api.video/blog/endpoints/authenticate) @@ -25,7 +25,7 @@ import ApiVideoUploader let authenticatePayload = authenticate-payload(apiKey: "apiKey_example") // AuthenticatePayload | -// Authenticate +// Advanced - Authenticate (1/2) AuthenticationAPI.authenticate(authenticatePayload: authenticatePayload) { (response, error) in guard error == nil else { print(error) @@ -64,7 +64,7 @@ No authorization required open class func refresh(refreshTokenPayload: RefreshTokenPayload, completion: @escaping (_ data: AccessToken?, _ error: Error?) -> Void) ``` -Refresh token +Advanced - Refresh token (2/2) Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint. Send the refresh token in the body of your request. The api.video API returns a new access token that is valid for one hour (3600 seconds) and a new refresh token. @@ -76,7 +76,7 @@ import ApiVideoUploader let refreshTokenPayload = refresh-token-payload(refreshToken: "refreshToken_example") // RefreshTokenPayload | -// Refresh token +// Advanced - Refresh token (2/2) AuthenticationAPI.refresh(refreshTokenPayload: refreshTokenPayload) { (response, error) in guard error == nil else { print(error) diff --git a/project.yml b/project.yml index 8c31322..39bfcf2 100644 --- a/project.yml +++ b/project.yml @@ -7,7 +7,7 @@ targets: sources: [Sources] info: path: ./Info.plist - version: 1.0.0 + version: 1.0.1 settings: APPLICATION_EXTENSION_API_ONLY: true scheme: {}