Skip to content

Commit d3cf945

Browse files
author
olivierapivideo
authored
Add new analytics endpoints & livestream complete()
1 parent 388394f commit d3cf945

File tree

8 files changed

+16
-13
lines changed

8 files changed

+16
-13
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d7b342ceb1a4805da9e3d6355384e34c1a99e1300d01cac3ae3218c5738f11f1
1+
eb461cdcb4d761d06c557d85337aa59385162a8f6399442bf80f12e07d0b29f8

Sources/APIHelper.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ public struct APIHelper {
7777
result.append(URLQueryItem(name: item.key, value: "\(value)"))
7878
}
7979
}
80-
81-
if destination.isEmpty {
82-
return nil
83-
}
8480
return destination
8581
}
8682
}

Sources/APIs/VideosAPI.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ The latter allows you to split a video source into X chunks and send those chunk
395395
localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
396396
"token": token.encodeToJSON(),
397397
])
398+
398399

399400
var localVariableNillableHeaders: [String: Any?] = [
400401
"Content-Type": "multipart/form-data",
@@ -441,6 +442,8 @@ The latter allows you to split a video source into X chunks and send those chunk
441442
"token": token.encodeToJSON(),
442443
])
443444

445+
446+
444447
var localVariableNillableHeaders: [String: Any?] = [
445448
"Content-Type": "multipart/form-data",
446449
]

Sources/OpenISO8601DateFormatter.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public class OpenISO8601DateFormatter: DateFormatter {
3535
setup()
3636
}
3737

38+
override public func string(from date: Date) -> String {
39+
return OpenISO8601DateFormatter.withoutSeconds.string(from: date)
40+
}
41+
3842
override public func date(from string: String) -> Date? {
3943
if let result = super.date(from: string) {
4044
return result

Tests/TestResources/payloads/advancedauthentication/authenticate/responses/400.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"type" : "https://docs.api.video/docs/authenticationinvalid_credentials",
2+
"type" : "https://docs.api.video/reference/authentication-invalid-user-credentials",
33
"title" : "The user credentials were incorrect.",
44
"name" : "",
55
"status" : 400
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"status" : 400,
3-
"type" : "https://docs.api.video/docs/authenticationinvalid_credentials",
3+
"type" : "https://docs.api.video/reference/authentication-invalid-user-credentials",
44
"title" : "The user credentials were incorrect.",
55
"name" : ""
66
}

Tests/TestResources/payloads/videos/upload/responses/400.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"type" : "https://docs.api.video/docs/filealreadyuploaded",
2+
"type" : "https://docs.api.video/reference/video-source-already-uploaded",
33
"title" : "The source of the video is already uploaded.",
44
"name" : "file",
55
"status" : 400,
66
"problems" : [ {
7-
"type" : "https://docs.api.video/docs/filealreadyuploaded",
7+
"type" : "https://docs.api.video/reference/video-source-already-uploaded",
88
"title" : "The source of the video is already uploaded.",
99
"name" : "file"
1010
}, {
11-
"type" : "https://docs.api.video/docs/filealreadyuploaded",
11+
"type" : "https://docs.api.video/reference/video-source-already-uploaded",
1212
"title" : "The video xxxx has already been uploaded.",
1313
"name" : "video"
1414
}, {
15-
"type" : "https://docs.api.video/docs/filemissing",
15+
"type" : "https://docs.api.video/reference/uploaded-file-no-file",
1616
"title" : "There is no uploaded file in the request.",
1717
"name" : "file"
1818
}, {
19-
"type" : "https://docs.api.video/docs/multiplefilesuploaded",
19+
"type" : "https://docs.api.video/reference/uploaded-file-multiple-files",
2020
"title" : "There is more than one uploaded file in the request.",
2121
"name" : "file"
2222
} ]

Tests/TestResources/payloads/videos/upload/responses/404.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"type" : "https://docs.api.video/docs/resourcenot_found",
2+
"type" : "https://docs.api.video/reference/resource-not-found",
33
"title" : "The requested resource was not found.",
44
"name" : "videoId",
55
"status" : 404

0 commit comments

Comments
 (0)