Skip to content

Commit 630c1a6

Browse files
Merge pull request #99 from apivideo/analytics-updates
Analytics updates
2 parents 19d9474 + 8a9856d commit 630c1a6

30 files changed

+295
-87
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3c9f9d1c48428c25a16b809ddeab072c978d6d1c689903a76e3d66a69a36a233
1+
589578120105165c9f58683fbe2fb917dabfaf9392187865f30956f8e4964d5a

ApiVideoClient.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Pod::Spec.new do |s|
55
s.tvos.deployment_target = '10.0'
66
# Add back when CocoaPods/CocoaPods#11558 is released
77
#s.watchos.deployment_target = '3.0'
8-
s.version = '1.3.5'
9-
s.source = { :git => 'https://github.com/apivideo/api.video-swift-client', :tag => 'v1.3.5' }
8+
s.version = '1.3.6'
9+
s.source = { :git => 'https://github.com/apivideo/api.video-swift-client', :tag => 'v1.3.6' }
1010
s.authors = { 'Ecosystem Team' => 'ecosystem@api.video' }
1111
s.license = { :type => 'MIT' }
1212
s.homepage = 'https://docs.api.video'

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All changes to this project will be documented in this file.
33

4+
## [1.3.6] - 2024-11-04
5+
- Analytics updates (ccv, views, ...)
6+
47
## [1.3.5] - 2024-10-21
58
- Add summary feature
69
- Add support for Alamofire 5.10

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ api.video's Swift API client for iOS, macOS and tvOS streamlines the coding proc
5757
Specify it in your `Cartfile`:
5858

5959
```
60-
github "apivideo/api.video-swift-client" ~> 1.3.5
60+
github "apivideo/api.video-swift-client" ~> 1.3.6
6161
```
6262

6363
Run `carthage update`
6464

6565
#### CocoaPods
6666

67-
Add `pod 'ApiVideoClient', '1.3.5'` in your `Podfile`
67+
Add `pod 'ApiVideoClient', '1.3.6'` in your `Podfile`
6868

6969
Run `pod install`
7070

Sources/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Foundation
88
public class ApiVideoClient {
99
public static var apiKey: String? = nil
1010
public static var basePath = "https://ws.api.video"
11-
internal static var customHeaders:[String: String] = ["AV-Origin-Client": "swift:1.3.5"]
11+
internal static var customHeaders:[String: String] = ["AV-Origin-Client": "swift:1.3.6"]
1212
private static var chunkSize: Int = 50 * 1024 * 1024
1313
internal static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
1414
internal static var credential = ApiVideoCredential()

Sources/APIs/AnalyticsAPI.swift

Lines changed: 108 additions & 42 deletions
Large diffs are not rendered by default.

Sources/Models/AnalyticsAggregatedMetricsResponseContext.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ public struct AnalyticsAggregatedMetricsResponseContext: Codable, Hashable {
1919
case impression = "impression"
2020
case impressionTime = "impression-time"
2121
case watchTime = "watch-time"
22+
case ccv = "ccv"
23+
case uniqueCcv = "unique-ccv"
24+
case view3 = "view-3"
25+
case view5 = "view-5"
26+
case view10 = "view-10"
27+
case view30 = "view-30"
28+
case uniqueView = "unique-view"
29+
case uniqueView3 = "unique-view-3"
30+
case uniqueView5 = "unique-view-5"
31+
case uniqueView10 = "unique-view-10"
32+
case uniqueView30 = "unique-view-30"
2233
}
2334
public enum Aggregation: String, Codable, CaseIterable {
2435
case count = "count"
@@ -27,7 +38,7 @@ public struct AnalyticsAggregatedMetricsResponseContext: Codable, Hashable {
2738
case average = "average"
2839
case sum = "sum"
2940
}
30-
/** Returns the metric you selected. */
41+
/** Returns the metric and relevant parameters you selected. */
3142
public var metric: Metric?
3243
/** Returns the aggregation you selected. */
3344
public var aggregation: Aggregation?

Sources/Models/AnalyticsMetricsBreakdownResponseContext.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ public struct AnalyticsMetricsBreakdownResponseContext: Codable, Hashable {
1818
case start = "start"
1919
case end = "end"
2020
case impression = "impression"
21+
case ccvAverage = "ccv-average"
22+
case ccvPeak = "ccv-peak"
23+
case uniqueCcvAverage = "unique-ccv-average"
24+
case uniqueCcvPeak = "unique-ccv-peak"
25+
case view3 = "view-3"
26+
case view5 = "view-5"
27+
case view10 = "view-10"
28+
case view30 = "view-30"
29+
case uniqueView = "unique-view"
30+
case uniqueView3 = "unique-view-3"
31+
case uniqueView5 = "unique-view-5"
32+
case uniqueView10 = "unique-view-10"
33+
case uniqueView30 = "unique-view-30"
2134
}
2235
public enum Breakdown: String, Codable, CaseIterable {
2336
case mediaId = "media-id"
@@ -28,7 +41,7 @@ public struct AnalyticsMetricsBreakdownResponseContext: Codable, Hashable {
2841
case operatingSystem = "operating-system"
2942
case browser = "browser"
3043
}
31-
/** Returns the metric you selected. */
44+
/** Returns the metric and relevant parameters you selected. */
3245
public var metric: Metric?
3346
/** Returns the dimension you selected. */
3447
public var breakdown: Breakdown?

Sources/Models/AnalyticsMetricsOverTimeResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import AnyCodable
1313
public struct AnalyticsMetricsOverTimeResponse: Codable, Hashable {
1414

1515
public var context: AnalyticsMetricsOverTimeResponseContext
16-
/** Returns an array of metrics and the timestamps . */
16+
/** Returns an array of metrics and the timestamps. */
1717
public var data: [AnalyticsMetricsOverTimeResponseData]
1818
public var pagination: Pagination
1919

Sources/Models/AnalyticsMetricsOverTimeResponseContext.swift

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,26 @@ public struct AnalyticsMetricsOverTimeResponseContext: Codable, Hashable {
1818
case start = "start"
1919
case end = "end"
2020
case impression = "impression"
21+
case ccvAverage = "ccv-average"
22+
case ccvPeak = "ccv-peak"
23+
case uniqueCcvAverage = "unique-ccv-average"
24+
case uniqueCcvPeak = "unique-ccv-peak"
25+
case view3 = "view-3"
26+
case view5 = "view-5"
27+
case view10 = "view-10"
28+
case view30 = "view-30"
29+
case uniqueView = "unique-view"
30+
case uniqueView3 = "unique-view-3"
31+
case uniqueView5 = "unique-view-5"
32+
case uniqueView10 = "unique-view-10"
33+
case uniqueView30 = "unique-view-30"
2134
}
2235
public enum Interval: String, Codable, CaseIterable {
36+
case minute = "minute"
2337
case hour = "hour"
2438
case day = "day"
2539
}
26-
/** Returns the metric you selected. */
40+
/** Returns the metric and relevant parameters you selected. */
2741
public var metric: Metric?
2842
/** Returns the interval you selected. */
2943
public var interval: Interval?

0 commit comments

Comments
 (0)