OTVEventTimeline
@interface OTVEventTimeline : NSObject
A timeline of events generated by the SDK
-
Declaration
Objective-C
@property (nonatomic, class, readonly, strong) OTVEventTimeline * _Nonnull shared
-
Set whether the timeline should capture events or not. \param enable whether events added to the timeline should be kept or not
Declaration
Objective-C
- (void)enableTimeline:(BOOL)enable;
-
Returns whether the timeline is enabled for capturing events.
Declaration
Objective-C
- (BOOL)isEnabled;
-
Returns all events that have been recorded.
Declaration
Objective-C
- (NSArray<OTVEvent *> *_Nonnull)getTimelineList;
-
Returns the latest events that have been recorded, up to the specified limit. \param limit The max number of latest events to return
Declaration
Objective-C
- (NSArray<OTVEvent *> *_Nonnull)getTimelineListWithLimit:(NSInteger)limit;
-
Returns the events that were recorded between the specified Dates. \param fromDate The earliest Date for events to include
\param toDate The latest Date for events to include
Declaration
Objective-C
- (NSArray<OTVEvent *> *_Nonnull)getTimelineListFrom:(NSDate *_Nonnull)fromDate to:(NSDate *_Nonnull)toDate;
-
Returns all the events that have been recorded with the specified type. \param type The type of events to return
Declaration
Objective-C
- (NSArray<OTVEvent *> *_Nonnull)getTimelineListWithType: (NSString *_Nonnull)type;
-
Adds the specified event data to the timeline \param type The type of the event
\param command The command of the event
\param extra Optional extra information for the event
Declaration
Objective-C
- (void)addToTimelineWithType:(NSString *_Nonnull)type command:(NSString *_Nonnull)command extra:(NSString *_Nullable)extra;
-
Removes all events from the timeline that were added prior to the specified Date. \param olderThan The reference Date to remove logs earlier than
Declaration
Objective-C
- (void)removeTimelineWithOlderThan:(NSDate *_Nonnull)olderThan;