npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@proak/r6s-sdk

v1.0.2

Published

Rainbow Six Seige SDK

Downloads

7

Readme

Rainbow Six Seige SDK

This is an unofficial node SDK for Rainbow Six Seige

Installation

> npm install @proak/r6s-sdk

Usage

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: '1234589' })

// connect to ubisoft
await auth.connect()

API

Auth

constructor(options)

| Parameter | Required | Description | |-----------|-------------|----------| | options.token | false | Token to be used when connecting to ubisoft | | options.email | false | Email to be used when authenticating with ubisoft. This is required along with password if options.token is not passed | | options.password | false | Password to be used in authenticating with ubisoft. This is required along with email if options.token is not passed | | options.cacheTime | false | Time in milliseconds to keep cache. defaults to 12000 | | options.maxConnectionRetries | false | Number of times to retry failed requests. Defaults to 1 | | options.appId | false | id of app. Defaults to 39baebad-39e5-4552-8c25-2c9b919064e2|

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({
  cacheTime: 50000,
  maxConnectionRetries: 3,
  email: '[email protected]',
  password: '5dio80bCIVOW.!bo~?'
})
//=> Auth Instance

connect()

| Parameter | Required | Description | |-----------|-------------|--------------|

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
await auth.connect()

getPlayer(options)

| Parameter | Required | Description | |-------------|-------------|--------------| | options.uid | false | UID of player to retrieve. Must not be set at the same time as options.name as search can be done by only one of them | | options.name | false | name of player to retrieve. Must not be set at the same time as options.uid as search can be done by only one of them | | options.platform | true | platform type of player |

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
await auth.getPlayer({ name: 'JUNE' }) 
// => Player Instance

getOperatorDefinitions()

| Parameter | Required | Description | |-------------|-------------|--------------|

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
await auth.getOperatorDefinitions() 

getOperatorIndex()

| Parameter | Required | Description | |-------------|-------------|--------------| | name | true | Name of operator to retrieve |

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
await auth.getOperatorIndex('smoke')

// Result
{ 
  id: 'smoke',
  index: '2:1',
  category: 'def',
  name: { oasisId: '62253'  },
  ctu: { oasisId: '62015'  },
  figure: { 
    small: 'assets/images/small-smoke.2726e3087231686a.png',
    large: 'assets/images/large-smoke.1bf9006654c09ba6.png' 
  },
  mask: 'assets/images/mask-smoke.c84491688f294f51.png',
  badge: 'assets/images/badge-smoke.874e98880d03a204.png',
  uniqueStatistic: {
    pvp: { 
      statisticId: 'operatorpvp_smoke_poisongaskill:2:1',
      label: { oasisId: '194660'  } 
    },
    pve: { 
      statisticId: 'operatorpve_smoke_poisongaskill:2:1',
      label: { oasisId: '194660'  } 
    } 
  }
} 

getOperatorStatistic()

| Parameter | Required | Description | |-------------|-------------|--------------| | name | true | Name of operator to retrieve statistics |

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
const statistic = await auth.getOperatorStatistic('smoke')
//=> operatorpvp_smoke_poisongaskill:2:1

getOperatorBadge()

| Parameter | Required | Description | |-------------|-------------|--------------| | name | true | Name of operator to retrieve badge |

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
const badge = await auth.getOperatorBadge('smoke')
//=> assets/images/badge-smoke.874e98880d03a204.png

getObjectIndex()

| Parameter | Required | Description | |-------------|-------------|--------------| | key | true | key of definition to retrieve object index |

Example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
const objectIndex = await auth.getObjectIndex('operatorpve_headshot:5:1')
//=> 5:1

Player

To get a particular player, you need to have have authenticated with ubisoft using the Auth class and returned the auth instance. Then you can call .getPlayer on auth. For example:

const { Auth } = require('@proak/r6s-sdk')

const auth = new Auth({ email: '[email protected]', password: 'TGsieo280?!-' })
const player = await auth.getPlayer({ name: 'JUNE.KR' }) 
//=> Player Instance

The player instance has a number of useful member methods. which are described below:

loadLevel()

This method loads the player's Xp and level

| Parameter | Required | Description | |-------------|-------------|--------------|

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })

await player.loadLevel()
//=> Player { xp: 28402, level: 74 }

checkLevel()

This method checks' the player's XP and level, only loading it if it has not been loaded yet

| Parameter | Required | Description | |-------------|-------------|--------------|

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })

await player.checkLevel()
//=> Player Instance updated with `xp` and `level`

loadRank()

This method loads a player's rank for a specific region and season

| Parameter | Required | Description | |----------------|----------|---------------------------------------------------------| | options.region | true | The name of the region you want to get the rank for | | options.season | false | The season you want to get the rank for. Defaults to -1 |

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })

await player.loadRank({ region: 'emea' })
//=> Player Instance updated rank details

getRank()

This method checks for a player's rank for a particular region, only loading it if it is not already loaded

| Parameter | Required | Description | |----------------|----------|---------------------------------------------------------| | options.region | true | The name of the region you want to get the rank for | | options.season | false | The season you want to get the rank for. Defaults to -1 |

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })

await player.getRank({ region: 'emea' })
//=> Player Instance updated rank details

loadAllOperators()

This method loads the player stats for all operators

| Parameter | Required | Description | |-------------|-------------|--------------|

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })
await player.loadAllOperators()
//=> Player instance with all operators stats loaded

getAllOperators()

This method checks player stats for all operators, loading them all again if they are not found.

| Parameter | Required | Description | |-------------|-------------|--------------|

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })
await player.getAllOperators()
//=> Player instance with all operators stats loaded

loadOperator()

This method loads the player stats for the operator

| Parameter | Required | Description | |-------------|-------------|--------------------------| | name | true | The name of the operator |

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })
const operator = await player.loadOperator('smoke')
//=> Operator Instance

getOperator()

This method gets the player stats for the operator, only loading it if it is not already loaded

| Parameter | Required | Description | |-------------|-------------|--------------------------| | name | true | The name of the operator |

Example:

const player = await auth.getPlayer({ name: 'JUNE.KR', platform: 'uplay' })
const operator = await player.getOperator('smoke')
//=> Operator Instance