pubg.api.ts
v1.0.4
Published
![License](https://img.shields.io/badge/license-MIT-blue.svg) ![NPM Version](https://img.shields.io/badge/npm-v6.4.1-blue.svg) ![Node Version](https://img.shields.io/badge/node-v10.14.1-blue.svg) ![Typescript Version](https://img.shields.io/badge/typescri
Downloads
5
Readme
PUBG API for Typescript
PUBG's REST API in an easy to use async/await, promise based library for Typescript.
Installation and Usage
Install via npm or yarn
# Through npm
npm install pubg.api.ts --save
# Through yarn
yarn add pubg.api.ts
Start using by invoking the PubgApi
class
import { PubgApi } from 'pubg.api.ts';
const Api = new PubgApi('MY-PUBG-API-KEY');
Configuration
Configure default values by passing them into the PubgApi Class
import { PubgApi } from 'pubg.api.ts';
export const PubgApiDefaults = {
ApiUrl: 'https://api.pubg.com/shards',
Shard: 'steam'
};
const Api = new PubgApi('MY-PUBG-API-KEY', PubgApiDefaults);
// Can also view defaults by accessing it with the defaults key
Api.defaults;
Unit Test Cases
You can run unit test cases by running
# Through npm
npm run test
# Through yarn
yarn test
Please note you need to have a valid PUBG API Key for tests to run
export PUBG_KEY='MY-PUBG-API-KEY'
API Documentation
Everything you need to know in regards to how the api works is in API.md
Referencing via JSDoc
You can build documentation through JSDoc by running
# Through npm
npm run jsdoc
# Through yarn
yarn jsdoc
Additional Resources
If you need help, :mailbox: [email protected]
If you have a feature request, feel free to open an issue
MIT Licensed