Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r6stats/r6stats-node
An R6Stats API Client for NodeJS / Javascript
https://github.com/r6stats/r6stats-node
library nodejs rainbow-six typescript
Last synced: about 2 months ago
JSON representation
An R6Stats API Client for NodeJS / Javascript
- Host: GitHub
- URL: https://github.com/r6stats/r6stats-node
- Owner: R6Stats
- License: gpl-3.0
- Created: 2017-07-11T01:58:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T07:10:39.000Z (almost 3 years ago)
- Last Synced: 2024-11-07T20:12:51.682Z (3 months ago)
- Topics: library, nodejs, rainbow-six, typescript
- Language: TypeScript
- Size: 186 KB
- Stars: 45
- Watchers: 9
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# R6Stats API Client for NodeJS
This open-source library is provided by the R6Stats team as a means of accessing the public R6Stats web API.
## Installation
```bash
npm install @r6stats/node --save
```## API Key
Although the R6Stats API is currently provided free of charge, we do require an API key to maintain access control. You can obtain an API key via our [Discord Server](https://discord.com/invite/pUdraS3) or via [[email protected]]([email protected]).
## Usage
### Version 3.x
```js
import R6StatsAPI from '@r6stats/node'// create an instance of the API client
const api = new R6StatsAPI({ apiKey: 'xxx' })
``````js
// valid platform options: pc, xbox, ps4// get general stats (kills, deaths, etc.)
const player = await api.playerStats({ username: 'xxx', platform: 'pc' })
console.log(player.username, player.stats.general.kills)// get operator stats
const player = await api.operatorStats({ username: 'xxx', platform: 'pc' })
console.log(player.username, player.operators[0].name, player.operators[0].kills)// get weapon stats
const player = await api.weaponStats({ username: 'xxx', platform: 'pc' })
console.log(player.username, player.weapons[0].name, player.weapons[0].kills)// get weapon category stats
const player = await api.weaponCategoryStats({ username: 'xxx', platform: 'pc' })
console.log(player.username, player.categories[0].category, player.categories[0].kills)
```## License
See `LICENSE`
The R6Stats API Client library may be used in any project given that it does not directly compete with the R6Stats Website or its available applications. The client library is meant for individual usage only. Please direct all licensing questions to [[email protected]](mailto:[email protected]).
R6Stats is a fan-made project and is not affiliated with Ubisoft. Tom Clancy’s, Rainbow Six, The Soldier Icon, Ubisoft and the Ubisoft logo are trademarks of Ubisoft Entertainment. Google Play and the Google Play logo are trademarks of Google LLC. Apple and the Apple Logo are trademarks of Apple Inc. App Store is a service mark of Apple Inc.