TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AilabAicloudTopEarthquakeSendRequest req = new AilabAicloudTopEarthquakeSendRequest();
req.setExt("{\"hello\":\"hello\"}");
req.setSignature("c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95");
req.setNonceStr("12345");
req.setTimestampStr("123545634534");
req.setEarthquakeInfo("{\"ID\":\"12345\"}");
AilabAicloudTopEarthquakeSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AilabAicloudTopEarthquakeSendRequest req = new AilabAicloudTopEarthquakeSendRequest();
req.Ext = "{\"hello\":\"hello\"}";
req.Signature = "c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95";
req.NonceStr = "12345";
req.TimestampStr = "123545634534";
req.EarthquakeInfo = "{\"ID\":\"12345\"}";
AilabAicloudTopEarthquakeSendResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AilabAicloudTopEarthquakeSendRequest;
$req->setExt("{\"hello\":\"hello\"}");
$req->setSignature("c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95");
$req->setNonceStr("12345");
$req->setTimestampStr("123545634534");
$req->setEarthquakeInfo("{\"ID\":\"12345\"}");
$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.earthquake.send' \
-d 'partner_id=apidoc' \
-d 'sign=96099AF56B778499B90C0219EA30C577' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+01%3A48%3A28' \
-d 'v=2.0' \
-d 'earthquake_info=%7B%5C%22ID%5C%22%3A%5C%2212345%5C%22%7D' \
-d 'ext=%7B%5C%22hello%5C%22%3A%5C%22hello%5C%22%7D' \
-d 'nonce_str=12345' \
-d 'signature=c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95' \
-d 'timestamp_str=123545634534'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AilabAicloudTopEarthquakeSendRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.ext="{\"hello\":\"hello\"}"
req.signature="c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95"
req.nonce_str="12345"
req.timestamp_str="123545634534"
req.earthquake_info="{\"ID\":\"12345\"}"
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.earthquake.send");
add_param(pRequest,"ext","{\"hello\":\"hello\"}");
add_param(pRequest,"signature","c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95");
add_param(pRequest,"nonce_str","12345");
add_param(pRequest,"timestamp_str","123545634534");
add_param(pRequest,"earthquake_info","{\"ID\":\"12345\"}");
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.earthquake.send', {
'ext':'{\"hello\":\"hello\"}',
'signature':'c1b930c4ee1b2f4b192a4cc11e0bc5b790b24e95',
'nonce_str':'12345',
'timestamp_str':'123545634534',
'earthquake_info':'{\"ID\":\"12345\"}'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})