# pubg-http-api

> Axios HTTP client for PUBG API

Latest version **1.0.1** (published 2018-04-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install pubg-http-api
pnpm add pubg-http-api
yarn add pubg-http-api
bun add pubg-http-api
```

## 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.1 |
| Published | 2018-04-02 |
| First published | 2018-04-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ronald Chen |
| Maintainers | pyrolistical |

## Links

- npm: https://www.npmjs.com/package/pubg-http-api
- Repository: https://github.com/concept-not-found/pubg-http-api
- Homepage: https://github.com/concept-not-found/pubg-http-api#readme
- Issues: https://github.com/concept-not-found/pubg-http-api/issues
- npm.io page: https://npm.io/package/pubg-http-api

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) 0.18.0

## Recent versions

- 1.0.1 (latest) — 2018-04-02
- 1.0.0 — 2018-04-02

## README

# pubg-http-api
An [axios](https://github.com/axios/axios) HTTP client for [PUBG API](https://developer.playbattlegrounds.com).

This library makes it easier for you to make HTTP PUBG API calls. It is not an [abstraction distraction](https://vimeo.com/44235657) of the native HTTP PUBG API.

This library does not handle rate limiting! You need to provide your own rate limiting solution using the returned headers. See https://documentation.playbattlegrounds.com/en/api-keys.html#rate-limits

## Example
```js
const PubgHttpApi = require('pubg-http-api');

const pubgHttpClient = PubgHttpApi(process.env.PUBG_API_KEY, 'pc-na');

pubgHttpClient.get('players', {
  playerNames: ['shroud', 'break']
})
  .then((response) => {
    // response is an axios response
  });

pubgHttpClient.get('matches/a646eaee-36cd-11e8-b467-0ed5f89f718b')
  .then((response) => {
    // response is an axios response
  });
```

## Usage
### **`PubgHttpApi`([apiKey](https://documentation.playbattlegrounds.com/en/api-keys.html), [region](https://documentation.playbattlegrounds.com/en/making-requests.html#regions))** creates PUBG HTTP client

### **`pubgHttpClient.get`(endpoint, filters?)** calls gets on endpoint with optional filters, where filters is an object with filter names to array of filter values
For all available endpoints and the contents of responses, see https://documentation.playbattlegrounds.com/en/introduction.html

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