<commit_before>// -----------------------------------
// Encapsulates calls to the yelp api
// -----------------------------------

const http = require('http');

module.exports = function() {

 return {
   search: (location) => { 
    console.log('Seaching yelp for restaurants');
   }
  };

};
<commit_msg>Adding fake call to yelp api<commit_after>// -----------------------------------
// Encapsulates calls to the yelp api
// -----------------------------------

const http = require('http');

module.exports = function() {

 let options = {
  host: 'https://api.yelp.com/',
  path: '/v2/',
  port: 80,
  method: 'GET'
 };

 let callback = function(response) {

   let result = '';

   response.on('data', (chunk) => {
     result += chunk;
   });

   response.on('end', () => {
     console.log(result);
     return result;
   });
 };

 return {
   search: (location) => { 
     console.log('Seaching yelp for restaurants: '+location);
     return http.request(options, callback);
   }
  };

};

{'fraction_non_alphanumeric': 0.292, 'fraction_numerical': 0.003, 'mean_word_length': 1.7127371273712737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5589328', 'n_tokens_mistral': 304, 'n_tokens_neox': 284, 'n_words': 70}