mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add trackableEvents file
This commit is contained in:
parent
598b3a6000
commit
0a35393f57
1 changed files with 26 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
import Foundation
|
||||
|
||||
public enum TestEvent {
|
||||
case testEventOne
|
||||
case testEventTwo(extraData: String)
|
||||
}
|
||||
|
||||
extension TestEvent: TrackableEvent {
|
||||
public var name: String {
|
||||
switch self {
|
||||
case .testEventOne:
|
||||
return "testEventOne"
|
||||
case .testEventTwo:
|
||||
return "testEventTwo"
|
||||
}
|
||||
}
|
||||
|
||||
public var properties: [String: String]? {
|
||||
switch self {
|
||||
case .testEventOne:
|
||||
return nil
|
||||
case let .testEventTwo(extraData: extraData):
|
||||
return ["extraData": extraData]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue