TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LifeDaojiaServiceServantSchedulingPushRequest req = new LifeDaojiaServiceServantSchedulingPushRequest();
req.setCustomId("234");
req.setCalendarList("[ { \"time_step\": 30, \"work_time\": [ { \"date\": \"2016- 04-17\", \"bitmap\": \"011111111\" } ] } ]");
req.setStatus(1L);
req.setExtraInfo("{ \"attributes\": \"code\", \" distance\": \"1\" }");
req.setSignTime(1465795897L);
LifeDaojiaServiceServantSchedulingPushResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LifeDaojiaServiceServantSchedulingPushRequest req = new LifeDaojiaServiceServantSchedulingPushRequest();
req.CustomId = "234";
req.CalendarList = "[ { \"time_step\": 30, \"work_time\": [ { \"date\": \"2016- 04-17\", \"bitmap\": \"011111111\" } ] } ]";
req.Status = 1L;
req.ExtraInfo = "{ \"attributes\": \"code\", \" distance\": \"1\" }";
req.SignTime = 1465795897L;
LifeDaojiaServiceServantSchedulingPushResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LifeDaojiaServiceServantSchedulingPushRequest;
$req->setCustomId("234");
$req->setCalendarList("[ { \"time_step\": 30, \"work_time\": [ { \"date\": \"2016- 04-17\", \"bitmap\": \"011111111\" } ] } ]");
$req->setStatus("1");
$req->setExtraInfo("{ \"attributes\": \"code\", \" distance\": \"1\" }");
$req->setSignTime("1465795897");
$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=taobao.life.daojia.service.servant.scheduling.push' \
-d 'partner_id=apidoc' \
-d 'session=5e92c020-935a-46d3-912c-5062cfb873ee' \
-d 'sign=B1D078ED020205729AD0B90A8C87883B' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-19+15%3A41%3A41' \
-d 'v=2.0' \
-d 'calendar_list=+++++%7B+++++++++%22time_step%22%3A+30%2C+++++++++%22work_time%22%3A+%5B+++++++++++++%7B+++++++++++++++++%22date%22%3A+%222016-+04-17%22%2C+++++++++++++++++%22bitmap%22%3A+%22011111111%22+++++++++++++%7D+++++++++%5D+++++%7D+' \
-d 'custom_id=234' \
-d 'extra_info=%7B+%5C%22attributes%5C%22%3A+%5C%22code%5C%22%2C+%5C%22+distance%5C%22%3A+%5C%221%5C%22+%7D' \
-d 'sign_time=1465795897' \
-d 'status=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LifeDaojiaServiceServantSchedulingPushRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.custom_id="234"
req.calendar_list="[ { \"time_step\": 30, \"work_time\": [ { \"date\": \"2016- 04-17\", \"bitmap\": \"011111111\" } ] } ]"
req.status=1
req.extra_info="{ \"attributes\": \"code\", \" distance\": \"1\" }"
req.sign_time=1465795897
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,"taobao.life.daojia.service.servant.scheduling.push");
add_param(pRequest,"custom_id","234");
add_param(pRequest,"calendar_list"," { "time_step": 30, "work_time": [ { "date": "2016- 04-17", "bitmap": "011111111" } ] } ");
add_param(pRequest,"status","1");
add_param(pRequest,"extra_info","{ \"attributes\": \"code\", \" distance\": \"1\" }");
add_param(pRequest,"sign_time","1465795897");
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('taobao.life.daojia.service.servant.scheduling.push', {
'custom_id':'234',
'calendar_list':' { "time_step": 30, "work_time": [ { "date": "2016- 04-17", "bitmap": "011111111" } ] } ',
'status':'1',
'extra_info':'{ \"attributes\": \"code\", \" distance\": \"1\" }',
'sign_time':'1465795897'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})