TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripOpenplatformAddressGetRequest req = new AlitripBtripOpenplatformAddressGetRequest();
AlitripBtripOpenplatformAddressGetRequest.OpenApiJumpInfoRq obj1 = new AlitripBtripOpenplatformAddressGetRequest.OpenApiJumpInfoRq();
obj1.setCorpId("testcorp");
obj1.setUserId("testuser");
obj1.setType(1L);
obj1.setItineraryId("uiuiuiuiuiui");
obj1.setPhone("13133227788");
obj1.setActionType(1L);
obj1.setVersion(2L);
AlitripBtripOpenplatformAddressGetRequest.CorpInfoRq obj2 = new AlitripBtripOpenplatformAddressGetRequest.CorpInfoRq();
obj2.setCorpId("testcorp");
obj2.setCorpName("测试企业");
obj2.setIndustry("科技");
obj2.setProvince("浙江省");
obj2.setCity("杭州市");
obj2.setContact("某某");
obj2.setMobile("13133227788");
obj2.setScope(1L);
obj2.setPeopleSize(10000L);
obj1.setCorpInfoRq(obj2);
AlitripBtripOpenplatformAddressGetRequest.UserInfoRq obj3 = new AlitripBtripOpenplatformAddressGetRequest.UserInfoRq();
obj3.setUserId("testuser");
obj3.setPosition("管理员");
obj3.setDepartId(1L);
obj3.setRealName("某某");
obj3.setRealNameEn("hu/lingfeng");
obj3.setPhone("13133227788");
obj3.setJobNo("1222");
obj3.setEmail("123124@qq.com");
obj3.setPositionLevel("manager");
obj1.setUserInfoRq(obj3);
req.setRq(obj1);
AlitripBtripOpenplatformAddressGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripOpenplatformAddressGetRequest req = new AlitripBtripOpenplatformAddressGetRequest();
AlitripBtripOpenplatformAddressGetRequest.OpenApiJumpInfoRqDomain obj1 = new AlitripBtripOpenplatformAddressGetRequest.OpenApiJumpInfoRqDomain();
obj1.CorpId = "testcorp";
obj1.UserId = "testuser";
obj1.Type = 1L;
obj1.ItineraryId = "uiuiuiuiuiui";
obj1.Phone = "13133227788";
obj1.ActionType = 1L;
obj1.Version = 2L;
AlitripBtripOpenplatformAddressGetRequest.CorpInfoRqDomain obj2 = new AlitripBtripOpenplatformAddressGetRequest.CorpInfoRqDomain();
obj2.CorpId = "testcorp";
obj2.CorpName = "测试企业";
obj2.Industry = "科技";
obj2.Province = "浙江省";
obj2.City = "杭州市";
obj2.Contact = "某某";
obj2.Mobile = "13133227788";
obj2.Scope = 1L;
obj2.PeopleSize = 10000L;
obj1.CorpInfoRq= obj2;
AlitripBtripOpenplatformAddressGetRequest.UserInfoRqDomain obj3 = new AlitripBtripOpenplatformAddressGetRequest.UserInfoRqDomain();
obj3.UserId = "testuser";
obj3.Position = "管理员";
obj3.DepartId = 1L;
obj3.RealName = "某某";
obj3.RealNameEn = "hu/lingfeng";
obj3.Phone = "13133227788";
obj3.JobNo = "1222";
obj3.Email = "123124@qq.com";
obj3.PositionLevel = "manager";
obj1.UserInfoRq= obj3;
req.Rq_ = obj1;
AlitripBtripOpenplatformAddressGetResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripOpenplatformAddressGetRequest;
$rq = new OpenApiJumpInfoRq;
$rq->corp_id="testcorp";
$rq->user_id="testuser";
$rq->type="1";
$rq->itinerary_id="uiuiuiuiuiui";
$rq->phone="13133227788";
$rq->action_type="1";
$rq->version="2";
$corp_info_rq = new CorpInfoRq;
$corp_info_rq->corp_id="testcorp";
$corp_info_rq->corp_name="测试企业";
$corp_info_rq->industry="科技";
$corp_info_rq->province="浙江省";
$corp_info_rq->city="杭州市";
$corp_info_rq->contact="某某";
$corp_info_rq->mobile="13133227788";
$corp_info_rq->scope="1";
$corp_info_rq->people_size="10000";
$rq->corp_info_rq = $corp_info_rq;
$user_info_rq = new UserInfoRq;
$user_info_rq->user_id="testuser";
$user_info_rq->position="管理员";
$user_info_rq->depart_id="1";
$user_info_rq->real_name="某某";
$user_info_rq->real_name_en="hu/lingfeng";
$user_info_rq->phone="13133227788";
$user_info_rq->job_no="1222";
$user_info_rq->email="123124@qq.com";
$user_info_rq->position_level="manager";
$rq->user_info_rq = $user_info_rq;
$req->setRq(json_encode($rq));
$resp = $c->execute($req, $sessionKey);
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=alitrip.btrip.openplatform.address.get' \
-d 'partner_id=apidoc' \
-d 'session=18945d97-9f83-4fe3-b946-be0251e05cc5' \
-d 'sign=B8302D08238448598A6EAE3A442075A7' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+23%3A56%3A41' \
-d 'v=2.0' \
-d 'rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripOpenplatformAddressGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.rq=""
try:
resp= req.getResponse(sessionkey)
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,"alitrip.btrip.openplatform.address.get");
add_param(pRequest,"rq","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
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('alitrip.btrip.openplatform.address.get', {
'rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})