TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
YunosEbanmaMiniappVoicegwCallRequest req = new YunosEbanmaMiniappVoicegwCallRequest();
req.setMiniappInfo("{\"deviceToken\":\"token-791a114d36294e1b91a8ecfffe0dbaf9\",\"uuid\":\"zebra-E2B12EBBC30D94C624E037B661AE97EF_qa\",\"projectId\":\"BANMA\"}");
req.setExternalId("iflytek_nissan");
req.setExternalInfo("{ \"id\": \"sWiS0Agts1q6z7PqPMuQTdtGtpRI1FbW\", \"conversationId\": \"12232132\", \"channelEnv\": \"test\", \"asrResult\": \"打开旅航纵横\", \"nluResult\": \"\", \"languageType\": \"zh-CH\", \"timestamp\": 1, \"latitude\": 1.0, \"longitude\": 1.0, \"nluResultForDm\": \"\", \"externalVin\": \"\", \"extendInfo\": \"\" }");
YunosEbanmaMiniappVoicegwCallResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
YunosEbanmaMiniappVoicegwCallRequest req = new YunosEbanmaMiniappVoicegwCallRequest();
req.MiniappInfo = "{\"deviceToken\":\"token-791a114d36294e1b91a8ecfffe0dbaf9\",\"uuid\":\"zebra-E2B12EBBC30D94C624E037B661AE97EF_qa\",\"projectId\":\"BANMA\"}";
req.ExternalId = "iflytek_nissan";
req.ExternalInfo = "{ \"id\": \"sWiS0Agts1q6z7PqPMuQTdtGtpRI1FbW\", \"conversationId\": \"12232132\", \"channelEnv\": \"test\", \"asrResult\": \"打开旅航纵横\", \"nluResult\": \"\", \"languageType\": \"zh-CH\", \"timestamp\": 1, \"latitude\": 1.0, \"longitude\": 1.0, \"nluResultForDm\": \"\", \"externalVin\": \"\", \"extendInfo\": \"\" }";
YunosEbanmaMiniappVoicegwCallResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new YunosEbanmaMiniappVoicegwCallRequest;
$req->setMiniappInfo("{\"deviceToken\":\"token-791a114d36294e1b91a8ecfffe0dbaf9\",\"uuid\":\"zebra-E2B12EBBC30D94C624E037B661AE97EF_qa\",\"projectId\":\"BANMA\"}");
$req->setExternalId("iflytek_nissan");
$req->setExternalInfo("{ \"id\": \"sWiS0Agts1q6z7PqPMuQTdtGtpRI1FbW\", \"conversationId\": \"12232132\", \"channelEnv\": \"test\", \"asrResult\": \"打开旅航纵横\", \"nluResult\": \"\", \"languageType\": \"zh-CH\", \"timestamp\": 1, \"latitude\": 1.0, \"longitude\": 1.0, \"nluResultForDm\": \"\", \"externalVin\": \"\", \"extendInfo\": \"\" }");
$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=yunos.ebanma.miniapp.voicegw.call' \
-d 'partner_id=apidoc' \
-d 'sign=EC2B2E91AEB320AAC14BF210505A0BA5' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-02+08%3A57%3A04' \
-d 'v=2.0' \
-d 'external_id=iflytek_nissan' \
-d 'external_info=%7B+++%5C%22id%5C%22%3A+%5C%22sWiS0Agts1q6z7PqPMuQTdtGtpRI1FbW%5C%22%2C+++%5C%22conversationId%5C%22%3A+%5C%2212232132%5C%22%2C+++%5C%22channelEnv%5C%22%3A+%5C%22test%5C%22%2C+++%5C%22asrResult%5C%22%3A+%5C%22%E6%89%93%E5%BC%80%E6%97%85%E8%88%AA%E7%BA%B5%E6%A8%AA%5C%22%2C+++%5C%22nluResult%5C%22%3A+%5C%22%5C%22%2C+++%5C%22languageType%5C%22%3A+%5C%22zh-CH%5C%22%2C+++%5C%22timestamp%5C%22%3A+1%2C+++%5C%22latitude%5C%22%3A+1.0%2C+++%5C%22longitude%5C%22%3A+1.0%2C+++%5C%22nluResultForDm%5C%22%3A+%5C%22%5C%22%2C+++%5C%22externalVin%5C%22%3A+%5C%22%5C%22%2C+++%5C%22extendInfo%5C%22%3A+%5C%22%5C%22+%7D' \
-d 'miniapp_info=%7B%5C%22deviceToken%5C%22%3A%5C%22token-791a114d36294e1b91a8ecfffe0dbaf9%5C%22%2C%5C%22uuid%5C%22%3A%5C%22zebra-E2B12EBBC30D94C624E037B661AE97EF_qa%5C%22%2C%5C%22projectId%5C%22%3A%5C%22BANMA%5C%22%7D'
# -*- coding: utf-8 -*-
import top.api
req=top.api.YunosEbanmaMiniappVoicegwCallRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.miniapp_info="{\"deviceToken\":\"token-791a114d36294e1b91a8ecfffe0dbaf9\",\"uuid\":\"zebra-E2B12EBBC30D94C624E037B661AE97EF_qa\",\"projectId\":\"BANMA\"}"
req.external_id="iflytek_nissan"
req.external_info="{ \"id\": \"sWiS0Agts1q6z7PqPMuQTdtGtpRI1FbW\", \"conversationId\": \"12232132\", \"channelEnv\": \"test\", \"asrResult\": \"打开旅航纵横\", \"nluResult\": \"\", \"languageType\": \"zh-CH\", \"timestamp\": 1, \"latitude\": 1.0, \"longitude\": 1.0, \"nluResultForDm\": \"\", \"externalVin\": \"\", \"extendInfo\": \"\" }"
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,"yunos.ebanma.miniapp.voicegw.call");
add_param(pRequest,"miniapp_info","{\"deviceToken\":\"token-791a114d36294e1b91a8ecfffe0dbaf9\",\"uuid\":\"zebra-E2B12EBBC30D94C624E037B661AE97EF_qa\",\"projectId\":\"BANMA\"}");
add_param(pRequest,"external_id","iflytek_nissan");
add_param(pRequest,"external_info","{ \"id\": \"sWiS0Agts1q6z7PqPMuQTdtGtpRI1FbW\", \"conversationId\": \"12232132\", \"channelEnv\": \"test\", \"asrResult\": \"打开旅航纵横\", \"nluResult\": \"\", \"languageType\": \"zh-CH\", \"timestamp\": 1, \"latitude\": 1.0, \"longitude\": 1.0, \"nluResultForDm\": \"\", \"externalVin\": \"\", \"extendInfo\": \"\" }");
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('yunos.ebanma.miniapp.voicegw.call', {
'miniapp_info':'{\"deviceToken\":\"token-791a114d36294e1b91a8ecfffe0dbaf9\",\"uuid\":\"zebra-E2B12EBBC30D94C624E037B661AE97EF_qa\",\"projectId\":\"BANMA\"}',
'external_id':'iflytek_nissan',
'external_info':'{ \"id\": \"sWiS0Agts1q6z7PqPMuQTdtGtpRI1FbW\", \"conversationId\": \"12232132\", \"channelEnv\": \"test\", \"asrResult\": \"打开旅航纵横\", \"nluResult\": \"\", \"languageType\": \"zh-CH\", \"timestamp\": 1, \"latitude\": 1.0, \"longitude\": 1.0, \"nluResultForDm\": \"\", \"externalVin\": \"\", \"extendInfo\": \"\" }'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})