TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaInteractActivityRegisterRequest req = new AlibabaInteractActivityRegisterRequest();
req.setEntryUrl("http|https://appName.play.m.jaeapp.com/context/path?p1=x&p2=y");
req.setBizId("123");
req.setDescription("hello world");
req.setEndTime(StringUtils.parseDateTime("2014-09-22 17:04:13"));
req.setName("hello world");
req.setPicture("hello world");
req.setStartTime(StringUtils.parseDateTime("2014-09-22 17:04:13"));
req.setHasValidTime(false);
AlibabaInteractActivityRegisterResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaInteractActivityRegisterRequest req = new AlibabaInteractActivityRegisterRequest();
req.EntryUrl = "http|https://appName.play.m.jaeapp.com/context/path?p1=x&p2=y";
req.BizId = "123";
req.Description = "hello world";
req.EndTime = DateTime.Parse("2014-09-22 17:04:13");
req.Name = "hello world";
req.Picture = "hello world";
req.StartTime = DateTime.Parse("2014-09-22 17:04:13");
req.HasValidTime = false;
AlibabaInteractActivityRegisterResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaInteractActivityRegisterRequest;
$req->setEntryUrl("http|https://appName.play.m.jaeapp.com/context/path?p1=x&p2=y");
$req->setBizId("123");
$req->setDescription("hello world");
$req->setEndTime("2014-09-22 17:04:13");
$req->setName("hello world");
$req->setPicture("hello world");
$req->setStartTime("2014-09-22 17:04:13");
$req->setHasValidTime("false");
$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=alibaba.interact.activity.register' \
-d 'partner_id=apidoc' \
-d 'session=7eaa8677-eed3-42a0-951a-06789675df55' \
-d 'sign=15C795A47E8C32728B5C4DEA48416E46' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-27+13%3A42%3A01' \
-d 'v=2.0' \
-d 'biz_id=123' \
-d 'description=hello+world' \
-d 'end_time=2014-09-22+17%3A04%3A13' \
-d 'entry_url=http%7Chttps%3A%2F%2FappName.play.m.jaeapp.com%2Fcontext%2Fpath%3Fp1%3Dx%26p2%3Dy' \
-d 'has_valid_time=false' \
-d 'name=hello+world' \
-d 'picture=hello+world' \
-d 'start_time=2014-09-22+17%3A04%3A13'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaInteractActivityRegisterRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.entry_url="http|https://appName.play.m.jaeapp.com/context/path?p1=x&p2=y"
req.biz_id="123"
req.description="hello world"
req.end_time="2014-09-22 17:04:13"
req.name="hello world"
req.picture="hello world"
req.start_time="2014-09-22 17:04:13"
req.has_valid_time=false
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,"alibaba.interact.activity.register");
add_param(pRequest,"entry_url","http|https://appName.play.m.jaeapp.com/context/path?p1=x&p2=y");
add_param(pRequest,"biz_id","123");
add_param(pRequest,"description","hello world");
add_param(pRequest,"end_time","2014-09-22 17:04:13");
add_param(pRequest,"name","hello world");
add_param(pRequest,"picture","hello world");
add_param(pRequest,"start_time","2014-09-22 17:04:13");
add_param(pRequest,"has_valid_time","false");
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('alibaba.interact.activity.register', {
'entry_url':'http|https://appName.play.m.jaeapp.com/context/path?p1=x&p2=y',
'biz_id':'123',
'description':'hello world',
'end_time':'2014-09-22 17:04:13',
'name':'hello world',
'picture':'hello world',
'start_time':'2014-09-22 17:04:13',
'has_valid_time':'false'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})