TMDStats Class Reference

Inherits from NSObject
Declared in TMDStats.h

Overview

TMDStats contains statistics on modalities (arrays of TMDStatsValue) sorted by dates. Each TMDStatsValue comes with the modality name, the combined sum of CO2 emissions, distance and duration for the user and for the community.

– init

- (instancetype)init

– initWithDictionary:

- (instancetype)initWithDictionary:(NSDictionary<NSString*,NSArray<TMDStatsValue*> *> *)dictionary

– initWithStatsValues:betweenDate:andDate:

- (instancetype)initWithStatsValues:(NSArray<TMDStatsValue*> *)statsValues betweenDate:(NSString *)startDateString andDate:(NSString *)endDateString

– hasSameDataThanStats:

- (BOOL)hasSameDataThanStats:(TMDStats *)other

– statsForDate:

- (NSArray<TMDStatsValue*> *)statsForDate:(NSString *)dateString

– dates

- (NSArray<NSString*> *)dates

– allStats

- (NSArray<TMDStatsValue*> *)allStats

+ fromJsonData:error:betweenDate:andDate:

+ (TMDStats *)fromJsonData:(NSData *)jsonData error:(NSError *_Nullable *)error betweenDate:(NSString *)startDateString andDate:(NSString *)endDateString