lib/parser.js
function requestPromise(options) {
  return new Promise((resolve, reject) => {
    request(options, (error, response) => {
      if (!error && response.statusCode === 200) {
        resolve(response);
      } else if (error) {
        reject(error);
      } else {
        reject(new Error(`Status code is ${response.statusCode}`));
      }
    });
  });
}
function requestPromise(options) {
  return new Promise((resolve, reject) => {
    request(options, (error, response) => {
      if (!error && response.statusCode === 200) {
        resolve(response);
      } else if (error) {
        reject(error);
      } else {
        reject(new Error(`Status code is ${response.statusCode}`));
      }
    });
  });
}
function requestPromise ( options ) { return new Promise ( ( resolve , reject ) => { request ( options , ( error , response ) => { if ( ! error && response . statusCode === 200 ) { resolve ( response ) ; } else if ( error ) { reject ( error ) ; } else { reject ( new Error ( ` ${ response . statusCode } ` ) ) ; } } ) ; } ) ; }
Get promised request
@param {Object} options
@returns {Promise}
Get promised request