mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 15:53:47 +08:00
22 lines
718 B
Dart
22 lines
718 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:starcitizen_doctor/common/conf/url_conf.dart';
|
|
import 'package:starcitizen_doctor/common/io/rs_http.dart';
|
|
import 'package:starcitizen_doctor/common/utils/base_utils.dart';
|
|
|
|
class AnalyticsApi {
|
|
static touch(String key) async {
|
|
// debug 不统计
|
|
if (kDebugMode) return;
|
|
dPrint("AnalyticsApi.touch === $key start");
|
|
try {
|
|
await RSHttp.postData("${URLConf.xkeycApiHome}/analytics/$key",
|
|
data: utf8.encode(json.encode({"test": "a"})), contentType: "application/json");
|
|
dPrint("AnalyticsApi.touch === $key over");
|
|
} catch (e) {
|
|
dPrint("AnalyticsApi.touch === $key Error:$e");
|
|
}
|
|
}
|
|
}
|