<commit_before>var request = require('request');   
var config =  null;//require('./config.js')
var qs = require('querystring');

var deliverydotcom = {
    setConfig: function(_config){
        config = _config;
    },
    searchDelivery: function(params,callback){
        var options = {url:config.API_URL+'/merchant/search/delivery?'+qs.stringify(params),headers:{'Authorization':config.OAUTH_TOKEN}};
        console.log(options.url);
        request(options, function(err,response,body){
            if(err) {
                console.log(err);
            }
            callback(body);
        });
    },
    addItemToCart: function(merchantId,productId,quantity,instructions,callback) {
        console.log(config.API_URL+'/customer/cart/'+merchantId);
        var body = {
              "order_type": "delivery",
              "instructions": instructions,
              "item": {
                "item_id": productId,
                "item_qty": quantity
              }
            };
        var options = {
            method:'POST',
            url:config.API_URL+'/customer/cart/'+merchantId,
            headers:{'Authorization':config.OAUTH_TOKEN},
            json: body
        };
        request(options, function(err,response,body){
            if(err) {
                console.log(err);
            }
            console.log(response.status);
            callback(body);
        });<commit_msg>changes<commit_after>var request = require('request');   
var config =  null;//require('./config.js')
var qs = require('querystring');

var deliverydotcom = {
    setConfig: function(_config){
        config = _config;
    },
    searchDelivery: function(params,callback){
        var options = {url:config.API_URL+'/merchant/search/delivery?'+qs.stringify(params),headers:{'Authorization':config.OAUTH_TOKEN}};
        console.log(options.url);
        request(options, function(err,response,body){
            if(err) {
                console.log(err);
            }
            callback(body);
        });
    },
    merchantInfo: function(merchantId,callback){
        var options = {
            method:'GET',
            url:config.API_URL+'/merchant/'+merchantId,
            headers:{'Authorization':config.OAUTH_TOKEN}
        };
        request(options,function(err,response,body){
            if(err){
                console.log(err);
            }
            callback(body);
        });
    },
    merchantMenu: function(merchantId,callback){
        var options = {
            method:'GET',
            url:config.API_URL+'/merchant/'+merchantId+'/menu/',
            headers:{'Authorization':config.OAUTH_TOKEN}
        };
        request(options,function(err,response,body){
            if(err){
                console.log(err);
            }
            callback(body);
        });

    },
    merchantHours: function(merchantId,callback){
        var options = {
            method:'GET',
            url:config.API_URL+'/merchant/'+merchantId+'/hours/',
            headers:{'Authorization':config.OAUTH_TOKEN}
        };
        request(options,function(err,response,body){
            if(err){
                console.log(err);
            }
            callback(body);
        });
    },
    addItemToCart: function(merchantId,productId,quantity,instructions,callback) {
        console.log(config.API_URL+'/customer/cart/'+merchantId);
        var body = {
              "order_type": "delivery",
              "instructions": instructions,
              "item": {
                "item_id": productId,
                "item_qty": quantity
              }
            };
        var options = {
            method:'POST',
            url:config.API_URL+'/customer/cart/'+merchantId,
            headers:{'Authorization':config.OAUTH_TOKEN},
            json: body
        };
        request(options, function(err,response,body){
            if(err) {
                console.log(err);
            }
            console.log(response.status);
            callback(body);
        });
{'fraction_non_alphanumeric': 0.1372110365398956, 'fraction_numerical': 0.0, 'mean_word_length': 1.8418079096045197, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4854115', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1104, 'n_words': 139}