OTVEventTimeline
public class OTVEventTimeline : NSObject
A timeline of events generated by the SDK
-
The global instance of the event timeline
Declaration
Swift
@objc public static let shared: OTVEventTimeline
-
Set whether the timeline should capture events or not.
Declaration
Swift
@objc public func enableTimeline(_ enable: Bool)
Parameters
enable
whether events added to the timeline should be kept or not
-
Returns whether the timeline is enabled for capturing events.
Declaration
Swift
@objc public func isEnabled() -> Bool
-
Returns all events that have been recorded.
Declaration
Swift
@objc public func getTimelineList() -> [OTVEvent]
-
Returns the latest events that have been recorded, up to the specified limit.
Declaration
Swift
@objc public func getTimelineList(limit: Int) -> [OTVEvent]
Parameters
limit
The max number of latest events to return
-
Returns the events that were recorded between the specified Dates.
Declaration
Swift
@objc public func getTimelineList(from fromDate: Date, to toDate: Date) -> [OTVEvent]
Parameters
fromDate
The earliest Date for events to include
toDate
The latest Date for events to include
-
Returns all the events that have been recorded with the specified type.
Declaration
Swift
@objc public func getTimelineList(type: String) -> [OTVEvent]
Parameters
type
The type of events to return
-
Adds the specified event data to the timeline
Declaration
Swift
@objc public func addToTimeline(type: String, command: String, extra: String? = nil)
Parameters
type
The type of the event
command
The command of the event
extra
Optional extra information for the event
-
Removes all events from the timeline that were added prior to the specified Date.
Declaration
Swift
@objc public func removeTimeline(olderThan: Date)
Parameters
olderThan
The reference Date to remove logs earlier than