TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityJaqCampaignpreventionResultFetchRequest req = new AlibabaSecurityJaqCampaignpreventionResultFetchRequest();
req.setIdNumber("18800777777777777777");
req.setSdkToken("3b730b4f-1572-4de1-9770-a11c1cf0a4d0");
req.setActivityDescription("抽奖");
req.setActivityId("19900");
req.setAddress("浙江阿里巴巴");
req.setAgent("Mozilia");
req.setBankCardNumber("6225 XXXX XXXX XXXX");
req.setCompanyName("淘宝");
req.setCookie("4SOMZWCI-LXU15");
req.setCurrentUrl("http://jaq.alibaba.com");
req.setEmail("jaq@jaq.alibaba.com");
req.setExtendData("{}");
req.setIdType(1L);
req.setIp("10.10.10.1");
req.setJsToken("35679566");
req.setMacAddress("3E0-77A-BC6-F8D-110-3C6");
req.setPhoneNumber("13033338907");
req.setPrize("大礼包");
req.setPrizeType(1L);
req.setProtocolVersion("1.0");
req.setReferer("http://jaq.alibaba.com");
req.setRegisterDate(1450596239L);
req.setRegisterIp("10.10.10.1");
req.setSessionId("EF6YBX1WO2-SBX6XU62O60TJ0W6TMMW2-BUYTHCJI-UWCT");
req.setSource(3L);
req.setUserId("887755");
req.setUserName("jaqniu");
AlibabaSecurityJaqCampaignpreventionResultFetchResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSecurityJaqCampaignpreventionResultFetchRequest req = new AlibabaSecurityJaqCampaignpreventionResultFetchRequest();
req.IdNumber = "18800777777777777777";
req.SdkToken = "3b730b4f-1572-4de1-9770-a11c1cf0a4d0";
req.ActivityDescription = "抽奖";
req.ActivityId = "19900";
req.Address = "浙江阿里巴巴";
req.Agent = "Mozilia";
req.BankCardNumber = "6225 XXXX XXXX XXXX";
req.CompanyName = "淘宝";
req.Cookie = "4SOMZWCI-LXU15";
req.CurrentUrl = "http://jaq.alibaba.com";
req.Email = "jaq@jaq.alibaba.com";
req.ExtendData = "{}";
req.IdType = 1L;
req.Ip = "10.10.10.1";
req.JsToken = "35679566";
req.MacAddress = "3E0-77A-BC6-F8D-110-3C6";
req.PhoneNumber = "13033338907";
req.Prize = "大礼包";
req.PrizeType = 1L;
req.ProtocolVersion = "1.0";
req.Referer = "http://jaq.alibaba.com";
req.RegisterDate = 1450596239L;
req.RegisterIp = "10.10.10.1";
req.SessionId = "EF6YBX1WO2-SBX6XU62O60TJ0W6TMMW2-BUYTHCJI-UWCT";
req.Source = 3L;
req.UserId = "887755";
req.UserName = "jaqniu";
AlibabaSecurityJaqCampaignpreventionResultFetchResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSecurityJaqCampaignpreventionResultFetchRequest;
$req->setIdNumber("18800777777777777777");
$req->setSdkToken("3b730b4f-1572-4de1-9770-a11c1cf0a4d0");
$req->setActivityDescription("抽奖");
$req->setActivityId("19900");
$req->setAddress("浙江阿里巴巴");
$req->setAgent("Mozilia");
$req->setBankCardNumber("6225 XXXX XXXX XXXX");
$req->setCompanyName("淘宝");
$req->setCookie("4SOMZWCI-LXU15");
$req->setCurrentUrl("http://jaq.alibaba.com");
$req->setEmail("jaq@jaq.alibaba.com");
$req->setExtendData("{}");
$req->setIdType("1");
$req->setIp("10.10.10.1");
$req->setJsToken("35679566");
$req->setMacAddress("3E0-77A-BC6-F8D-110-3C6");
$req->setPhoneNumber("13033338907");
$req->setPrize("大礼包");
$req->setPrizeType("1");
$req->setProtocolVersion("1.0");
$req->setReferer("http://jaq.alibaba.com");
$req->setRegisterDate("1450596239");
$req->setRegisterIp("10.10.10.1");
$req->setSessionId("EF6YBX1WO2-SBX6XU62O60TJ0W6TMMW2-BUYTHCJI-UWCT");
$req->setSource("3");
$req->setUserId("887755");
$req->setUserName("jaqniu");
$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.security.jaq.campaignprevention.result.fetch' \
-d 'partner_id=apidoc' \
-d 'sign=46C4CC76FBE06BC2B8DE7B608043E96A' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+15%3A02%3A07' \
-d 'v=2.0' \
-d 'activity_description=%E6%8A%BD%E5%A5%96' \
-d 'activity_id=19900' \
-d 'address=%E6%B5%99%E6%B1%9F%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4' \
-d 'agent=Mozilia' \
-d 'bank_card_number=6225+XXXX+XXXX+XXXX' \
-d 'company_name=%E6%B7%98%E5%AE%9D' \
-d 'cookie=4SOMZWCI-LXU15' \
-d 'current_url=http%3A%2F%2Fjaq.alibaba.com' \
-d 'email=jaq%40jaq.alibaba.com' \
-d 'extend_data=%7B%7D' \
-d 'id_number=18800777777777777777' \
-d 'id_type=1' \
-d 'ip=10.10.10.1' \
-d 'js_token=35679566' \
-d 'mac_address=3E0-77A-BC6-F8D-110-3C6' \
-d 'phone_number=13033338907' \
-d 'prize=%E5%A4%A7%E7%A4%BC%E5%8C%85' \
-d 'prize_type=1' \
-d 'protocol_version=1.0' \
-d 'referer=http%3A%2F%2Fjaq.alibaba.com' \
-d 'register_date=1450596239' \
-d 'register_ip=10.10.10.1' \
-d 'sdk_token=3b730b4f-1572-4de1-9770-a11c1cf0a4d0' \
-d 'session_id=EF6YBX1WO2-SBX6XU62O60TJ0W6TMMW2-BUYTHCJI-UWCT' \
-d 'source=3' \
-d 'user_id=887755' \
-d 'user_name=jaqniu'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSecurityJaqCampaignpreventionResultFetchRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.id_number="18800777777777777777"
req.sdk_token="3b730b4f-1572-4de1-9770-a11c1cf0a4d0"
req.activity_description="抽奖"
req.activity_id="19900"
req.address="浙江阿里巴巴"
req.agent="Mozilia"
req.bank_card_number="6225 XXXX XXXX XXXX"
req.company_name="淘宝"
req.cookie="4SOMZWCI-LXU15"
req.current_url="http://jaq.alibaba.com"
req.email="jaq@jaq.alibaba.com"
req.extend_data="{}"
req.id_type=1
req.ip="10.10.10.1"
req.js_token="35679566"
req.mac_address="3E0-77A-BC6-F8D-110-3C6"
req.phone_number="13033338907"
req.prize="大礼包"
req.prize_type=1
req.protocol_version="1.0"
req.referer="http://jaq.alibaba.com"
req.register_date=1450596239
req.register_ip="10.10.10.1"
req.session_id="EF6YBX1WO2-SBX6XU62O60TJ0W6TMMW2-BUYTHCJI-UWCT"
req.source=3
req.user_id="887755"
req.user_name="jaqniu"
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.security.jaq.campaignprevention.result.fetch");
add_param(pRequest,"id_number","18800777777777777777");
add_param(pRequest,"sdk_token","3b730b4f-1572-4de1-9770-a11c1cf0a4d0");
add_param(pRequest,"activity_description","抽奖");
add_param(pRequest,"activity_id","19900");
add_param(pRequest,"address","浙江阿里巴巴");
add_param(pRequest,"agent","Mozilia");
add_param(pRequest,"bank_card_number","6225 XXXX XXXX XXXX");
add_param(pRequest,"company_name","淘宝");
add_param(pRequest,"cookie","4SOMZWCI-LXU15");
add_param(pRequest,"current_url","http://jaq.alibaba.com");
add_param(pRequest,"email","jaq@jaq.alibaba.com");
add_param(pRequest,"extend_data","{}");
add_param(pRequest,"id_type","1");
add_param(pRequest,"ip","10.10.10.1");
add_param(pRequest,"js_token","35679566");
add_param(pRequest,"mac_address","3E0-77A-BC6-F8D-110-3C6");
add_param(pRequest,"phone_number","13033338907");
add_param(pRequest,"prize","大礼包");
add_param(pRequest,"prize_type","1");
add_param(pRequest,"protocol_version","1.0");
add_param(pRequest,"referer","http://jaq.alibaba.com");
add_param(pRequest,"register_date","1450596239");
add_param(pRequest,"register_ip","10.10.10.1");
add_param(pRequest,"session_id","EF6YBX1WO2-SBX6XU62O60TJ0W6TMMW2-BUYTHCJI-UWCT");
add_param(pRequest,"source","3");
add_param(pRequest,"user_id","887755");
add_param(pRequest,"user_name","jaqniu");
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.security.jaq.campaignprevention.result.fetch', {
'id_number':'18800777777777777777',
'sdk_token':'3b730b4f-1572-4de1-9770-a11c1cf0a4d0',
'activity_description':'抽奖',
'activity_id':'19900',
'address':'浙江阿里巴巴',
'agent':'Mozilia',
'bank_card_number':'6225 XXXX XXXX XXXX',
'company_name':'淘宝',
'cookie':'4SOMZWCI-LXU15',
'current_url':'http://jaq.alibaba.com',
'email':'jaq@jaq.alibaba.com',
'extend_data':'{}',
'id_type':'1',
'ip':'10.10.10.1',
'js_token':'35679566',
'mac_address':'3E0-77A-BC6-F8D-110-3C6',
'phone_number':'13033338907',
'prize':'大礼包',
'prize_type':'1',
'protocol_version':'1.0',
'referer':'http://jaq.alibaba.com',
'register_date':'1450596239',
'register_ip':'10.10.10.1',
'session_id':'EF6YBX1WO2-SBX6XU62O60TJ0W6TMMW2-BUYTHCJI-UWCT',
'source':'3',
'user_id':'887755',
'user_name':'jaqniu'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})