Skip to content

Commit

Permalink
Merge pull request #38 from apivideo/date-rage-required-in-analytics
Browse files Browse the repository at this point in the history
feat(all) Date range param is required in analytics endpoints
  • Loading branch information
bot-api-video authored Sep 14, 2022
2 parents de358b3 + c575423 commit 8ba6e35
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 deletions.
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 @@
fa7ac2451c4cf442853cb5c85c8372aa1c7969a3232442adf3109d7346edc5f2
94990465713a14b6421dfb20f4a7e9ad69bcdc31aa22b7789aa907bbb3144304
4 changes: 2 additions & 2 deletions ApiVideoUploader.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion Sources/APIs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions Sources/APIs/AuthenticationAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand All @@ -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.
Expand All @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions docs/AuthenticationAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ 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**
```swift
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)

Expand All @@ -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)
Expand Down Expand Up @@ -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.

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down

0 comments on commit 8ba6e35

Please sign in to comment.