Skip to content

A module that fetch user statistics from Rainbow Six Siege using r6stats.com API.

Notifications You must be signed in to change notification settings

Xxsource98/rainbow-six-user-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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))

Releases

No releases published

Packages

No packages published