const _request = require('request'); class SourceModel { constructor() { this.name = ""; } getName() { return this.name; } request(options) { return new Promise((resolve, reject) => { _request(options, function(error, response, body) { if (!error && response.statusCode === 200) { resolve(body); } else { console.log(error); reject(error); } }); }); } async search(keywords) { return [ ]; } } module.exports = { SourceModel }