yeelink apis wrapper for node apps
JavaScript Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.npmignore
README.md
api.js
index.js
package.json

README.md

logo

How to install

$ npm install yeelink

Sample code

var Yeelink = require('yeelink');

var myDevice = new Yeelink({
    // provide acount to fetch access_key
    account: {
        username: 'xxx',
        pass: 'xxx'
    },
    // or provide a key
    key: '121212121212sqwsqs1s12w12w12'
});

// fetch key
myDevice.device.key(function(err,result){
    console.log(err)
    console.log(result)
})

// add device 
// works as same as sensor or datapoint
myDevice.device.add(function(err,result){
    console.log(err)
    console.log(result)
})

// list devices
// works as same as sensor or datapoint
myDevice.device.list('device_id',function(err,result){
    console.log(err)
    console.log(result)
})

// remove devices
// works as same as sensor or datapoint
myDevice.device.remove('device_id',function(err,result){
    console.log(err)
    console.log(result)
})

Pull Request Welcome !

  • fork this repo
  • feel free to add your feature
  • make sure your feature are fully tested!
  • send me a PR, and enjoy !