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
enablewhether 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
limitThe 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
fromDateThe earliest Date for events to include
toDateThe 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
typeThe 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
typeThe type of the event
commandThe command of the event
extraOptional 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
olderThanThe reference Date to remove logs earlier than