TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
DdyLocationGetRequest req = new DdyLocationGetRequest();
req.setAppName("appName");
req.setToken("token");
DdyLocationGetRequest.UserLocationQuery obj1 = new DdyLocationGetRequest.UserLocationQuery();
obj1.setIdType("taobao_id");
obj1.setIp("ip");
obj1.setStartTime(StringUtils.parseDateTime("2017-05-23 15:12:33"));
obj1.setId("id");
obj1.setEndTime(StringUtils.parseDateTime("2017-05-23 15:12:33"));
obj1.setQueryType("JUST_IP_LOCATION");
req.setQuery(obj1);
DdyLocationGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
DdyLocationGetRequest req = new DdyLocationGetRequest();
req.AppName = "appName";
req.Token = "token";
DdyLocationGetRequest.UserLocationQueryDomain obj1 = new DdyLocationGetRequest.UserLocationQueryDomain();
obj1.IdType = "taobao_id";
obj1.Ip = "ip";
obj1.StartTime = DateTime.Parse(2017-05-23 15:12:33");
obj1.Id = "id";
obj1.EndTime = DateTime.Parse(2017-05-23 15:12:33");
obj1.QueryType = "JUST_IP_LOCATION";
req.Query_ = obj1;
DdyLocationGetResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new DdyLocationGetRequest;
$req->setAppName("appName");
$req->setToken("token");
$query = new UserLocationQuery;
$query->id_type="taobao_id";
$query->ip="ip";
$query->start_time="2017-05-23 15:12:33";
$query->id="id";
$query->end_time="2017-05-23 15:12:33";
$query->query_type="JUST_IP_LOCATION";
$req->setQuery(json_encode($query));
$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=taobao.ddy.location.get' \
-d 'partner_id=apidoc' \
-d 'sign=67FB9349B2863550B4561B9D5C618B3D' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-20+04%3A28%3A13' \
-d 'v=2.0' \
-d 'app_name=appName' \
-d 'query=null' \
-d 'token=token'
# -*- coding: utf-8 -*-
import top.api
req=top.api.DdyLocationGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.app_name="appName"
req.token="token"
req.query=""
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,"taobao.ddy.location.get");
add_param(pRequest,"app_name","appName");
add_param(pRequest,"token","token");
add_param(pRequest,"query","数据结构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('taobao.ddy.location.get', {
'app_name':'appName',
'token':'token',
'query':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})