# pubg-chicken

> NodeJS Wrapper using the official PUBG API

Latest version **1.0.4** (published 2018-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install pubg-chicken
pnpm add pubg-chicken
yarn add pubg-chicken
bun add pubg-chicken
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-04-16 |
| First published | 2018-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kevin Mocorro |
| Maintainers | kmocorro |
| Keywords | battlegrounds, pubg, api, playersunknown, pubg-api |

## Links

- npm: https://www.npmjs.com/package/pubg-chicken
- Repository: https://github.com/kmocorro/pubg-chicken
- Homepage: https://github.com/kmocorro/pubg-chicken#readme
- Issues: https://github.com/kmocorro/pubg-chicken/issues
- npm.io page: https://npm.io/package/pubg-chicken

## Dependencies (1)

- [https](https://npm.io/package/https.md) ^1.0.0

## Recent versions

- 1.0.4 (latest) — 2018-04-16
- 1.0.3 — 2018-04-16
- 1.0.2 — 2018-04-16
- 1.0.1 — 2018-04-16
- 1.0.0 — 2018-04-16
- 0.0.31 — 2018-04-16
- 0.0.30 — 2018-04-16
- 0.0.29 — 2018-04-15
- 0.0.28 — 2018-04-15
- 0.0.27 — 2018-04-15
- 0.0.26 — 2018-04-15
- 0.0.25 — 2018-04-15
- 0.0.24 — 2018-04-15
- 0.0.23 — 2018-04-15
- 0.0.22 — 2018-04-15
- … 21 more at https://npm.io/package/pubg-chicken/versions

## README

# pubg-chicken [![npm 1.0.1](https://img.shields.io/badge/npm-v1.0.1-brightgreen.svg)](https://www.npmjs.com/package/pubg-chicken)

NodeJS Wrapper using the official PUBG API

## Installation

``` $ npm install pubg-chicken@latest --save```

## Usage
```javascript
let Chicken = require('pubg-chicken');
let api = new Chicken();
    api.setAPIkey('your-api-key-here');
```
### API Wrappers
API | Parameters
----|----
```.setAPIkey()``` | ``` .setAPIkey('your-api-key-here') ```
 ```.searchPlayerNames()``` | ```.searchPlayerName({ playerNames: <ign> }, <region-here> ).then((apiResponse) => {}) ``` 
 ```.searchPlayerIds() ``` | ```.searchPlayerIds({ playerIds: <acct-id> }, <region-here> ).then((apiResponse) => {}) ```
 ```.extractMatches()``` | ```.extractMatches({ playerNames: <player-ign> }, <region-here> ).then((matches) => {}) ```
 ```.searchTelemetry()``` | ```.searchTelemetry(<matchID-from-extractMatches()>, <region-here>).then((apiResponse) => {})```
 
For example :
```javascript
    // search player data using IGN name
    app.get('/name/:region/:playerName', function(req, res){
      
        api.searchPlayerNames({
            playerNames: req.params.playerName
            }, req.params.region).then((apiResponse) => { 
                // do something to apiResponse.
            });
      
    });
```

For example :
```javascript
    // search player data using ID
    app.get('/name/:region/:playerID', function(req, res){
      
        api.searchPlayerIds({
            playerIds: req.params.playerID
            }, req.params.region).then((apiResponse) => { 
                // do something to apiResponse.
            });
      
    });
```

For example :
```javascript
    // search player matches IDs using IGN name
    app.get('/matches/:region/:playerName', function(req, res){
      
        api.extractMatches({
            playerNames: req.params.playerName
            }, req.params.region).then((matches) => { 
                // do something to matches.
            });
      
    });
```

For example : (Note: To use **.searchTelemetry()**, you should have **matchID** results from **.extractMatches()** API)
```javascript
    // search player matches IDs using IGN name
    app.get('/telemetry/:region/:matchID', function(req, res){
      
        api.searchTelemetry(req.params.matchID, req.params.region).then((apiResponse) => { 
                // do something to apiResponse.
            });
      
    });
```


## Region parameters
Parameter region/platform | Location
------|------
xbox-as | Asia
xbox-eu | Europe
xbox-na | North America
xbox-oc | Oceania
pc-krjp | Korea
pc-jp | Japan
pc-na | North America
pc-eu | Europe
pc-oc | Oceania
pc-kakao | Kakao
pc-sea | South East Asia
pc-sa | South and Central America
pc-as | Asia

## Status
**v0.0.11** - API for searching IGN data only **searchPlayerName**

**v0.0.17** - Added searching for player id **searchPlayerIds**, changed *searchPlayerName* to **searchPlayerNames**

**v0.0.25** - Added searching for matches IDs **extractMatches**

**v0.0.30** - Added searching for Telemetry for each matchesID **searchTelemetry**

**v1.0.0** - Released

**SEMVER** - working on it to fully utilize PUBG API 
- Kevin Mocorro | kevinmocorro.github@gmail.com

---
_Source: https://npm.io/package/pubg-chicken · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
