TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkOptimusTouMaterialIdsGetRequest req = new TbkOptimusTouMaterialIdsGetRequest();
TbkOptimusTouMaterialIdsGetRequest.MaterialQuery obj1 = new TbkOptimusTouMaterialIdsGetRequest.MaterialQuery();
obj1.setPageNo(1L);
obj1.setSubject(1L);
obj1.setMaterialType(1L);
obj1.setPageSize(20L);
req.setMaterialQuery(obj1);
TbkOptimusTouMaterialIdsGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkOptimusTouMaterialIdsGetRequest req = new TbkOptimusTouMaterialIdsGetRequest();
TbkOptimusTouMaterialIdsGetRequest.MaterialQueryDomain obj1 = new TbkOptimusTouMaterialIdsGetRequest.MaterialQueryDomain();
obj1.PageNo = 1L;
obj1.Subject = 1L;
obj1.MaterialType = 1L;
obj1.PageSize = 20L;
req.MaterialQuery_ = obj1;
TbkOptimusTouMaterialIdsGetResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkOptimusTouMaterialIdsGetRequest;
$material_query = new MaterialQuery;
$material_query->page_no="1";
$material_query->subject="1";
$material_query->material_type="1";
$material_query->page_size="20";
$req->setMaterialQuery(json_encode($material_query));
$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=taobao.tbk.optimus.tou.material.ids.get' \
-d 'partner_id=apidoc' \
-d 'session=0a18de5a-5c5b-410d-b056-f47ac42195ff' \
-d 'sign=13E209E445468DEFA646EBAB47FA4672' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A09%3A59' \
-d 'v=2.0' \
-d 'material_query=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkOptimusTouMaterialIdsGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.material_query="数据结构示例JSON格式"
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,"taobao.tbk.optimus.tou.material.ids.get");
add_param(pRequest,"material_query","数据结构JSON示例");
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('taobao.tbk.optimus.tou.material.ids.get', {
'material_query':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})