reportApiCallbackEvent method
void
reportApiCallbackEvent({})
上报调用 api 后的异步回调结果
Implementation
void reportApiCallbackEvent(
{required String moduleName,
String? moduleVersion,
required String apiCallback,
String? params,
String? response,
required int requestId,
int? costTime,
int code = 0,
int time = 0,
bool rightNow = false}) {
final timestamp = time == 0 ? DateTime.now().millisecond : time;
final item = {
keyApiCallback: apiCallback,
keyEventParams: params,
keyResponse: response,
keyEventRequestId: requestId,
keyCode: code,
keyTime: timestamp,
keyCostTime: costTime
};
_log(
'reportApiCallbackEvent=> moduleName:$moduleName,moduleVersion:$moduleVersion,'
'apiCallback:$apiCallback,params:$params,code:$code,response:$response,'
'time:$time,rightNow:$rightNow,requestId:$requestId,costTime:$costTime',
true);
_report(
_generateItem(moduleName, _getModuleVersion(moduleName, moduleVersion),
reportTypeEventApi,
item: item, timestamp: timestamp),
rightNow: rightNow);
}