mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 12:34:45 +08:00
add Analytics
This commit is contained in:
17
lib/api/analytics.dart
Normal file
17
lib/api/analytics.dart
Normal file
@ -0,0 +1,17 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:starcitizen_doctor/common/conf.dart';
|
||||
import 'package:starcitizen_doctor/common/utils/base_utils.dart';
|
||||
|
||||
class AnalyticsApi {
|
||||
static final Dio _dio = Dio();
|
||||
|
||||
static touch(String key) async {
|
||||
dPrint("AnalyticsApi.touch === $key start");
|
||||
try {
|
||||
await _dio.post("${AppConf.xkeycApiUrl}/analytics/$key");
|
||||
dPrint("AnalyticsApi.touch === $key over");
|
||||
} catch (e) {
|
||||
dPrint("AnalyticsApi.touch === $key Error:$e");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user