TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AilabAicloudTopLikeFilterRequest req = new AilabAicloudTopLikeFilterRequest();
req.setSchema("36653b6e-f41a-11e6-bc64-92361f002671");
req.setUserId("13911112222");
req.setUtdId("V944n0HrnZ4DAAtOStvvDat7");
req.setExt("{\"appType\":\"IOS\",\"appVersion\":\"1.0\"}");
req.setType("music");
List<AilabAicloudTopLikeFilterRequest.MediaItem> list2 = new ArrayList<AilabAicloudTopLikeFilterRequest.MediaItem>();
AilabAicloudTopLikeFilterRequest.MediaItem obj3 = new AilabAicloudTopLikeFilterRequest.MediaItem();
list2.add(obj3);
obj3.setContent("{}");
obj3.setAlbumId("1221");
obj3.setSource("qingting");
obj3.setLength(1212L);
obj3.setIsAlbum(false);
obj3.setItemId("12121212");
obj3.setExtendInfo("{}");
req.setMediaItems(list2);
AilabAicloudTopLikeFilterResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AilabAicloudTopLikeFilterRequest req = new AilabAicloudTopLikeFilterRequest();
req.Schema = "36653b6e-f41a-11e6-bc64-92361f002671";
req.UserId = "13911112222";
req.UtdId = "V944n0HrnZ4DAAtOStvvDat7";
req.Ext = "{\"appType\":\"IOS\",\"appVersion\":\"1.0\"}";
req.Type = "music";
List<AilabAicloudTopLikeFilterRequest.MediaItemDomain> list2 = new List<AilabAicloudTopLikeFilterRequest.MediaItemDomain>();
AilabAicloudTopLikeFilterRequest.MediaItemDomain obj3 = new AilabAicloudTopLikeFilterRequest.MediaItemDomain();
list2.Add(obj3);
obj3.Content = "{}";
obj3.AlbumId = "1221";
obj3.Source = "qingting";
obj3.Length = 1212L;
obj3.IsAlbum = false;
obj3.ItemId = "12121212";
obj3.ExtendInfo = "{}";
req.MediaItems_ = list2;
AilabAicloudTopLikeFilterResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AilabAicloudTopLikeFilterRequest;
$req->setSchema("36653b6e-f41a-11e6-bc64-92361f002671");
$req->setUserId("13911112222");
$req->setUtdId("V944n0HrnZ4DAAtOStvvDat7");
$req->setExt("{\"appType\":\"IOS\",\"appVersion\":\"1.0\"}");
$req->setType("music");
$media_items = new MediaItem;
$media_items->content="{}";
$media_items->album_id="1221";
$media_items->source="qingting";
$media_items->length="1212";
$media_items->is_album="false";
$media_items->item_id="12121212";
$media_items->extend_info="{}";
$req->setMediaItems(json_encode($media_items));
$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=taobao.ailab.aicloud.top.like.filter' \
-d 'partner_id=apidoc' \
-d 'sign=49D617E3811524F636B40A431F1AC46C' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-19+17%3A40%3A39' \
-d 'v=2.0' \
-d 'ext=%7B%5C%22appType%5C%22%3A%5C%22IOS%5C%22%2C%5C%22appVersion%5C%22%3A%5C%221.0%5C%22%7D' \
-d 'media_items=null' \
-d 'schema=36653b6e-f41a-11e6-bc64-92361f002671' \
-d 'type=music' \
-d 'user_id=13911112222' \
-d 'utd_id=V944n0HrnZ4DAAtOStvvDat7'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AilabAicloudTopLikeFilterRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.schema="36653b6e-f41a-11e6-bc64-92361f002671"
req.user_id="13911112222"
req.utd_id="V944n0HrnZ4DAAtOStvvDat7"
req.ext="{\"appType\":\"IOS\",\"appVersion\":\"1.0\"}"
req.type="music"
req.media_items=""
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,"taobao.ailab.aicloud.top.like.filter");
add_param(pRequest,"schema","36653b6e-f41a-11e6-bc64-92361f002671");
add_param(pRequest,"user_id","13911112222");
add_param(pRequest,"utd_id","V944n0HrnZ4DAAtOStvvDat7");
add_param(pRequest,"ext","{\"appType\":\"IOS\",\"appVersion\":\"1.0\"}");
add_param(pRequest,"type","music");
add_param(pRequest,"media_items","数据结构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('taobao.ailab.aicloud.top.like.filter', {
'schema':'36653b6e-f41a-11e6-bc64-92361f002671',
'user_id':'13911112222',
'utd_id':'V944n0HrnZ4DAAtOStvvDat7',
'ext':'{\"appType\":\"IOS\",\"appVersion\":\"1.0\"}',
'type':'music',
'media_items':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})