pubg.api.ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

PUBG API for Typescript

License NPM Version Node Version Typescript Version Build Status Coverage Status

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, 📫 hello@chriscates.ca

  • If you have a feature request, feel free to open an issue

  • MIT Licensed

Readme

Keywords

none

Package Sidebar

Install

npm i pubg.api.ts

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

30.3 kB

Total Files

12

Last publish

Collaborators

  • itschriscates