TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaLyTrainingrecordInsertRequest req = new AlibabaLyTrainingrecordInsertRequest();
AlibabaLyTrainingrecordInsertRequest.TrainingRecordDTO obj1 = new AlibabaLyTrainingrecordInsertRequest.TrainingRecordDTO();
obj1.setProjId(1L);
obj1.setTrainingId("\"1\"");
obj1.setExtra("\"1\"");
obj1.setTenantId(1L);
obj1.setTrainingResult("\"1\"");
obj1.setUserId(1L);
req.setTrainingRecordDto(obj1);
AlibabaLyTrainingrecordInsertResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaLyTrainingrecordInsertRequest req = new AlibabaLyTrainingrecordInsertRequest();
AlibabaLyTrainingrecordInsertRequest.TrainingRecordDTODomain obj1 = new AlibabaLyTrainingrecordInsertRequest.TrainingRecordDTODomain();
obj1.ProjId = 1L;
obj1.TrainingId = "\"1\"";
obj1.Extra = "\"1\"";
obj1.TenantId = 1L;
obj1.TrainingResult = "\"1\"";
obj1.UserId = 1L;
req.TrainingRecordDto_ = obj1;
AlibabaLyTrainingrecordInsertResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaLyTrainingrecordInsertRequest;
$training_record_dto = new TrainingRecordDTO;
$training_record_dto->proj_id="1";
$training_record_dto->training_id="\"1\"";
$training_record_dto->extra="\"1\"";
$training_record_dto->tenant_id="1";
$training_record_dto->training_result="\"1\"";
$training_record_dto->user_id="1";
$req->setTrainingRecordDto(json_encode($training_record_dto));
$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.ly.trainingrecord.insert' \
-d 'partner_id=apidoc' \
-d 'sign=8FD4E6FE6D964A230D6F62FD7CC95CA3' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+15%3A42%3A21' \
-d 'v=2.0' \
-d 'training_record_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaLyTrainingrecordInsertRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.training_record_dto="数据结构示例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.ly.trainingrecord.insert");
add_param(pRequest,"training_record_dto","数据结构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.ly.trainingrecord.insert', {
'training_record_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})