TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAilabsIotSaasDeviceControlRequest req = new AlibabaAilabsIotSaasDeviceControlRequest();
req.setRequestId("rqer31434");
req.setApplicationId("faeqr3413254");
req.setServiceName("timerTemperatureControl");
req.setAttributeMethod("thing.attribute.set");
req.setParams("feqrewr");
req.setDeviceId("REQTT2546WR");
req.setOpenUserId("t24543tw5245");
req.setAccountId("43125452");
AlibabaAilabsIotSaasDeviceControlResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAilabsIotSaasDeviceControlRequest req = new AlibabaAilabsIotSaasDeviceControlRequest();
req.RequestId = "rqer31434";
req.ApplicationId = "faeqr3413254";
req.ServiceName = "timerTemperatureControl";
req.AttributeMethod = "thing.attribute.set";
req.Params = "feqrewr";
req.DeviceId = "REQTT2546WR";
req.OpenUserId = "t24543tw5245";
req.AccountId = "43125452";
AlibabaAilabsIotSaasDeviceControlResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAilabsIotSaasDeviceControlRequest;
$req->setRequestId("rqer31434");
$req->setApplicationId("faeqr3413254");
$req->setServiceName("timerTemperatureControl");
$req->setAttributeMethod("thing.attribute.set");
$req->setParams("feqrewr");
$req->setDeviceId("REQTT2546WR");
$req->setOpenUserId("t24543tw5245");
$req->setAccountId("43125452");
$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.ailabs.iot.saas.device.control' \
-d 'partner_id=apidoc' \
-d 'sign=106F632D11E2F464CD59192136CFBA05' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-25+16%3A01%3A29' \
-d 'v=2.0' \
-d 'account_id=43125452' \
-d 'application_id=faeqr3413254' \
-d 'attribute_method=thing.attribute.set' \
-d 'device_id=REQTT2546WR' \
-d 'open_user_id=t24543tw5245' \
-d 'params=feqrewr' \
-d 'request_id=rqer31434' \
-d 'service_name=timerTemperatureControl'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAilabsIotSaasDeviceControlRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.request_id="rqer31434"
req.application_id="faeqr3413254"
req.service_name="timerTemperatureControl"
req.attribute_method="thing.attribute.set"
req.params="feqrewr"
req.device_id="REQTT2546WR"
req.open_user_id="t24543tw5245"
req.account_id="43125452"
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.ailabs.iot.saas.device.control");
add_param(pRequest,"request_id","rqer31434");
add_param(pRequest,"application_id","faeqr3413254");
add_param(pRequest,"service_name","timerTemperatureControl");
add_param(pRequest,"attribute_method","thing.attribute.set");
add_param(pRequest,"params","feqrewr");
add_param(pRequest,"device_id","REQTT2546WR");
add_param(pRequest,"open_user_id","t24543tw5245");
add_param(pRequest,"account_id","43125452");
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.ailabs.iot.saas.device.control', {
'request_id':'rqer31434',
'application_id':'faeqr3413254',
'service_name':'timerTemperatureControl',
'attribute_method':'thing.attribute.set',
'params':'feqrewr',
'device_id':'REQTT2546WR',
'open_user_id':'t24543tw5245',
'account_id':'43125452'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})