mirror of
https://github.com/rainloreley/shlink-manager.git
synced 2024-11-10 06:05:14 +01:00
17 lines
474 B
Dart
17 lines
474 B
Dart
|
/// Visitor data
|
||
|
class VisitsSummary {
|
||
|
/// Count of total visits
|
||
|
int total;
|
||
|
/// Count of visits from humans
|
||
|
int nonBots;
|
||
|
/// 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]
|
||
|
VisitsSummary.fromJson(Map<String, dynamic> json):
|
||
|
total = json["total"] as int,
|
||
|
nonBots = json["nonBots"] as int,
|
||
|
bots = json["bots"] as int;
|
||
|
}
|