TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LiveRoomCreateRequest req = new LiveRoomCreateRequest();
req.setMainAccountId(100L);
req.setUserId(100L);
req.setRoomNum(160560L);
req.setLandscape("false");
req.setTitle("12123");
req.setCoverImg("https://gw.alicnd.com/xxx");
req.setLiveChannelId(15L);
req.setAppointmentTime(1648014702822L);
req.setLiveEndTime(1648029102822L);
req.setLocation("在火星");
req.setLongitude("120.298501");
req.setLatitude("30.41875");
req.setExtParam("\"{\\"couldSubscribeGoods\\":true,}\"");
req.setAppId("0");
req.setLiveColumnId(88L);
req.setRoomType(1025L);
req.setCodeLevel(0L);
req.setVideoId("1");
req.setVideoCoverUrl("http://xxx");
req.setVideoCoverHeight(1920L);
req.setVideoCoverWidth(1280L);
req.setDescInfo("abcd");
req.setCoverImg169("https://gw.alicnd.com/xxx");
LiveRoomCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LiveRoomCreateRequest req = new LiveRoomCreateRequest();
req.MainAccountId = 100L;
req.UserId = 100L;
req.RoomNum = 160560L;
req.Landscape = "false";
req.Title = "12123";
req.CoverImg = "https://gw.alicnd.com/xxx";
req.LiveChannelId = 15L;
req.AppointmentTime = 1648014702822L;
req.LiveEndTime = 1648029102822L;
req.Location = "在火星";
req.Longitude = "120.298501";
req.Latitude = "30.41875";
req.ExtParam = "\"{\\"couldSubscribeGoods\\":true,}\"";
req.AppId = "0";
req.LiveColumnId = 88L;
req.RoomType = 1025L;
req.CodeLevel = 0L;
req.VideoId = "1";
req.VideoCoverUrl = "http://xxx";
req.VideoCoverHeight = 1920L;
req.VideoCoverWidth = 1280L;
req.DescInfo = "abcd";
req.CoverImg169 = "https://gw.alicnd.com/xxx";
LiveRoomCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LiveRoomCreateRequest;
$req->setMainAccountId("100");
$req->setUserId("100");
$req->setRoomNum("160560");
$req->setLandscape("false");
$req->setTitle("12123");
$req->setCoverImg("https://gw.alicnd.com/xxx");
$req->setLiveChannelId("15");
$req->setAppointmentTime("1648014702822");
$req->setLiveEndTime("1648029102822");
$req->setLocation("在火星");
$req->setLongitude("120.298501");
$req->setLatitude("30.41875");
$req->setExtParam("\"{\\"couldSubscribeGoods\\":true,}\"");
$req->setAppId("0");
$req->setLiveColumnId("88");
$req->setRoomType("1025");
$req->setCodeLevel("0");
$req->setVideoId("1");
$req->setVideoCoverUrl("http://xxx");
$req->setVideoCoverHeight("1920");
$req->setVideoCoverWidth("1280");
$req->setDescInfo("abcd");
$req->setCoverImg169("https://gw.alicnd.com/xxx");
$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.live.room.create' \
-d 'partner_id=apidoc' \
-d 'sign=756EE685FC6D153E2F05961D6A7239C5' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-26+06%3A47%3A51' \
-d 'v=2.0' \
-d 'app_id=0' \
-d 'appointment_time=1648014702822' \
-d 'code_level=0' \
-d 'cover_img=https%3A%2F%2Fgw.alicnd.com%2Fxxx' \
-d 'cover_img_169=https%3A%2F%2Fgw.alicnd.com%2Fxxx' \
-d 'desc_info=abcd' \
-d 'ext_param=%5C%22%7B%5C%5C%22couldSubscribeGoods%5C%5C%22%3Atrue%2C%7D%5C%22' \
-d 'landscape=false' \
-d 'latitude=30.41875' \
-d 'live_channel_id=15' \
-d 'live_column_id=88' \
-d 'live_end_time=1648029102822' \
-d 'location=%E5%9C%A8%E7%81%AB%E6%98%9F' \
-d 'longitude=120.298501' \
-d 'main_account_id=100' \
-d 'room_num=160560' \
-d 'room_type=1025' \
-d 'title=12123' \
-d 'user_id=100' \
-d 'video_cover_height=1920' \
-d 'video_cover_url=http%3A%2F%2Fxxx' \
-d 'video_cover_width=1280' \
-d 'video_id=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LiveRoomCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.main_account_id=100
req.user_id=100
req.room_num=160560
req.landscape="false"
req.title="12123"
req.cover_img="https://gw.alicnd.com/xxx"
req.live_channel_id=15
req.appointment_time=1648014702822
req.live_end_time=1648029102822
req.location="在火星"
req.longitude="120.298501"
req.latitude="30.41875"
req.ext_param="\"{\\"couldSubscribeGoods\\":true,}\""
req.app_id="0"
req.live_column_id=88
req.room_type=1025
req.code_level=0
req.video_id="1"
req.video_cover_url="http://xxx"
req.video_cover_height=1920
req.video_cover_width=1280
req.desc_info="abcd"
req.cover_img_169="https://gw.alicnd.com/xxx"
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.live.room.create");
add_param(pRequest,"main_account_id","100");
add_param(pRequest,"user_id","100");
add_param(pRequest,"room_num","160560");
add_param(pRequest,"landscape","false");
add_param(pRequest,"title","12123");
add_param(pRequest,"cover_img","https://gw.alicnd.com/xxx");
add_param(pRequest,"live_channel_id","15");
add_param(pRequest,"appointment_time","1648014702822");
add_param(pRequest,"live_end_time","1648029102822");
add_param(pRequest,"location","在火星");
add_param(pRequest,"longitude","120.298501");
add_param(pRequest,"latitude","30.41875");
add_param(pRequest,"ext_param","\"{\\"couldSubscribeGoods\\":true,}\"");
add_param(pRequest,"app_id","0");
add_param(pRequest,"live_column_id","88");
add_param(pRequest,"room_type","1025");
add_param(pRequest,"code_level","0");
add_param(pRequest,"video_id","1");
add_param(pRequest,"video_cover_url","http://xxx");
add_param(pRequest,"video_cover_height","1920");
add_param(pRequest,"video_cover_width","1280");
add_param(pRequest,"desc_info","abcd");
add_param(pRequest,"cover_img_169","https://gw.alicnd.com/xxx");
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.live.room.create', {
'main_account_id':'100',
'user_id':'100',
'room_num':'160560',
'landscape':'false',
'title':'12123',
'cover_img':'https://gw.alicnd.com/xxx',
'live_channel_id':'15',
'appointment_time':'1648014702822',
'live_end_time':'1648029102822',
'location':'在火星',
'longitude':'120.298501',
'latitude':'30.41875',
'ext_param':'\"{\\"couldSubscribeGoods\\":true,}\"',
'app_id':'0',
'live_column_id':'88',
'room_type':'1025',
'code_level':'0',
'video_id':'1',
'video_cover_url':'http://xxx',
'video_cover_height':'1920',
'video_cover_width':'1280',
'desc_info':'abcd',
'cover_img_169':'https://gw.alicnd.com/xxx'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})