shlink-manager/lib/API/Classes/ShortURL/visits_summary.dart

20 lines
482 B
Dart
Raw Normal View History

2024-01-27 23:07:06 +01:00
/// Visitor data
class VisitsSummary {
/// Count of total visits
int total;
2024-01-28 00:32:09 +01:00
2024-01-27 23:07:06 +01:00
/// Count of visits from humans
int nonBots;
2024-01-28 00:32:09 +01:00
2024-01-27 23:07:06 +01:00
/// Count of visits from bots/crawlers
int bots;
VisitsSummary(this.total, this.nonBots, this.bots);
/// Converts JSON data from the API to an instance of [VisitsSummary]
2024-01-28 00:32:09 +01:00
VisitsSummary.fromJson(Map<String, dynamic> json)
: total = json["total"] as int,
nonBots = json["nonBots"] as int,
bots = json["bots"] as int;
}