getAllTimeSinceToday method
Gets the stats from day 0 since today for the current user
Implementation
Future<AggregatedData?> getAllTimeSinceToday({
String? project,
}) async {
final path = '$_baseUrl/users/current/all_time_since_today';
final response = await _provider.get(
path,
headers: _defaultHeaders,
queryParams: {
if (project != null) 'project': project,
},
);
if (response.statusCode == 200) {
final data = (jsonDecode(response.body) as Map<String, dynamic>);
return AggregatedData.fromJson(data['data'] as Map<String, dynamic>);
}
return null;
}