commands/play.js
function SpotifySearch (title) {
  /**
   * @public {Array} tracks.
   */
  this.tracks = []

  // Query spotify, parse xml response, display in terminal,
  // prompt user for track number, play track.
  this._query(title)
  .then(this._parseJSON.bind(this))
  .then(this._printData.bind(this))
  .then(this._promptUser.bind(this))
  .then(this._playTrack.bind(this))
  .fail(this._onError.bind(this))
}
function SpotifySearch (title) {
  /**
   * @public {Array} tracks.
   */
  this.tracks = []

  // Query spotify, parse xml response, display in terminal,
  // prompt user for track number, play track.
  this._query(title)
  .then(this._parseJSON.bind(this))
  .then(this._printData.bind(this))
  .then(this._promptUser.bind(this))
  .then(this._playTrack.bind(this))
  .fail(this._onError.bind(this))
}
function SpotifySearch ( title ) { /**
   * @public {Array} tracks.
   */ this . tracks = [ ] // Query spotify, parse xml response, display in terminal, // prompt user for track number, play track. this . _query ( title ) . then ( this . _parseJSON . bind ( this ) ) . then ( this . _printData . bind ( this ) ) . then ( this . _promptUser . bind ( this ) ) . then ( this . _playTrack . bind ( this ) ) . fail ( this . _onError . bind ( this ) ) }
Spotify search client.
@param {string} search query.
@constructor
Spotify search client .