TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCloudgameLiteplayGamingEventReceiveRequest req = new AlibabaCloudgameLiteplayGamingEventReceiveRequest();
AlibabaCloudgameLiteplayGamingEventReceiveRequest.ReceiveGamingEventRequestDto obj1 = new AlibabaCloudgameLiteplayGamingEventReceiveRequest.ReceiveGamingEventRequestDto();
obj1.setGameId("xxxa");
obj1.setEventCode("POP_DISPATCHED");
obj1.setEventMessage("调度成功");
obj1.setTimeStamp(1623333333L);
obj1.setAccountId("2333");
obj1.setGameSessionId("gamesession11333");
obj1.setAccountDomain("0");
obj1.setAction("GAME_DISPAATCH");
obj1.setFrontAppKey("ake");
obj1.setProjectId("1");
obj1.setVersion(1L);
req.setRequestParam(obj1);
AlibabaCloudgameLiteplayGamingEventReceiveResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaCloudgameLiteplayGamingEventReceiveRequest req = new AlibabaCloudgameLiteplayGamingEventReceiveRequest();
AlibabaCloudgameLiteplayGamingEventReceiveRequest.ReceiveGamingEventRequestDtoDomain obj1 = new AlibabaCloudgameLiteplayGamingEventReceiveRequest.ReceiveGamingEventRequestDtoDomain();
obj1.GameId = "xxxa";
obj1.EventCode = "POP_DISPATCHED";
obj1.EventMessage = "调度成功";
obj1.TimeStamp = 1623333333L;
obj1.AccountId = "2333";
obj1.GameSessionId = "gamesession11333";
obj1.AccountDomain = "0";
obj1.Action = "GAME_DISPAATCH";
obj1.FrontAppKey = "ake";
obj1.ProjectId = "1";
obj1.Version = 1L;
req.RequestParam_ = obj1;
AlibabaCloudgameLiteplayGamingEventReceiveResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaCloudgameLiteplayGamingEventReceiveRequest;
$request_param = new ReceiveGamingEventRequestDto;
$request_param->game_id="xxxa";
$request_param->event_code="POP_DISPATCHED";
$request_param->event_message="调度成功";
$request_param->time_stamp="1623333333";
$request_param->account_id="2333";
$request_param->game_session_id="gamesession11333";
$request_param->account_domain="0";
$request_param->action="GAME_DISPAATCH";
$request_param->front_app_key="ake";
$request_param->project_id="1";
$request_param->version="1";
$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.liteplay.gaming.event.receive' \
-d 'partner_id=apidoc' \
-d 'sign=F8C7CFF8282D9FB7465B0F1F28A8FB54' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-01+16%3A03%3A05' \
-d 'v=2.0' \
-d 'request_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaCloudgameLiteplayGamingEventReceiveRequest(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.liteplay.gaming.event.receive");
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.liteplay.gaming.event.receive', {
'request_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})