TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCloudgameGamingGamemessageSendRequest req = new AlibabaCloudgameGamingGamemessageSendRequest();
AlibabaCloudgameGamingGamemessageSendRequest.TopGameMessageDto obj1 = new AlibabaCloudgameGamingGamemessageSendRequest.TopGameMessageDto();
obj1.setGameId("1");
obj1.setAccountDomain("1");
obj1.setTargetId("1");
obj1.setUtdid("1");
obj1.setStart(1L);
obj1.setVersion(1L);
obj1.setAccountId("1");
obj1.setOffline(false);
obj1.setMessageType("1");
obj1.setAction("1");
obj1.setFrontAppKey("30957117");
obj1.setTime(1L);
obj1.setProjectId("1");
obj1.setSysBreak(false);
req.setRequestParam(obj1);
AlibabaCloudgameGamingGamemessageSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaCloudgameGamingGamemessageSendRequest req = new AlibabaCloudgameGamingGamemessageSendRequest();
AlibabaCloudgameGamingGamemessageSendRequest.TopGameMessageDtoDomain obj1 = new AlibabaCloudgameGamingGamemessageSendRequest.TopGameMessageDtoDomain();
obj1.GameId = "1";
obj1.AccountDomain = "1";
obj1.TargetId = "1";
obj1.Utdid = "1";
obj1.Start = 1L;
obj1.Version = 1L;
obj1.AccountId = "1";
obj1.Offline = false;
obj1.MessageType = "1";
obj1.Action = "1";
obj1.FrontAppKey = "30957117";
obj1.Time = 1L;
obj1.ProjectId = "1";
obj1.SysBreak = false;
req.RequestParam_ = obj1;
AlibabaCloudgameGamingGamemessageSendResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaCloudgameGamingGamemessageSendRequest;
$request_param = new TopGameMessageDto;
$request_param->game_id="1";
$request_param->account_domain="1";
$request_param->target_id="1";
$request_param->utdid="1";
$request_param->start="1";
$request_param->version="1";
$request_param->account_id="1";
$request_param->offline="false";
$request_param->message_type="1";
$request_param->action="1";
$request_param->front_app_key="30957117";
$request_param->time="1";
$request_param->project_id="1";
$request_param->sys_break="false";
$req->setRequestParam(json_encode($request_param));
$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.cloudgame.gaming.gamemessage.send' \
-d 'partner_id=apidoc' \
-d 'sign=C2C40593E83FD9E8E962B264BADF4DC6' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-01+16%3A29%3A39' \
-d 'v=2.0' \
-d 'request_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaCloudgameGamingGamemessageSendRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.request_param=""
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.cloudgame.gaming.gamemessage.send");
add_param(pRequest,"request_param","数据结构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.cloudgame.gaming.gamemessage.send', {
'request_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})