TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityJaqAppShieldRequest req = new AlibabaSecurityJaqAppShieldRequest();
AlibabaSecurityJaqAppShieldRequest.ScanAppInfo obj1 = new AlibabaSecurityJaqAppShieldRequest.ScanAppInfo();
obj1.setDataType(1L);
obj1.setData("http://xsx.com/123412.apk");
obj1.setMd5("dd5b29a800246d7089febf228286d901");
obj1.setSize(21341L);
obj1.setCallbackUrl("http://aaa.com/callback");
obj1.setAppOsType(1L);
req.setAppInfo(obj1);
AlibabaSecurityJaqAppShieldRequest.ShieldChannel obj2 = new AlibabaSecurityJaqAppShieldRequest.ShieldChannel();
obj2.setValues(""91","360"");
obj2.setMetaName("channel");
req.setChannel(obj2);
AlibabaSecurityJaqAppShieldResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSecurityJaqAppShieldRequest req = new AlibabaSecurityJaqAppShieldRequest();
AlibabaSecurityJaqAppShieldRequest.ScanAppInfoDomain obj1 = new AlibabaSecurityJaqAppShieldRequest.ScanAppInfoDomain();
obj1.DataType = 1L;
obj1.Data = "http://xsx.com/123412.apk";
obj1.Md5 = "dd5b29a800246d7089febf228286d901";
obj1.Size = 21341L;
obj1.CallbackUrl = "http://aaa.com/callback";
obj1.AppOsType = 1L;
req.AppInfo_ = obj1;
AlibabaSecurityJaqAppShieldRequest.ShieldChannelDomain obj2 = new AlibabaSecurityJaqAppShieldRequest.ShieldChannelDomain();
obj2.Values = ""91","360"";
obj2.MetaName = "channel";
req.Channel_ = obj2;
AlibabaSecurityJaqAppShieldResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSecurityJaqAppShieldRequest;
$app_info = new ScanAppInfo;
$app_info->data_type="1";
$app_info->data="http://xsx.com/123412.apk";
$app_info->md5="dd5b29a800246d7089febf228286d901";
$app_info->size="21341";
$app_info->callback_url="http://aaa.com/callback";
$app_info->app_os_type="1";
$req->setAppInfo(json_encode($app_info));
$channel = new ShieldChannel;
$channel->values="[\"91\",\"360\"]";
$channel->meta_name="channel";
$req->setChannel(json_encode($channel));
$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.app.shield' \
-d 'partner_id=apidoc' \
-d 'sign=DB0F0155DCA6D2271B6AB67C511A5873' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+15%3A05%3A51' \
-d 'v=2.0' \
-d 'app_info=null' \
-d 'channel=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSecurityJaqAppShieldRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.app_info=""
req.channel=""
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.app.shield");
add_param(pRequest,"app_info","数据结构JSON示例");
add_param(pRequest,"channel","数据结构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.security.jaq.app.shield', {
'app_info':'数据结构JSON示例',
'channel':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})