lib/api.js
function request(path, json) {
    return new Promise(function (resolve, reject) {
      oauth._performSecureRequest(config.telldusToken,
        config.telldusTokenSecret,
        'GET',
        'https://api.telldus.com/json' + path,
        null,
        json,
        !!json ? 'application/json' : null, function (err, body, response) {
          _parseResponse(err, body, response, resolve, reject);
        });
    });
  }
function request(path, json) {
    return new Promise(function (resolve, reject) {
      oauth._performSecureRequest(config.telldusToken,
        config.telldusTokenSecret,
        'GET',
        'https://api.telldus.com/json' + path,
        null,
        json,
        !!json ? 'application/json' : null, function (err, body, response) {
          _parseResponse(err, body, response, resolve, reject);
        });
    });
  }
function request ( path , json ) { return new Promise ( function ( resolve , reject ) { oauth . _performSecureRequest ( config . telldusToken , config . telldusTokenSecret , 'GET' , 'https://api.telldus.com/json' + path , null , json , ! ! json ? 'application/json' : null , function ( err , body , response ) { _parseResponse ( err , body , response , resolve , reject ) ; } ) ; } ) ; }
Performs a secure oauth request to Telldus API.
@param path
@param json optional
@returns {Promise}
Performs a secure oauth request to Telldus API .