lib/harmonyclient.js
function getAvailableCommands () {
  debug('retrieve available commands')

  if (this._availableCommandsCache) {
    debug('using cached config')
    var deferred = Q.defer()
    deferred.resolve(this._availableCommandsCache)
    return deferred.promise
  }

  var self = this
  return this.request('config', undefined, 'json')
    .then(function (response) {
      self._availableCommandsCache = response
      return response
    })
}
function getAvailableCommands () {
  debug('retrieve available commands')

  if (this._availableCommandsCache) {
    debug('using cached config')
    var deferred = Q.defer()
    deferred.resolve(this._availableCommandsCache)
    return deferred.promise
  }

  var self = this
  return this.request('config', undefined, 'json')
    .then(function (response) {
      self._availableCommandsCache = response
      return response
    })
}
function getAvailableCommands ( ) { debug ( 'retrieve available commands' ) if ( this . _availableCommandsCache ) { debug ( 'using cached config' ) var deferred = Q . defer ( ) deferred . resolve ( this . _availableCommandsCache ) return deferred . promise } var self = this return this . request ( 'config' , undefined , 'json' ) . then ( function ( response ) { self . _availableCommandsCache = response return response } ) }
Acquires all available commands from the hub when resolving the returned promise.

@returns {Q.Promise}
Acquires all available commands from the hub when resolving the returned promise .