TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaTaobaoLivePlatformgiftAllowRequest req = new AlibabaTaobaoLivePlatformgiftAllowRequest();
AlibabaTaobaoLivePlatformgiftAllowRequest.PlatformGiftAllowRequest obj1 = new AlibabaTaobaoLivePlatformgiftAllowRequest.PlatformGiftAllowRequest();
obj1.setLiveSource("zhifubao");
obj1.setBizId("11");
obj1.setUserId(213L);
obj1.setEntryLiveSource("zhifubao");
obj1.setScene("live");
obj1.setIsTest(false);
req.setPlatformGiftAllowRequest(obj1);
AlibabaTaobaoLivePlatformgiftAllowResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaTaobaoLivePlatformgiftAllowRequest req = new AlibabaTaobaoLivePlatformgiftAllowRequest();
AlibabaTaobaoLivePlatformgiftAllowRequest.PlatformGiftAllowRequestDomain obj1 = new AlibabaTaobaoLivePlatformgiftAllowRequest.PlatformGiftAllowRequestDomain();
obj1.LiveSource = "zhifubao";
obj1.BizId = "11";
obj1.UserId = 213L;
obj1.EntryLiveSource = "zhifubao";
obj1.Scene = "live";
obj1.IsTest = false;
req.PlatformGiftAllowRequest_ = obj1;
AlibabaTaobaoLivePlatformgiftAllowResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaTaobaoLivePlatformgiftAllowRequest;
$platform_gift_allow_request = new PlatformGiftAllowRequest;
$platform_gift_allow_request->live_source="zhifubao";
$platform_gift_allow_request->biz_id="11";
$platform_gift_allow_request->user_id="213";
$platform_gift_allow_request->entry_live_source="zhifubao";
$platform_gift_allow_request->scene="live";
$platform_gift_allow_request->is_test="false";
$req->setPlatformGiftAllowRequest(json_encode($platform_gift_allow_request));
$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=alibaba.taobao.live.platformgift.allow' \
-d 'partner_id=apidoc' \
-d 'sign=B7E887271C954FE10102CB6E00756CC5' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+19%3A24%3A17' \
-d 'v=2.0' \
-d 'platform_gift_allow_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.taobaoLivePlatformgiftAllowRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.platform_gift_allow_request="数据结构示例JSON格式"
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,"alibaba.taobao.live.platformgift.allow");
add_param(pRequest,"platform_gift_allow_request","数据结构JSON示例");
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('alibaba.taobao.live.platformgift.allow', {
'platform_gift_allow_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})