rainbow-six-user-data
v1.0.3
Published
A module that fetch user statistics from Rainbow Six Siege using r6stats.com API.
Downloads
1
Readme
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))