Skip to content

Commit 55660ee

Browse files
Merge pull request #22 from apivideo/user-agent-extension
fix(swift5) fix typo
2 parents 7211f55 + 2b1764a commit 55660ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/APIs.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66

77
import Foundation
8-
enum ApiVideoClientError: Error {
8+
enum ApiVideoUploaderError: Error {
99
case invalidApplicationName
1010
}
1111

@@ -14,7 +14,7 @@ public class ApiVideoUploader {
1414

1515
public static var apiKey: String? = nil
1616
public static var basePath = "https://ws.api.video"
17-
internal static var customHeaders:[String: String] = ["User-Agent": ApiVideoClient.DEFAULT_USER_AGENT]
17+
internal static var customHeaders:[String: String] = ["User-Agent": ApiVideoUploader.DEFAULT_USER_AGENT]
1818
private static var chunkSize: Int = 50 * 1024 * 1024
1919
internal static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
2020
internal static var credential = ApiVideoCredential()
@@ -40,9 +40,9 @@ public class ApiVideoUploader {
4040
let stringRange = NSRange(location: 0, length: applicationName.utf16.count)
4141
let matches = regex.matches(in: applicationName, range: stringRange)
4242
if(matches.isEmpty) {
43-
throw ApiVideoClientError.invalidApplicationName
43+
throw ApiVideoUploaderError.invalidApplicationName
4444
}
45-
ApiVideoClient.customHeaders["User-Agent"] = ApiVideoClient.DEFAULT_USER_AGENT + " " + applicationName
45+
ApiVideoUploader.customHeaders["User-Agent"] = ApiVideoUploader.DEFAULT_USER_AGENT + " " + applicationName
4646
}
4747
}
4848

0 commit comments

Comments
 (0)