index.js
function (url, requestItemsCb) {
      // use the bearer auth token
      request.get(url, {
        'auth': {
          'bearer': exports.authorizedToken
        }
      },
        (error, response, body) => {
          if (error) console.error(error)
          if (response.statusCode && response.statusCode === 200) {
            if (requestItemsCb) requestItemsCb(null, JSON.parse(body))
          } else {
            if (requestItemsCb) requestItemsCb(null, false)
          }
        })
    }
function (url, requestItemsCb) {
      // use the bearer auth token
      request.get(url, {
        'auth': {
          'bearer': exports.authorizedToken
        }
      },
        (error, response, body) => {
          if (error) console.error(error)
          if (response.statusCode && response.statusCode === 200) {
            if (requestItemsCb) requestItemsCb(null, JSON.parse(body))
          } else {
            if (requestItemsCb) requestItemsCb(null, false)
          }
        })
    }
function ( url , requestItemsCb ) { // use the bearer auth token request . get ( url , { 'auth' : { 'bearer' : exports . authorizedToken } } , ( error , response , body ) => { if ( error ) console . error ( error ) if ( response . statusCode && response . statusCode === 200 ) { if ( requestItemsCb ) requestItemsCb ( null , JSON . parse ( body ) ) } else { if ( requestItemsCb ) requestItemsCb ( null , false ) } } ) }
this is the request function we will curry below
this is the request function we will curry below