淘宝开放平台 API Node SDK
ApiClient = require('../index.js').ApiClient;
var client = new ApiClient({
'appkey':'****',
'appsecret':'************************',
'REST_URL':'https://api.daily.taobao.net/router/rest'
});
client.execute('taobao.user.get',
{
'fields':'nick,type,sex,location',
'nick':'sandbox_c_1'
},
function (error,response) {
if(!error)
console.log(response);
else
console.log(error);
})
var TmcClient = require('../index.js').TmcClient;
var tmcClient = new TmcClient('*******','************************','default');
tmcClient.connect('ws:https://mc.api.daily.taobao.net/',
function (message,status) {
console.log(message);
});
DingtalkClient = require('../index.js').DingtalkClient;
var client = new DingtalkClient({
'appkey':'*****',
'appsecret':'**********************',
'REST_URL':'https://eco.taobao.com/router/rest'
});
client.execute('taobao.user.get',
{
'fields':'nick,type,sex,location',
'nick':'sandbox_c_1'
},
function (error,response) {
if(!error)
console.log(response);
else
console.log(error);
})