<commit_before>import cheerio from 'cheerio';
import moment from 'moment-timezone';
import adapter from './bukovelAdapter';

const url = 'http://shop.bukovel.info/index.php?route=balance/balance/getBalance';

class BukovelAPI {
  static getCardBalance(cardNumber = '01-2167-30-92545') {
    let postRequest = new Request(url, {
      method: 'post',
      headers: {
        "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
      },
      body: `card_number=${encodeURIComponent(cardNumber)}`
    });

    return fetch(postRequest)
      .then(response => response.json())
      .then(adapter);
  }
}



export default BukovelAPI;<commit_msg>Remove hardcoded card number.<commit_after>import cheerio from 'cheerio';
import moment from 'moment-timezone';
import adapter from './bukovelAdapter';

const url = 'http://shop.bukovel.info/index.php?route=balance/balance/getBalance';

class BukovelAPI {
  static getCardBalance(cardNumber) {
    let postRequest = new Request(url, {
      method: 'post',
      headers: {
        "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
      },
      body: `card_number=${encodeURIComponent(cardNumber)}`
    });

    return fetch(postRequest)
      .then(response => response.json())
      .then(adapter)
      .catch(e => e);
  }
}



export default BukovelAPI;
{'fraction_non_alphanumeric': 0.1407185628742515, 'fraction_numerical': 0.01122754491017964, 'mean_word_length': 3.610344827586207, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1050040', 'n_tokens_mistral': 443, 'n_tokens_neox': 429, 'n_words': 83}