TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaInteractionImMessageCardParseRequest req = new AlibabaInteractionImMessageCardParseRequest();
AlibabaInteractionImMessageCardParseRequest.CardSearchContentQuery obj1 = new AlibabaInteractionImMessageCardParseRequest.CardSearchContentQuery();
obj1.setMessages("https://workspace.alibaba.com/card?type=2000&fromUid=4235710082&toUid=3044989792&country=CN&ids=1600955996818&ctime=1703664418548&sign=9D7FECCAECABCF45FE93678034FA7638E59395E6&");
obj1.setLanguage("en");
obj1.setCurrency("CNY");
obj1.setCountry("CN");
req.setQuery(obj1);
req.setFromAccountId(111L);
req.setTargetAccountId(222L);
AlibabaInteractionImMessageCardParseResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaInteractionImMessageCardParseRequest req = new AlibabaInteractionImMessageCardParseRequest();
AlibabaInteractionImMessageCardParseRequest.CardSearchContentQueryDomain obj1 = new AlibabaInteractionImMessageCardParseRequest.CardSearchContentQueryDomain();
obj1.Messages = "https://workspace.alibaba.com/card?type=2000&fromUid=4235710082&toUid=3044989792&country=CN&ids=1600955996818&ctime=1703664418548&sign=9D7FECCAECABCF45FE93678034FA7638E59395E6&";
obj1.Language = "en";
obj1.Currency = "CNY";
obj1.Country = "CN";
req.Query_ = obj1;
req.FromAccountId = 111L;
req.TargetAccountId = 222L;
AlibabaInteractionImMessageCardParseResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaInteractionImMessageCardParseRequest;
$query = new CardSearchContentQuery;
$query->messages="https://workspace.alibaba.com/card?type=2000&fromUid=4235710082&toUid=3044989792&country=CN&ids=1600955996818&ctime=1703664418548&sign=9D7FECCAECABCF45FE93678034FA7638E59395E6&";
$query->language="en";
$query->currency="CNY";
$query->country="CN";
$req->setQuery(json_encode($query));
$req->setFromAccountId("111");
$req->setTargetAccountId("222");
$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.interaction.im.message.card.parse' \
-d 'partner_id=apidoc' \
-d 'sign=84A781FD2C27DA0DE254284A44E47960' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-25+12%3A17%3A14' \
-d 'v=2.0' \
-d 'from_account_id=111' \
-d 'query=null' \
-d 'target_account_id=222'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaInteractionImMessageCardParseRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.query="数据结构示例JSON格式"
req.from_account_id=111
req.target_account_id=222
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.interaction.im.message.card.parse");
add_param(pRequest,"query","数据结构JSON示例");
add_param(pRequest,"from_account_id","111");
add_param(pRequest,"target_account_id","222");
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.interaction.im.message.card.parse', {
'query':'数据结构JSON示例',
'from_account_id':'111',
'target_account_id':'222'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})