TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIcbuRiskSendRequest req = new AlibabaIcbuRiskSendRequest();
AlibabaIcbuRiskSendRequest.EventData obj1 = new AlibabaIcbuRiskSendRequest.EventData();
obj1.setEventCode("icbu_minisite_module");
obj1.setExtend("{\"key\":\"value\"}");
obj1.setEventItemId("60782468510");
obj1.setCallbackId("60782468510");
obj1.setEventItem("productId");
AlibabaIcbuRiskSendRequest.EnvInfo obj2 = new AlibabaIcbuRiskSendRequest.EnvInfo();
obj2.setWua("iicq");
obj2.setUmid("H6e9bc8ffdd9047a0a17f475da2621756d");
obj2.setIp("42.120.73.172");
obj2.setImei("861536030196001");
obj2.setImsi("460030912121001");
obj2.setUa("ssq");
obj2.setMac("00:0C:29:CA:E4:66");
obj1.setEnvInfo(obj2);
obj1.setEventTime(1656310295722L);
req.setEventData(obj1);
AlibabaIcbuRiskSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaIcbuRiskSendRequest req = new AlibabaIcbuRiskSendRequest();
AlibabaIcbuRiskSendRequest.EventDataDomain obj1 = new AlibabaIcbuRiskSendRequest.EventDataDomain();
obj1.EventCode = "icbu_minisite_module";
obj1.Extend = "{\"key\":\"value\"}";
obj1.EventItemId = "60782468510";
obj1.CallbackId = "60782468510";
obj1.EventItem = "productId";
AlibabaIcbuRiskSendRequest.EnvInfoDomain obj2 = new AlibabaIcbuRiskSendRequest.EnvInfoDomain();
obj2.Wua = "iicq";
obj2.Umid = "H6e9bc8ffdd9047a0a17f475da2621756d";
obj2.Ip = "42.120.73.172";
obj2.Imei = "861536030196001";
obj2.Imsi = "460030912121001";
obj2.Ua = "ssq";
obj2.Mac = "00:0C:29:CA:E4:66";
obj1.EnvInfo= obj2;
obj1.EventTime = 1656310295722L;
req.EventData_ = obj1;
AlibabaIcbuRiskSendResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaIcbuRiskSendRequest;
$event_data = new EventData;
$event_data->event_code="icbu_minisite_module";
$event_data->extend="{\"key\":\"value\"}";
$event_data->event_item_id="60782468510";
$event_data->callback_id="60782468510";
$event_data->event_item="productId";
$env_info = new EnvInfo;
$env_info->wua="iicq";
$env_info->umid="H6e9bc8ffdd9047a0a17f475da2621756d";
$env_info->ip="42.120.73.172";
$env_info->imei="861536030196001";
$env_info->imsi="460030912121001";
$env_info->ua="ssq";
$env_info->mac="00:0C:29:CA:E4:66";
$event_data->env_info = $env_info;
$event_data->event_time="1656310295722";
$req->setEventData(json_encode($event_data));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.icbu.risk.send' \
-d 'partner_id=apidoc' \
-d 'sign=77139B3CCD477F8D1240403D7046386D' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-22+00%3A38%3A54' \
-d 'v=2.0' \
-d 'event_data=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaIcbuRiskSendRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.event_data="数据结构示例JSON格式"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.icbu.risk.send");
add_param(pRequest,"event_data","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.icbu.risk.send', {
'event_data':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})