<commit_before># pubg.js Documentation
**Version 1.0**

**Table Of Contents**
- [pubgClient](#pubgclient)
    * [getProfile()](#pubgclientgetprofileusername)
    * [getAccount()](#pubgclientgetaccountsteamid)
- [Profile](#profile)
    * [getStats()](#profilegetstatsoptions)
- [Account](#account)
- [Stats](#stats)
    * [getItem()](#statsgetitemname)
- [Match](#match)


## pubgClient
| Data    | Description              |
|---------|--------------------------|
| key     | API key parsed to client |
| version | The version of pubg.js   |

#### pubgClient#getProfile(username)
- `username` <[String]> PUBG unique name
- Returns: <[Profile]>

#### pubgClient#getAccount(steamId)
- `steamId` <[String]> 64 bit Steam Id
- Returns: <[Account]>

## Profile
| Data           | Description                       |
|----------------|-----------------------------------|
| platformId     | `Unknown`                         |
| accountId      | `Unknown`                         |
| avatar         | URL of steam avatar used in game  |
| selectedRegion | Server region                     |
| defaultSeason  | Default selection of season       |
| seasonDisplay  | Display text for season           |
| lastUpdated    | Time of last profile update       |
| playerName     | Unique PUBG name                  |
| pubgTrackerId  | Unique ID of player issued by API |

#### Profile#getStats(options)
- `options` <[Object]>
    - `region` <[String]> region: 'agg', 'as', 'eu', 'na', 'oc', 'sa', 'sea'. Defaults to `selectedRegion`
    - `season` <[String]> season: '2017-pre1', '2017-pre2', '2017-pre3', '2017-pre4'. Defaults to `defaultSeason`
    - `match` <[String]> 'solo', 'duo', 'squad', 'solo-fpp', 'duo-fpp', 'squad-fpp' Defaults to 'solo'
- Returns: <[Stats]>

## Account
| Data        | Description                         |
|-------------|-------------------------------------|
| accountId   | API key parsed to client            |
| nickname    | PUBG name tied to the steam account |
| avatarUrl   | Image URL of Steam account          |
| steamName   | Display name for Steam              |
| state       | State of user in PUBG               |
| inviteAllow | Current invite settings in PUBG     |

## Stats
| Data   | Description                 |
|--------|-----------------------------|
| region | The region of the stats     |
| season | The season of the stats     |
| match  | The match type of the stats |
| stats  | An <[Array]> of the stats   |

#### Stats#getItem(name)
- `name` <[String]> Type of stat to find
- Returns: <[Object]> of full stats
    - `fullName` <[String]>
    - `name` <[String]>
    - `category` <[String]>
    - `valueInt` <[number]>
    - `valueDec` <[String]>
    - `value` <[String]>
    - `rank` <[String]>
    - `percentile` <[number]>
    - `displayValue` <[String]>

## Match
This has been deprecated, will be removed in later versions.
<commit_msg>added api defs to docs<commit_after># pubg.js Documentation
**Version 1.0**

**Table Of Contents**
- [pubgClient](#pubgclient)
    * [getProfile()](#pubgclientgetprofileusername)
    * [getAccount()](#pubgclientgetaccountsteamid)
- [Profile](#profile)
    * [getStats()](#profilegetstatsoptions)
- [Account](#account)
- [Stats](#stats)
    * [getItem()](#statsgetitemname)
- [Match](#match)
- [API Definitions](#api-definitions)
    * [Regions](#regions)
    * [Seasons](#seasons)
    * [Matches](#matches)


## pubgClient
| Data    | Description              |
|---------|--------------------------|
| key     | API key parsed to client |
| version | The version of pubg.js   |

#### pubgClient#getProfile(username)
- `username` <[String]> PUBG unique name
- Returns: <[Profile]>

#### pubgClient#getAccount(steamId)
- `steamId` <[String]> 64 bit Steam Id
- Returns: <[Account]>

## Profile
| Data           | Description                       |
|----------------|-----------------------------------|
| platformId     | `Unknown`                         |
| accountId      | `Unknown`                         |
| avatar         | URL of steam avatar used in game  |
| selectedRegion | Server region                     |
| defaultSeason  | Default selection of season       |
| seasonDisplay  | Display text for season           |
| lastUpdated    | Time of last profile update       |
| playerName     | Unique PUBG name                  |
| pubgTrackerId  | Unique ID of player issued by API |

#### Profile#getStats(options)
- `options` <[Object]>
    - `region` <[String]> region: [see here](#regions) Defaults to `selectedRegion`
    - `season` <[String]> season: [see here](#seasons) Defaults to `defaultSeason`
    - `match` <[String]> match: [see here](#matches) Defaults to 'solo'
- Returns: <[Stats]>

## Account
| Data        | Description                         |
|-------------|-------------------------------------|
| accountId   | API key parsed to client            |
| nickname    | PUBG name tied to the steam account |
| avatarUrl   | Image URL of Steam account          |
| steamName   | Display name for Steam              |
| state       | State of user in PUBG               |
| inviteAllow | Current invite settings in PUBG     |

## Stats
| Data   | Description                 |
|--------|-----------------------------|
| region | The region of the stats     |
| season | The season of the stats     |
| match  | The match type of the stats |
| stats  | An <[Array]> of the stats   |

#### Stats#getItem(name)
- `name` <[String]> Type of stat to find
- Returns: <[Object]> of full stats
    - `fullName` <[String]>
    - `name` <[String]>
    - `category` <[String]>
    - `valueInt` <[number]>
    - `valueDec` <[String]>
    - `value` <[String]>
    - `rank` <[String]>
    - `percentile` <[number]>
    - `displayValue` <[String]>

## Match
This has been deprecated due to the API, will be removed in later versions.

## API Definitions
Definitions and examples of some of the API

#### Regions
- `agg` All regions
- `as` Asia
- `eu` Europe
- `na` North America
- `oc` Oceania
- `sa` South America
- `sea` South East Asia

#### Seasons
- `2017-pre1` 2017 Early Access Season 1
- `2017-pre2` 2017 Early Access Season 2
- `2017-pre3` 2017 Early Access Season 3
- `2017-pre4` 2017 Early Access Season 4

#### Matches
- `solo` Solo
- `duo` Duo
- `squad` Squad
- `solo-fpp` Solo first person
- `duo-fpp` Duo first person
- `squad-fpp` Squad first person



{'fraction_non_alphanumeric': 0.19262745098039216, 'fraction_numerical': 0.010666666666666666, 'mean_word_length': 2.0921435499515035, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '709165', 'n_tokens_mistral': 2030, 'n_tokens_neox': 1845, 'n_words': 563}