nl_tokens: Initialize a new Client with the given options .
pl_tokens: function Client ( options ) { options = options || { } ; this . isClient = true ; this . subdomain = options . subdomain ; this . endpoint = options . endpoint ; if ( ! this . subdomain && ! this . endpoint ) throw new Error ( 'No subdomain was specified.' ) ; // Determine if we construct a URL from the subdomain or use a custom one if ( this . endpoint && typeof this . endpoint !== 'undefined' ) { this . baseUrl = this . endpoint ; } else { this . baseUrl = 'https://' + this . subdomain + '.desk.com' ; } if ( <mask> . username && options . password ) { this . auth = { username : options . username , password : options . password , sendImmediately : true } ; } else if ( options . consumerKey && options . consumerSecret && options . token && options . tokenSecret ) { this . auth = { consumer_key : options . consumerKey , consumer_secret : options . consumerSecret , token : options . token , token_secret : options . tokenSecret } ; } else { throw new Error ( 'No authentication specified, use either Basic Authentication or OAuth.' ) ; } this . retry = options . retry || false ; this . maxRetry = options . maxRetry || 3 ; this . timeout = options . timeout ; this . logger = options . logger || null ; this . queue = async . queue ( this . request . bind ( this ) , 60 ) ; linkMixin . call ( this , JSON . parse ( fs . readFileSync ( __dirname + '/resources.json' , 'utf-8' ) ) ) ; }