You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

randalthor-r6statsapi

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

randalthor-r6statsapi

R6Stats Node Wrapper

1.1.2
latest
npmnpm
Version published
Maintainers
1
Created
Source

randalthor-r6statsapi

Example

R6 = require("randalthor-r6statsapi");

client = new R6.client("<Auth-Key>");

async function getPlayerStats() {
    //gets usernames's stats on PC of type Generic
    const stats = await client.getStats("username", R6.constants.R6_PLATFORM_PC, R6.constants.R6_TYPE_GENERIC);
    /* YOUR CODE HERE */
}

async function getLeaderboard() {
    //Gets first page of PC leaderboard for all regions
    const leaderBoardPage = await client.getLeaderboard(R6.constants.R6_PLATFORM_PC, R6.constants.R6_REGION_ALL, 1);
    /* YOUR CODE HERE */
}
getPlayerStats();
getLeaderboard();

Constants

module.exports = {
    API: "https://api2.r6stats.com/public-api/",
    STATS: "stats/",
    LEADERBOARD: "leaderboard/",
    R6_TYPE_GENERIC: "generic",
    R6_TYPE_SEASONAL: "seasonal",
    R6_TYPE_OPERATORS: "operators",
    R6_TYPE_WEAPONS: "weapons",
    R6_TYPE_WEAPON_CATAGORIES: "weapon-catagories",
    R6_PLATFORM_PC: "pc",
    R6_PLATFORM_XBOX: "xbox",
    R6_PLATFORM_PLAYSTATION: "ps4",
    R6_REGION_ALL: "all",
    R6_REGION_NCSA: "ncsa",
    R6_REGION_EMEA: "emea",
    R6_REGION_APAC: "apac",
};

//Accessed Via
client.constants.(ex. R6_PLATFORM_XBOX)

Installation

$ npm install randalthor-r6statsapi

Keywords

r6

FAQs

Package last updated on 31 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.