lib/client.js
function TidalAPI(authData) {
  if(typeof authData !== 'object')
  {
    throw new Error('You must pass auth data into the TidalAPI object correctly');
  } else {
    if(typeof authData.username !== 'string') {
      throw new Error('Username invalid or missing');
    }
    if(typeof authData.password !== 'string') {
      throw new Error('Password invalid or missing');
    }
    if(typeof authData.token !== 'string') {
      throw new Error('Token invalid or missing');
    }
    if(typeof authData.quality !== 'string') {
      throw new Error('Stream quality invalid or missing');
    }
  }

  this.authData = authData;

  /* try log in */
  // tryLogin(authData);
}
function TidalAPI(authData) {
  if(typeof authData !== 'object')
  {
    throw new Error('You must pass auth data into the TidalAPI object correctly');
  } else {
    if(typeof authData.username !== 'string') {
      throw new Error('Username invalid or missing');
    }
    if(typeof authData.password !== 'string') {
      throw new Error('Password invalid or missing');
    }
    if(typeof authData.token !== 'string') {
      throw new Error('Token invalid or missing');
    }
    if(typeof authData.quality !== 'string') {
      throw new Error('Stream quality invalid or missing');
    }
  }

  this.authData = authData;

  /* try log in */
  // tryLogin(authData);
}
function TidalAPI ( authData ) { if ( typeof authData !== 'object' ) { throw new Error ( 'You must pass auth data into the TidalAPI object correctly' ) ; } else { if ( typeof authData . username !== 'string' ) { throw new Error ( 'Username invalid or missing' ) ; } if ( typeof authData . password !== 'string' ) { throw new Error ( 'Password invalid or missing' ) ; } if ( typeof authData . token !== 'string' ) { throw new Error ( 'Token invalid or missing' ) ; } if ( typeof authData . quality !== 'string' ) { throw new Error ( 'Stream quality invalid or missing' ) ; } } this . authData = authData ; /* try log in */ // tryLogin(authData); }
Create TidalAPI instance
@param {{username: String, password: String, token: String, quality: String}}
@Constructor
Create TidalAPI instance