<commit_before># Hypixel API for Node.js

This is a client library for the public Hypixel API.

[![NPM](https://nodei.co/npm/hypixel.png?mini=true)](https://nodei.co/npm/hypixel/)

```javascript
const Hypixel = require('hypixel');

const client = new Hypixel({ key: '<KEY>' });

// old school callbacks
client.getPlayerByUsername('PxlPanda', (err, player) => {
  if (err) {
    return console.info('Nope!');
  }
  
  // or a Promise if no callback provided
  client.findGuildByPlayer(player._id)
     .then((guildId) => {
        ...
     })
     .catch((err) => {
        ...
     });
});
```

## Installation

`npm install hypixel`

## Notes

When querying data by player UUIDs make sure to remove dashes.

## Examples
#### Create a Client instance

```javascript
const Hypixel = require('hypixel');

const client = new Hypixel({ key: '<KEY>' });
```

#### Get Key Info<commit_msg>Sample says _id but should be uuid<commit_after># Hypixel API for Node.js

This is a client library for the public Hypixel API.

[![NPM](https://nodei.co/npm/hypixel.png?mini=true)](https://nodei.co/npm/hypixel/)

```javascript
const Hypixel = require('hypixel');

const client = new Hypixel({ key: '<KEY>' });

// old school callbacks
client.getPlayerByUsername('PxlPanda', (err, player) => {
  if (err) {
    return console.info('Nope!');
  }
  
  // or a Promise if no callback provided
  client.findGuildByPlayer(player.uuid)
     .then((guildId) => {
        ...
     })
     .catch((err) => {
        ...
     });
});
```

## Installation

`npm install hypixel`

## Notes

When querying data by player UUIDs make sure to remove dashes.

## Examples
#### Create a Client instance

```javascript
const Hypixel = require('hypixel');

const client = new Hypixel({ key: '<KEY>' });
```

#### Get Key Info
{'fraction_non_alphanumeric': 0.17002237136465326, 'fraction_numerical': 0.0, 'mean_word_length': 3.3527980535279807, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 4, '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': '1577854', 'n_tokens_mistral': 622, 'n_tokens_neox': 584, 'n_words': 165}