<commit_before>const Zabbix = require('../index');

const whiteSpaceCount = 2;
const zabbix = new Zabbix(
  'http://127.0.0.1:8080/api_jsonrpc.php',
  'Admin',
  'zabbix'
);

zabbix.login()
  .then(() => zabbix.getHost({
    'output': [
      'hostid',
      'host'
    ],
    'limit': 1
  }))
  .then((value) => console.log(JSON.stringify(value, null, whiteSpaceCount)))
  .catch((reason) =>
    console.log(JSON.stringify(reason, null, whiteSpaceCount))
  );<commit_msg>replace getHost method with request<commit_after>const Zabbix = require('../index');

const whiteSpaceCount = 2;
const zabbix = new Zabbix(
  'http://127.0.0.1:8080/api_jsonrpc.php',
  'Admin',
  'zabbix'
);

zabbix.login()
  .then(() => zabbix.request('host.get', {
    'output': [
      'hostid',
      'host'
    ],
    'limit': 1
  }))
  .then((value) => console.log(JSON.stringify(value, null, whiteSpaceCount)))
  .catch((reason) =>
    console.log(JSON.stringify(reason, null, whiteSpaceCount))
  );
{'fraction_non_alphanumeric': 0.1983640081799591, 'fraction_numerical': 0.024539877300613498, 'mean_word_length': 3.5534883720930233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4290250', 'n_tokens_mistral': 380, 'n_tokens_neox': 363, 'n_words': 62}