rainbow-six-user-data

1.0.3 • Public • Published

Rainbow Six User Data

Rainbow Six User Data is a module with functions to fetch player's statistics information using https://www.r6stats.com API. Written in TypeScript with all statistics types.

Example

import RainbowSixSiegeUserData, { RainbowSixUserDataType } from 'rainbow-six-user-data'

const GetUserData = async (Username: string): Promise<RainbowSixUserDataType> => {
    let UserID: string = ''
    let UserData: RainbowSixUserDataType | null = null

    await RainbowSixSiegeUserData.GetPlayerID(Username, 'pc').then(returnData => {
        if (returnData.success) {
            UserID = returnData.data.ids[0] // Get the best result
        }
    })

    await RainbowSixSiegeUserData.GetPlayerData(UserID).then(returnData => {
        if (returnData.success) {
            UserData = returnData.data
        }
    })

    return UserData!
}

await GetUserData("UserNickname").then(UserData => {
    console.log(UserData)
}).catch(ex => console.error(ex))

Readme

Keywords

none

Package Sidebar

Install

npm i rainbow-six-user-data

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

83.7 kB

Total Files

6

Last publish

Collaborators

  • pizzaburrito