TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripAslanAtusFlightchangeAddflightchangeRequest req = new AlitripAslanAtusFlightchangeAddflightchangeRequest();
req.setParamAgentId(1L);
AlitripAslanAtusFlightchangeAddflightchangeRequest.FlightChangeDataDo obj1 = new AlitripAslanAtusFlightchangeAddflightchangeRequest.FlightChangeDataDo();
obj1.setBizType(1L);
obj1.setDataSource(0L);
obj1.setExtendJson("str");
obj1.setFlightChangeTime(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setFlightChangeTimeBegin("2010-11-23 10:00:00");
obj1.setFlightChangeTimeEnd("2010-11-23 10:00:00");
obj1.setFlightChangeType(1L);
obj1.setGmtCreate(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setGmtModified(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setId(1L);
obj1.setIsUpdateNewFltToNull(false);
obj1.setIsconfirmed(false);
obj1.setNewArrAirport("PEK");
obj1.setNewArrTime(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setNewDepAirport("SHA");
obj1.setNewDepTime(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setNewDepTimeStr("2010-11-23 10:00:00");
obj1.setNewFltNum("CA123");
obj1.setOldArrAirport("SHA");
obj1.setOldArrTime(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setOldDepAirport("PEK");
obj1.setOldDepTime(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setOldDepTimeStr("2010-11-23 10:00:00");
obj1.setOldDepTimeStrBegin("2010-11-23 10:00:00");
obj1.setOldDepTimeStrEnd("2010-11-23 10:00:00");
obj1.setOldFltNum("CA343");
obj1.setOpStatus(1L);
obj1.setOpTime(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setOperator("str");
obj1.setOrderId(123L);
obj1.setPnr("123123");
obj1.setPnrDate(StringUtils.parseDateTime("2010-11-23 10:00:00"));
obj1.setUserId(12312L);
req.setParamFlightChangeDataDO(obj1);
AlitripAslanAtusFlightchangeAddflightchangeResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripAslanAtusFlightchangeAddflightchangeRequest req = new AlitripAslanAtusFlightchangeAddflightchangeRequest();
req.ParamAgentId = 1L;
AlitripAslanAtusFlightchangeAddflightchangeRequest.FlightChangeDataDoDomain obj1 = new AlitripAslanAtusFlightchangeAddflightchangeRequest.FlightChangeDataDoDomain();
obj1.BizType = 1L;
obj1.DataSource = 0L;
obj1.ExtendJson = "str";
obj1.FlightChangeTime = DateTime.Parse(2010-11-23 10:00:00");
obj1.FlightChangeTimeBegin = "2010-11-23 10:00:00";
obj1.FlightChangeTimeEnd = "2010-11-23 10:00:00";
obj1.FlightChangeType = 1L;
obj1.GmtCreate = DateTime.Parse(2010-11-23 10:00:00");
obj1.GmtModified = DateTime.Parse(2010-11-23 10:00:00");
obj1.Id = 1L;
obj1.IsUpdateNewFltToNull = false;
obj1.Isconfirmed = false;
obj1.NewArrAirport = "PEK";
obj1.NewArrTime = DateTime.Parse(2010-11-23 10:00:00");
obj1.NewDepAirport = "SHA";
obj1.NewDepTime = DateTime.Parse(2010-11-23 10:00:00");
obj1.NewDepTimeStr = "2010-11-23 10:00:00";
obj1.NewFltNum = "CA123";
obj1.OldArrAirport = "SHA";
obj1.OldArrTime = DateTime.Parse(2010-11-23 10:00:00");
obj1.OldDepAirport = "PEK";
obj1.OldDepTime = DateTime.Parse(2010-11-23 10:00:00");
obj1.OldDepTimeStr = "2010-11-23 10:00:00";
obj1.OldDepTimeStrBegin = "2010-11-23 10:00:00";
obj1.OldDepTimeStrEnd = "2010-11-23 10:00:00";
obj1.OldFltNum = "CA343";
obj1.OpStatus = 1L;
obj1.OpTime = DateTime.Parse(2010-11-23 10:00:00");
obj1.Operator = "str";
obj1.OrderId = 123L;
obj1.Pnr = "123123";
obj1.PnrDate = DateTime.Parse(2010-11-23 10:00:00");
obj1.UserId = 12312L;
req.ParamFlightChangeDataDO_ = obj1;
AlitripAslanAtusFlightchangeAddflightchangeResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripAslanAtusFlightchangeAddflightchangeRequest;
$req->setParamAgentId("1");
$param_flight_change_data_d_o = new FlightChangeDataDo;
$param_flight_change_data_d_o->biz_type="1";
$param_flight_change_data_d_o->data_source="0";
$param_flight_change_data_d_o->extend_json="str";
$param_flight_change_data_d_o->flight_change_time="2010-11-23 10:00:00";
$param_flight_change_data_d_o->flight_change_time_begin="2010-11-23 10:00:00";
$param_flight_change_data_d_o->flight_change_time_end="2010-11-23 10:00:00";
$param_flight_change_data_d_o->flight_change_type="1";
$param_flight_change_data_d_o->gmt_create="2010-11-23 10:00:00";
$param_flight_change_data_d_o->gmt_modified="2010-11-23 10:00:00";
$param_flight_change_data_d_o->id="1";
$param_flight_change_data_d_o->is_update_new_flt_to_null="false";
$param_flight_change_data_d_o->isconfirmed="false";
$param_flight_change_data_d_o->new_arr_airport="PEK";
$param_flight_change_data_d_o->new_arr_time="2010-11-23 10:00:00";
$param_flight_change_data_d_o->new_dep_airport="SHA";
$param_flight_change_data_d_o->new_dep_time="2010-11-23 10:00:00";
$param_flight_change_data_d_o->new_dep_time_str="2010-11-23 10:00:00";
$param_flight_change_data_d_o->new_flt_num="CA123";
$param_flight_change_data_d_o->old_arr_airport="SHA";
$param_flight_change_data_d_o->old_arr_time="2010-11-23 10:00:00";
$param_flight_change_data_d_o->old_dep_airport="PEK";
$param_flight_change_data_d_o->old_dep_time="2010-11-23 10:00:00";
$param_flight_change_data_d_o->old_dep_time_str="2010-11-23 10:00:00";
$param_flight_change_data_d_o->old_dep_time_str_begin="2010-11-23 10:00:00";
$param_flight_change_data_d_o->old_dep_time_str_end="2010-11-23 10:00:00";
$param_flight_change_data_d_o->old_flt_num="CA343";
$param_flight_change_data_d_o->op_status="1";
$param_flight_change_data_d_o->op_time="2010-11-23 10:00:00";
$param_flight_change_data_d_o->operator="str";
$param_flight_change_data_d_o->order_id="123";
$param_flight_change_data_d_o->pnr="123123";
$param_flight_change_data_d_o->pnr_date="2010-11-23 10:00:00";
$param_flight_change_data_d_o->user_id="12312";
$req->setParamFlightChangeDataDO(json_encode($param_flight_change_data_d_o));
$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.aslan.atus.flightchange.addflightchange' \
-d 'partner_id=apidoc' \
-d 'session=c88d5941-469f-45fc-a06c-07066d5085fb' \
-d 'sign=81651EA445D73E430898F0F17E2492F2' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+21%3A57%3A50' \
-d 'v=2.0' \
-d 'param_agent_id=1' \
-d 'param_flight_change_data_d_o=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripAslanAtusFlightchangeAddflightchangeRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_agent_id=1
req.param_flight_change_data_d_o=""
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.aslan.atus.flightchange.addflightchange");
add_param(pRequest,"param_agent_id","1");
add_param(pRequest,"param_flight_change_data_d_o","数据结构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.aslan.atus.flightchange.addflightchange', {
'param_agent_id':'1',
'param_flight_change_data_d_o':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})