r6-data.js 1.8.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +869 -826
- package/methods/getAccountInfo.js +47 -39
- package/methods/getAttachment.js +28 -21
- package/methods/getCharms.js +28 -21
- package/methods/getGameStats.js +38 -30
- package/methods/getIsBanned.js +10 -2
- package/methods/getMaps.js +28 -21
- package/methods/getOperators.js +28 -21
- package/methods/getPlayerComparisons.js +16 -129
- package/methods/getPlayerStats.js +83 -75
- package/methods/getRanks.js +32 -25
- package/methods/getSearchAll.js +35 -27
- package/methods/getSeasonalStats.js +47 -39
- package/methods/getSeasons.js +28 -21
- package/methods/getServiceStatus.js +26 -19
- package/methods/getStats.js +98 -90
- package/methods/getUniversalSkins.js +28 -21
- package/methods/getWeapons.js +28 -21
- package/package.json +1 -1
- package/types/function-declarations.d.ts +42 -42
- package/types/params-interfaces.d.ts +89 -89
package/README.md
CHANGED
|
@@ -1,100 +1,116 @@
|
|
|
1
|
-
# r6-data.js — R6 Rainbow Six Siege API Wrapper
|
|
2
|
-
|
|
3
|
-
**Rainbow Six Siege (R6) API wrapper** - Get player stats, operators, maps, ranks, seasons, charms and more. Full TypeScript support included. Last updated Y10S4
|
|
4
|
-
|
|
5
|
-
<div align="center">
|
|
6
|
-
<p>
|
|
7
|
-
<a href="https://github.com/mazeor9/r6-data.js/releases/latest">
|
|
8
|
-
<img src="https://img.shields.io/github/v/release/mazeor9/r6-data.js?style=for-the-badge" alt="GitHub release (latest SemVer)" /></a>
|
|
9
|
-
<a href="https://github.com/mazeor9/r6-data.js/releases/latest">
|
|
10
|
-
<img src="https://img.shields.io/github/release-date/mazeor9/r6-data.js?label=latest%20release&style=for-the-badge" alt="Latest release" /></a>
|
|
11
|
-
<a href="https://www.npmjs.com/package/r6-data.js"><img src="https://img.shields.io/npm/v/r6-data.js.svg?logo=npm&style=for-the-badge" alt="npm version" /></a>
|
|
12
|
-
<a href="https://www.npmjs.com/package/r6-data.js"><img src="https://img.shields.io/npm/dt/r6-data.js.svg?style=for-the-badge" alt="NPM downloads" /></a>
|
|
13
|
-
</p>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
npm i r6-data.js
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
nameOnPlatform: 'PlayerName',
|
|
52
|
-
platformType: 'uplay'
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
1
|
+
# r6-data.js — R6 Rainbow Six Siege API Wrapper
|
|
2
|
+
|
|
3
|
+
**Rainbow Six Siege (R6) API wrapper** - Get player stats, operators, maps, ranks, seasons, charms and more. Full TypeScript support included. Last updated Y10S4
|
|
4
|
+
|
|
5
|
+
<div align="center">
|
|
6
|
+
<p>
|
|
7
|
+
<a href="https://github.com/mazeor9/r6-data.js/releases/latest">
|
|
8
|
+
<img src="https://img.shields.io/github/v/release/mazeor9/r6-data.js?style=for-the-badge" alt="GitHub release (latest SemVer)" /></a>
|
|
9
|
+
<a href="https://github.com/mazeor9/r6-data.js/releases/latest">
|
|
10
|
+
<img src="https://img.shields.io/github/release-date/mazeor9/r6-data.js?label=latest%20release&style=for-the-badge" alt="Latest release" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/r6-data.js"><img src="https://img.shields.io/npm/v/r6-data.js.svg?logo=npm&style=for-the-badge" alt="npm version" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/r6-data.js"><img src="https://img.shields.io/npm/dt/r6-data.js.svg?style=for-the-badge" alt="NPM downloads" /></a>
|
|
13
|
+
</p>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm i r6-data.js
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## API Key
|
|
23
|
+
|
|
24
|
+
> **Notice:** Due to the abuse of the available APIs, it has been decided that from now on, in order to use both the package and the APIs, it is necessary to register on the website and create an API key.
|
|
25
|
+
|
|
26
|
+
To use this package, you need an **API Key**.
|
|
27
|
+
You can obtain your API Key by registering on the official website: **[r6data.eu](https://r6data.eu/)**.
|
|
28
|
+
Once registered, you can generate your personal API Key from your account settings.
|
|
29
|
+
|
|
30
|
+
**Note:** This API Key must be passed as the first argument to all `get` methods.
|
|
31
|
+
|
|
32
|
+
## R6Data Website for stats and API
|
|
33
|
+
|
|
34
|
+
Website where you can directly track your stats and also check the all infos that gives r6-data.js. Entire website is based on r6-data.js.
|
|
35
|
+
|
|
36
|
+
Visit the official website: **[r6data.eu](https://r6data.eu/)**
|
|
37
|
+
|
|
38
|
+
## TypeScript Support
|
|
39
|
+
|
|
40
|
+
Full TypeScript support with complete type definitions and IntelliSense.
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
// ES6 imports
|
|
44
|
+
import * as r6 from 'r6-data.js';
|
|
45
|
+
import { getAccountInfo, AccountInfoParams, PlatformType } from 'r6-data.js';
|
|
46
|
+
|
|
47
|
+
const apiKey = 'YOUR_API_KEY';
|
|
48
|
+
|
|
49
|
+
// Usage with types
|
|
50
|
+
const params: AccountInfoParams = {
|
|
51
|
+
nameOnPlatform: 'PlayerName',
|
|
52
|
+
platformType: 'uplay' as PlatformType
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const accountInfo = await r6.getAccountInfo(apiKey, params);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
// CommonJS (still supported)
|
|
60
|
+
const r6 = require('r6-data.js');
|
|
61
|
+
const apiKey = 'YOUR_API_KEY';
|
|
62
|
+
|
|
63
|
+
const accountInfo = await r6.getAccountInfo(apiKey, {
|
|
64
|
+
nameOnPlatform: 'PlayerName',
|
|
65
|
+
platformType: 'uplay'
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Getting Player Account Information
|
|
70
|
+
|
|
71
|
+
The `getAccountInfo()` function allows you to retrieve player profile data from the official Rainbow Six Siege API. This function is specifically designed for retrieving account information such as player level, experience, clearance level, and profile settings.
|
|
72
|
+
|
|
73
|
+
```javascript
|
|
74
|
+
const r6Info = require('r6-data.js');
|
|
75
|
+
|
|
76
|
+
async function main() {
|
|
77
|
+
try {
|
|
78
|
+
const apiKey = 'YOUR_API_KEY';
|
|
79
|
+
|
|
80
|
+
// Get player account information
|
|
81
|
+
const accountInfo = await r6Info.getAccountInfo(apiKey, {
|
|
82
|
+
nameOnPlatform: 'PlayerName',
|
|
83
|
+
platformType: 'uplay'
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
console.log('Account information:', accountInfo);
|
|
87
|
+
return accountInfo;
|
|
88
|
+
|
|
89
|
+
} catch (error) {
|
|
90
|
+
console.error('Error retrieving account information:', error.message);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
main();
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Parameters
|
|
98
|
+
|
|
99
|
+
The `getAccountInfo()` function accepts the API Key and an object with the following parameters:
|
|
100
|
+
|
|
101
|
+
- `apiKey`: (Required) Your API Key from r6data.eu
|
|
102
|
+
- `nameOnPlatform`: (Required) The player's name on the platform
|
|
103
|
+
- `platformType`: (Required) The platform type - "uplay", "psn", or "xbl"
|
|
104
|
+
|
|
105
|
+
### Account Information Response
|
|
106
|
+
When using `getAccountInfo()`, you'll receive data about the player's profile, including:
|
|
107
|
+
|
|
108
|
+
- Player level and experience
|
|
109
|
+
- Clearance level
|
|
110
|
+
- Achievement status
|
|
111
|
+
- Play time statistics
|
|
112
|
+
- Player profile settings and customization
|
|
113
|
+
|
|
98
114
|
## Getting Player Ban Status
|
|
99
115
|
|
|
100
116
|
The `getIsBanned()` function allows you to check if a player is currently banned from Rainbow Six Siege.
|
|
@@ -104,8 +120,10 @@ const r6Info = require('r6-data.js');
|
|
|
104
120
|
|
|
105
121
|
async function main() {
|
|
106
122
|
try {
|
|
123
|
+
const apiKey = 'YOUR_API_KEY';
|
|
124
|
+
|
|
107
125
|
// Check if player is banned
|
|
108
|
-
const banStatus = await r6Info.getIsBanned({
|
|
126
|
+
const banStatus = await r6Info.getIsBanned(apiKey, {
|
|
109
127
|
nameOnPlatform: 'PlayerName',
|
|
110
128
|
platformType: 'uplay'
|
|
111
129
|
});
|
|
@@ -123,738 +141,763 @@ main();
|
|
|
123
141
|
|
|
124
142
|
### Parameters
|
|
125
143
|
|
|
126
|
-
The `getIsBanned()` function accepts an object with the following parameters:
|
|
144
|
+
The `getIsBanned()` function accepts the API Key and an object with the following parameters:
|
|
127
145
|
|
|
146
|
+
- `apiKey`: (Required) Your API Key from r6data.eu
|
|
128
147
|
- `nameOnPlatform`: (Required) The player's name on the platform
|
|
129
148
|
- `platformType`: (Required) The platform type - "uplay", "psn", or "xbl"
|
|
130
149
|
|
|
131
150
|
### Ban Status Response
|
|
132
151
|
When using `getIsBanned()`, you'll receive data indicating the player's ban status.
|
|
133
152
|
|
|
134
|
-
## Getting Player Statistics
|
|
135
|
-
|
|
136
|
-
The `getPlayerStats()` function allows you to retrieve detailed gameplay statistics from the official Rainbow Six Siege API. This function is specifically designed for retrieving player performance data across different game modes.
|
|
137
|
-
|
|
138
|
-
```javascript
|
|
139
|
-
const r6Info = require('r6-data.js');
|
|
140
|
-
|
|
141
|
-
async function main() {
|
|
142
|
-
try {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
- `
|
|
178
|
-
- `
|
|
179
|
-
- `
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
- `
|
|
195
|
-
- `
|
|
196
|
-
- `
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
console.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"
|
|
244
|
-
|
|
245
|
-
"
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
"
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
"
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
`
|
|
421
|
-
`
|
|
422
|
-
`
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
console.
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
main()
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
```
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
console.
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
153
|
+
## Getting Player Statistics
|
|
154
|
+
|
|
155
|
+
The `getPlayerStats()` function allows you to retrieve detailed gameplay statistics from the official Rainbow Six Siege API. This function is specifically designed for retrieving player performance data across different game modes.
|
|
156
|
+
|
|
157
|
+
```javascript
|
|
158
|
+
const r6Info = require('r6-data.js');
|
|
159
|
+
|
|
160
|
+
async function main() {
|
|
161
|
+
try {
|
|
162
|
+
const apiKey = 'YOUR_API_KEY';
|
|
163
|
+
|
|
164
|
+
// Get player statistics
|
|
165
|
+
const playerStats = await r6Info.getPlayerStats(apiKey, {
|
|
166
|
+
nameOnPlatform: 'PlayerName',
|
|
167
|
+
platformType: 'uplay',
|
|
168
|
+
platform_families: 'pc'
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
console.log('Player statistics:', playerStats);
|
|
172
|
+
|
|
173
|
+
// Get player statistics for ranked mode only
|
|
174
|
+
const rankedStats = await r6Info.getPlayerStats(apiKey, {
|
|
175
|
+
nameOnPlatform: 'PlayerName',
|
|
176
|
+
platformType: 'uplay',
|
|
177
|
+
platform_families: 'pc',
|
|
178
|
+
board_id: 'ranked'
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
console.log('Ranked statistics:', rankedStats);
|
|
182
|
+
return rankedStats;
|
|
183
|
+
|
|
184
|
+
} catch (error) {
|
|
185
|
+
console.error('Error retrieving player statistics:', error.message);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
main();
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Parameters
|
|
193
|
+
|
|
194
|
+
The `getPlayerStats()` function accepts the API Key and an object with the following parameters:
|
|
195
|
+
|
|
196
|
+
- `apiKey`: (Required) Your API Key from r6data.eu
|
|
197
|
+
- `nameOnPlatform`: (Required) The player's name on the platform
|
|
198
|
+
- `platformType`: (Required) The platform type - "uplay", "psn", or "xbl"
|
|
199
|
+
- `platform_families`: (Required) The platform family - "pc" or "console"
|
|
200
|
+
- `board_id`: (Optional) The game mode to filter statistics - "casual", "event", "warmup", "standard", or "ranked"
|
|
201
|
+
|
|
202
|
+
### Player Statistics Response
|
|
203
|
+
When using `getPlayerStats()`, you'll receive detailed gameplay statistics, including:
|
|
204
|
+
|
|
205
|
+
- Rank information
|
|
206
|
+
- MMR (Matchmaking Rating)
|
|
207
|
+
- Win/loss records
|
|
208
|
+
- Seasonal performance data
|
|
209
|
+
- Skill metrics across different gameplay modes
|
|
210
|
+
|
|
211
|
+
You can filter these statistics by game mode using the `board_id` parameter:
|
|
212
|
+
|
|
213
|
+
- `casual`: Statistics for casual matches
|
|
214
|
+
- `event`: Statistics for limited-time events
|
|
215
|
+
- `warmup`: Statistics for warmup matches
|
|
216
|
+
- `standard`: Statistics for standard matches
|
|
217
|
+
- `ranked`: Statistics for ranked competitive matches
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## Getting Seasonal Statistics
|
|
221
|
+
|
|
222
|
+
The `getSeasonalStats()` function allows you to get detailed rank points history and seasonal progression for a specific player in the current season. Includes timestamp, rank information, RP values, and rank images
|
|
223
|
+
|
|
224
|
+
```javascript
|
|
225
|
+
const r6Info = require('r6-data.js');
|
|
226
|
+
|
|
227
|
+
async function main() {
|
|
228
|
+
try {
|
|
229
|
+
const apiKey = 'YOUR_API_KEY';
|
|
230
|
+
|
|
231
|
+
// Get seasonal statistics for a player
|
|
232
|
+
const seasonalStats = await r6Info.getSeasonalStats(apiKey, {
|
|
233
|
+
nameOnPlatform: 'PlayerName',
|
|
234
|
+
platformType: 'uplay'
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
console.log('Seasonal statistics:', seasonalStats);
|
|
238
|
+
return seasonalStats;
|
|
239
|
+
|
|
240
|
+
} catch (error) {
|
|
241
|
+
console.error('Error retrieving seasonal statistics:', error.message);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
main();
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Parameters
|
|
249
|
+
|
|
250
|
+
The `getSeasonalStats()` function accepts the API Key and an object with the following parameters:
|
|
251
|
+
|
|
252
|
+
- `apiKey`: (Required) Your API Key from r6data.eu
|
|
253
|
+
- `nameOnPlatform`: (Required) The player's name on the platform
|
|
254
|
+
- `platformType`: (Required) The platform type - "uplay", "psn", or "xbl"
|
|
255
|
+
|
|
256
|
+
### Seasonal Statistics Response
|
|
257
|
+
|
|
258
|
+
```javascript
|
|
259
|
+
{
|
|
260
|
+
"data": {
|
|
261
|
+
"history": {
|
|
262
|
+
"metadata": {
|
|
263
|
+
"key": "RankPoints",
|
|
264
|
+
"name": "Rank Points",
|
|
265
|
+
"description": null
|
|
266
|
+
},
|
|
267
|
+
"data": [
|
|
268
|
+
[
|
|
269
|
+
"2025-10-14T21:43:27.315+00:00",
|
|
270
|
+
{
|
|
271
|
+
"displayName": "Rank Points",
|
|
272
|
+
"metadata": {
|
|
273
|
+
"rank": "PLATINUM II",
|
|
274
|
+
"imageUrl": "https://r6data.eu/assets/img/r6_ranks_img/platinum-2.webp",
|
|
275
|
+
"color": "#44ccc2"
|
|
276
|
+
},
|
|
277
|
+
"value": 3300,
|
|
278
|
+
"displayValue": "3,300",
|
|
279
|
+
"displayType": "Number"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
[
|
|
283
|
+
"2025-10-14T21:12:55.821+00:00",
|
|
284
|
+
{
|
|
285
|
+
"displayName": "Rank Points",
|
|
286
|
+
"metadata": {
|
|
287
|
+
"rank": "PLATINUM II",
|
|
288
|
+
"imageUrl": "https://r6data.eu/assets/img/r6_ranks_img/platinum-2.webp",
|
|
289
|
+
"color": "#44ccc2"
|
|
290
|
+
},
|
|
291
|
+
"value": 3302,
|
|
292
|
+
"displayValue": "3,302",
|
|
293
|
+
"displayType": "Number"
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"leaderboard": null,
|
|
299
|
+
"expiryDate": "0001-01-01T00:00:00+00:00",
|
|
300
|
+
"bestMatches": null
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Getting Game Statistics
|
|
305
|
+
|
|
306
|
+
The `getGameStats()` function allows you to get real-time player count statistics across all platforms including Steam, Ubisoft Connect, PlayStation, Xbox, and total player counts
|
|
307
|
+
|
|
308
|
+
```javascript
|
|
309
|
+
const r6Info = require('r6-data.js');
|
|
310
|
+
|
|
311
|
+
async function main() {
|
|
312
|
+
try {
|
|
313
|
+
const apiKey = 'YOUR_API_KEY';
|
|
314
|
+
|
|
315
|
+
// Get general game statistics
|
|
316
|
+
const gameStats = await r6Info.getGameStats(apiKey);
|
|
317
|
+
|
|
318
|
+
console.log('Game statistics:', gameStats);
|
|
319
|
+
return gameStats;
|
|
320
|
+
|
|
321
|
+
} catch (error) {
|
|
322
|
+
console.error('Error retrieving game statistics:', error.message);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
main();
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Game Statistics Response
|
|
330
|
+
```javascript
|
|
331
|
+
{
|
|
332
|
+
"steam": {
|
|
333
|
+
"concurrent": 33631,
|
|
334
|
+
"estimate": 33631
|
|
335
|
+
},
|
|
336
|
+
"crossPlatform": {
|
|
337
|
+
"totalRegistered": 85000000,
|
|
338
|
+
"monthlyActive": 15300000,
|
|
339
|
+
"trendsEstimate": 175666,
|
|
340
|
+
"platforms": {
|
|
341
|
+
"pc": 6885000,
|
|
342
|
+
"playstation": 5355000,
|
|
343
|
+
"xbox": 3060000
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"ubisoft": {
|
|
347
|
+
"onlineEstimate": 127739
|
|
348
|
+
},
|
|
349
|
+
"lastUpdated": "2025-10-15T22:39:38.636Z"
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## Comparing Player Statistics
|
|
354
|
+
|
|
355
|
+
The `getPlayerComparisons()` function compares Rainbow Six Siege statistics between multiple players, providing rankings and comparison metrics.
|
|
356
|
+
|
|
357
|
+
```javascript
|
|
358
|
+
const r6Info = require('r6-data.js');
|
|
359
|
+
|
|
360
|
+
async function main() {
|
|
361
|
+
try {
|
|
362
|
+
const apiKey = 'YOUR_API_KEY';
|
|
363
|
+
|
|
364
|
+
const comparison = await r6Info.getPlayerComparisons(apiKey, {
|
|
365
|
+
players: [
|
|
366
|
+
{ nameOnPlatform: 'Player1', platformType: 'uplay' },
|
|
367
|
+
{ nameOnPlatform: 'Player2', platformType: 'uplay' }
|
|
368
|
+
],
|
|
369
|
+
platform_families: 'pc',
|
|
370
|
+
board_id: 'ranked', // Optional
|
|
371
|
+
compareFields: ['kills', 'deaths', 'wins', 'losses'] // Optional
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
console.log('Comparison results:', comparison.comparison_summary.field_comparisons);
|
|
375
|
+
|
|
376
|
+
} catch (error) {
|
|
377
|
+
console.error('Error during comparison:', error.message);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
main();
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Parameters
|
|
385
|
+
|
|
386
|
+
- `apiKey`: (Required) Your API Key from r6data.eu
|
|
387
|
+
- `players`: (Required) Array of player objects with `nameOnPlatform` and `platformType`
|
|
388
|
+
- `platform_families`: (Required) "pc" or "console"
|
|
389
|
+
- `board_id`: (Optional) Game mode filter - "casual", "ranked", etc.
|
|
390
|
+
- `compareFields`: (Optional) Specific stats to compare (default: kills, deaths, wins, losses, etc.)
|
|
391
|
+
|
|
392
|
+
### Response
|
|
393
|
+
|
|
394
|
+
Returns comparison data with player stats, field rankings (highest/lowest/average), and metadata including success/failure counts.
|
|
395
|
+
|
|
396
|
+
## Creating Discord Webhooks for R6 Stats
|
|
397
|
+
|
|
398
|
+
The `createDiscordR6Webhook()` function allows you to send Rainbow Six Siege player statistics directly to a Discord channel using webhooks. This creates formatted embeds with player stats that can be customized with various options.
|
|
399
|
+
|
|
400
|
+
```javascript
|
|
401
|
+
const r6Info = require('r6-data.js');
|
|
402
|
+
|
|
403
|
+
async function main() {
|
|
404
|
+
try {
|
|
405
|
+
const apiKey = 'YOUR_API_KEY';
|
|
406
|
+
|
|
407
|
+
// First, get player statistics
|
|
408
|
+
const playerStats = await r6Info.getPlayerStats(apiKey, {
|
|
409
|
+
nameOnPlatform: 'PlayerName',
|
|
410
|
+
platformType: 'uplay',
|
|
411
|
+
platform_families: 'pc'
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// Send stats to Discord webhook
|
|
415
|
+
const webhookResult = await r6Info.createDiscordR6Webhook(
|
|
416
|
+
'https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN',
|
|
417
|
+
playerStats,
|
|
418
|
+
{
|
|
419
|
+
playerName: 'PlayerName',
|
|
420
|
+
title: 'Rainbow Six Siege Stats',
|
|
421
|
+
message: 'Here are the latest R6 stats!',
|
|
422
|
+
color: 0xF99E1A, // Orange color
|
|
423
|
+
avatarUrl: 'https://example.com/avatar.png'
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
|
|
427
|
+
console.log('Webhook sent successfully:', webhookResult);
|
|
428
|
+
|
|
429
|
+
} catch (error) {
|
|
430
|
+
console.error('Error sending webhook:', error.message);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
main();
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Parameters
|
|
438
|
+
The `createDiscordR6Webhook()` function accepts the following parameters:
|
|
439
|
+
- `webhookUrl`: (Required) The Discord webhook URL
|
|
440
|
+
- `playerData`: (Required) Player statistics data from getPlayerStats() or getAccountInfo()
|
|
441
|
+
- `options`: (Required) Configuration object with the following properties:
|
|
442
|
+
- `playerName`: (Required) The player's name to display
|
|
443
|
+
- `title`: (Optional) Custom title for the embed (default: "Rainbow Six Siege Stats")
|
|
444
|
+
- `message`: (Optional) Custom message content above the embed
|
|
445
|
+
- `color`: (Optional) Embed color in hexadecimal format (default: 0xF99E1A)
|
|
446
|
+
- `avatarUrl`: (Optional) URL for the player's avatar thumbnail
|
|
447
|
+
|
|
448
|
+
### Supported Data Formats
|
|
449
|
+
The function automatically detects and formats different data sources:
|
|
450
|
+
|
|
451
|
+
`Ubisoft API data`: From getPlayerStats() - displays ranked/standard statistics
|
|
452
|
+
`Steam data`: Custom Steam-formatted statistics
|
|
453
|
+
`Custom data`: Any custom statistics object
|
|
454
|
+
|
|
455
|
+
### Discord Webhook Setup
|
|
456
|
+
To use this function, you need to create a webhook in your Discord server:
|
|
457
|
+
|
|
458
|
+
1. Go to your Discord server settings
|
|
459
|
+
2. Navigate to Integrations → Webhooks
|
|
460
|
+
3. Click "New Webhook"
|
|
461
|
+
4. Copy the webhook URL
|
|
462
|
+
5. Use this URL in the `createDiscordR6Webhook()` function
|
|
463
|
+
|
|
464
|
+
## Searching Across All Entities
|
|
465
|
+
|
|
466
|
+
The `getSearchAll()` function allows you to search across all Rainbow Six Siege entities (operators, weapons, maps, seasons, charms, and attachments) with a single query. This is useful for finding relevant information across multiple categories at once.
|
|
467
|
+
|
|
468
|
+
```javascript
|
|
469
|
+
const r6Info = require('r6-data.js');
|
|
470
|
+
|
|
471
|
+
async function main() {
|
|
472
|
+
try {
|
|
473
|
+
const apiKey = 'YOUR_API_KEY';
|
|
474
|
+
|
|
475
|
+
// Search for all entities containing "black"
|
|
476
|
+
const searchResults = await r6Info.getSearchAll(apiKey, 'black');
|
|
477
|
+
console.log('Search results summary:', searchResults.summary);
|
|
478
|
+
|
|
479
|
+
// Access specific result categories
|
|
480
|
+
console.log('Operator results:', searchResults.results.operators);
|
|
481
|
+
console.log('Weapon results:', searchResults.results.weapons);
|
|
482
|
+
console.log('Map results:', searchResults.results.maps);
|
|
483
|
+
console.log('Season results:', searchResults.results.seasons);
|
|
484
|
+
console.log('Charm results:', searchResults.results.charms);
|
|
485
|
+
console.log('Attachment results:', searchResults.results.attachments);
|
|
486
|
+
|
|
487
|
+
// Search for a specific operator
|
|
488
|
+
const operatorSearch = await r6Info.getSearchAll(apiKey, 'ash');
|
|
489
|
+
console.log('Ash search results:', operatorSearch);
|
|
490
|
+
|
|
491
|
+
// Search for a specific map
|
|
492
|
+
const mapSearch = await r6Info.getSearchAll(apiKey, 'bank');
|
|
493
|
+
console.log('Bank search results:', mapSearch);
|
|
494
|
+
|
|
495
|
+
} catch (error) {
|
|
496
|
+
console.error('Error during search:', error.message);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
main();
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Parameters
|
|
504
|
+
|
|
505
|
+
The `getSearchAll()` function accepts the API Key and a query:
|
|
506
|
+
|
|
507
|
+
- `apiKey`: (Required) Your API Key from r6data.eu
|
|
508
|
+
- `query`: (Required) The search term to query across all entities
|
|
509
|
+
|
|
510
|
+
### Search Results
|
|
511
|
+
|
|
512
|
+
The function returns a structured object containing:
|
|
513
|
+
|
|
514
|
+
- query: The original search term
|
|
515
|
+
- summary: A summary object with counts of results by category and total
|
|
516
|
+
- results: An object containing arrays of results for each entity type:
|
|
517
|
+
- operators: Array of operator results
|
|
518
|
+
- weapons: Array of weapon results
|
|
519
|
+
- maps: Array of map results
|
|
520
|
+
- seasons: Array of season results
|
|
521
|
+
- charms: Array of charm results
|
|
522
|
+
- attachments: Array of attachment results
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
Each result includes an `entity_type` field indicating its category, along with relevant data fields for that entity type.
|
|
526
|
+
|
|
527
|
+
## Getting Rank Information
|
|
528
|
+
|
|
529
|
+
The `getRanks()` function supports retrieving rank information across different versions of the game's ranking system, from v1 to v6. This flexibility allows users to query rank data that aligns with specific game seasons or ranking system updates. Here are examples demonstrating how to use the `getRanks()` function for each version, including filtering options for `min_mmr` and `max_mmr`.
|
|
530
|
+
|
|
531
|
+
`v1: Until Y1S3 | #3 | Skull Rain`
|
|
532
|
+
|
|
533
|
+
`v2: Y1S4 | #4 | Red Crow`
|
|
534
|
+
|
|
535
|
+
`v3: Y2S1 - Y4S2 | #5 - #14 | Velvet Shell - Phantom Sight`
|
|
536
|
+
|
|
537
|
+
`v4: Y4S3 - Y6S2 | #15 - #22 | Ember Rise - North Star`
|
|
538
|
+
|
|
539
|
+
`v5: Y6S3 - Y7S3 | #23 - #27 | Crystal Guard - Brutal Swarm`
|
|
540
|
+
|
|
541
|
+
`V6: Y7S4+ | #28+ | Solar Raid+ (Ranked 2.0)`
|
|
542
|
+
|
|
543
|
+
### Version 1 (v1)
|
|
544
|
+
|
|
545
|
+
```javascript
|
|
546
|
+
const r6Info = require('r6-data.js');
|
|
547
|
+
|
|
548
|
+
async function main() {
|
|
549
|
+
|
|
550
|
+
try {
|
|
551
|
+
const apiKey = 'YOUR_API_KEY';
|
|
552
|
+
|
|
553
|
+
const ranksV1 = await r6Info.getRanks(apiKey, { version: 'v1' });
|
|
554
|
+
console.log('All ranks for version v1:', ranksV1);
|
|
555
|
+
|
|
556
|
+
const filteredRanksV1 = await r6Info.getRanks(apiKey, { min_mmr: 2000, max_mmr: 2500, version: 'v1' });
|
|
557
|
+
console.log('Filtered ranks for version v1:', filteredRanksV1);
|
|
558
|
+
|
|
559
|
+
} catch (error) {
|
|
560
|
+
console.error('Error while requesting ranks:', error.message);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
main();
|
|
565
|
+
```
|
|
566
|
+
`getRanks()` function with the version parameter set to 'v1' to retrieve all ranks for version 1 of the ranking system. We also demonstrate filtering the ranks by specifying the min_mmr and max_mmr parameters to get ranks within a specific MMR range.
|
|
567
|
+
|
|
568
|
+
For the others versions you can replace the v1 with v2, v3... and the others parameters
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
## Getting Service Status
|
|
572
|
+
|
|
573
|
+
The `getServiceStatus()` function allows you to retrieve the current status of the Rainbow Six Siege game servers. This information can be useful for monitoring the health and availability of the game service. Here's an example of how to use the `getServiceStatus()` function:
|
|
574
|
+
|
|
575
|
+
```javascript
|
|
576
|
+
const r6Info = require('r6-data.js');
|
|
577
|
+
|
|
578
|
+
async function main() {
|
|
579
|
+
|
|
580
|
+
try {
|
|
581
|
+
const apiKey = 'YOUR_API_KEY';
|
|
582
|
+
|
|
583
|
+
const serviceStatus = await r6Info.getServiceStatus(apiKey);
|
|
584
|
+
console.log('Service status:', serviceStatus);
|
|
585
|
+
|
|
586
|
+
} catch (error) {
|
|
587
|
+
console.error('Error while requesting service status:', error.message);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
main();
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
## Getting Map Information
|
|
595
|
+
|
|
596
|
+
The `getMaps()` function allows you to retrieve information about the maps available in Rainbow Six Siege. You can get a list of all maps or filter the maps based on specific criteria. Here's an example of how to use the `getMaps()` function:
|
|
597
|
+
|
|
598
|
+
```javascript
|
|
599
|
+
const r6Info = require('r6-data.js');
|
|
600
|
+
|
|
601
|
+
async function main() {
|
|
602
|
+
|
|
603
|
+
try {
|
|
604
|
+
const apiKey = 'YOUR_API_KEY';
|
|
605
|
+
|
|
606
|
+
// Get all maps
|
|
607
|
+
const maps = await r6Info.getMaps(apiKey);
|
|
608
|
+
console.log('All maps:', maps);
|
|
609
|
+
|
|
610
|
+
// Filter maps by name
|
|
611
|
+
const filteredMapsByName = await r6Info.getMaps(apiKey, { name: 'Bank' });
|
|
612
|
+
console.log('Maps filtered by name:', filteredMapsByName);
|
|
613
|
+
|
|
614
|
+
// Filter maps by location
|
|
615
|
+
const filteredMapsByLocation = await r6Info.getMaps(apiKey, { location: 'USA' });
|
|
616
|
+
console.log('Maps filtered by location:', filteredMapsByLocation);
|
|
617
|
+
|
|
618
|
+
// Filter maps by release date
|
|
619
|
+
const filteredMapsByReleaseDate = await r6Info.getMaps(apiKey, { releaseDate: '2015-12-01' });
|
|
620
|
+
console.log('Maps filtered by release date:', filteredMapsByReleaseDate);
|
|
621
|
+
|
|
622
|
+
// Filter maps by playlists
|
|
623
|
+
const filteredMapsByPlaylists = await r6Info.getMaps(apiKey, { playlists: 'ranked' });
|
|
624
|
+
console.log('Maps filtered by playlists:', filteredMapsByPlaylists);
|
|
625
|
+
|
|
626
|
+
// Filter maps by rework status
|
|
627
|
+
const filteredMapsByRework = await r6Info.getMaps(apiKey, { mapReworked: true });
|
|
628
|
+
console.log('Maps filtered by rework status:', filteredMapsByRework);
|
|
629
|
+
|
|
630
|
+
} catch (error) {
|
|
631
|
+
console.error('Error while requesting maps:', error.message);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
main();
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Retrieving all maps by calling `getMaps()` without any parameters.
|
|
639
|
+
Filtering maps by name using the `name` parameter.
|
|
640
|
+
Filtering maps by location using the `location` parameter.
|
|
641
|
+
Filtering maps by release date using the `releaseDate` parameter.
|
|
642
|
+
Filtering maps by playlists using the `playlists` parameter.
|
|
643
|
+
Filtering maps by rework status using the `mapReworked` parameter.
|
|
644
|
+
You can use these filtering options individually or combine them to retrieve specific subsets of maps based on your requirements.
|
|
645
|
+
|
|
646
|
+
## Getting Operator Information
|
|
647
|
+
|
|
648
|
+
The `getOperators()` function allows you to retrieve information about the operators available in Rainbow Six Siege. You can get a list of all operators or filter the operators based on specific criteria. Here's an example of how to use the `getOperators()` function:
|
|
649
|
+
|
|
650
|
+
```javascript
|
|
651
|
+
const r6Info = require('r6-data.js');
|
|
652
|
+
|
|
653
|
+
async function main() {
|
|
654
|
+
|
|
655
|
+
try {
|
|
656
|
+
const apiKey = 'YOUR_API_KEY';
|
|
657
|
+
|
|
658
|
+
// Get all operators
|
|
659
|
+
const operators = await r6Info.getOperators(apiKey);
|
|
660
|
+
console.log('All operators:', operators);
|
|
661
|
+
|
|
662
|
+
// Filter operators by name
|
|
663
|
+
const filteredOperatorsByName = await r6Info.getOperators(apiKey, { name: 'Ash' });
|
|
664
|
+
console.log('Operators filtered by name:', filteredOperatorsByName);
|
|
665
|
+
|
|
666
|
+
// Filter operators by safe name
|
|
667
|
+
const filteredOperatorsBySafeName = await r6Info.getOperators(apiKey, { safename: 'recruit' });
|
|
668
|
+
console.log('Operators filtered by safe name:', filteredOperatorsBySafeName);
|
|
669
|
+
|
|
670
|
+
// Filter operators by real name
|
|
671
|
+
const filteredOperatorsByRealName = await r6Info.getOperators(apiKey, { realname: 'Eliza Cohen' });
|
|
672
|
+
console.log('Operators filtered by real name:', filteredOperatorsByRealName);
|
|
673
|
+
|
|
674
|
+
// Filter operators by birthplace
|
|
675
|
+
const filteredOperatorsByBirthplace = await r6Info.getOperators(apiKey, { birthplace: 'Jerusalem, Israel' });
|
|
676
|
+
console.log('Operators filtered by birthplace:', filteredOperatorsByBirthplace);
|
|
677
|
+
|
|
678
|
+
// Filter operators by age
|
|
679
|
+
const filteredOperatorsByAge = await r6Info.getOperators(apiKey, { age: 33 });
|
|
680
|
+
console.log('Operators filtered by age:', filteredOperatorsByAge);
|
|
681
|
+
|
|
682
|
+
// Filter operators by date of birth
|
|
683
|
+
const filteredOperatorsByDateOfBirth = await r6Info.getOperators(apiKey, { date_of_birth: '1984-12-24' });
|
|
684
|
+
console.log('Operators filtered by date of birth:', filteredOperatorsByDateOfBirth);
|
|
685
|
+
|
|
686
|
+
// Filter operators by season introduced
|
|
687
|
+
const filteredOperatorsBySeasonIntroduced = await r6Info.getOperators(apiKey, { season_introduced: 'Y1S1' });
|
|
688
|
+
console.log('Operators filtered by season introduced:', filteredOperatorsBySeasonIntroduced);
|
|
689
|
+
|
|
690
|
+
} catch (error) {
|
|
691
|
+
console.error('Error while requesting operators:', error.message);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
main();
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
1. Retrieving all operators by calling `getOperators()` without any parameters.
|
|
699
|
+
2. Filtering operators by name using the `name` parameter.
|
|
700
|
+
3. Filtering operators by safe name using the `safename` parameter.
|
|
701
|
+
4. Filtering operators by real name using the `realname` parameter.
|
|
702
|
+
5. Filtering operators by birthplace using the `birthplace` parameter.
|
|
703
|
+
6. Filtering operators by age using the `age` parameter.
|
|
704
|
+
7. Filtering operators by date of birth using the `date_of_birth` parameter.
|
|
705
|
+
8. Filtering operators by season introduced using the `season_introduced` parameter.
|
|
706
|
+
|
|
707
|
+
You can get the operator url icon via r6Info.getOperators(), is in the json response.
|
|
708
|
+
|
|
709
|
+
## Getting Season Information
|
|
710
|
+
|
|
711
|
+
The `getSeasons()` function allows you to retrieve information about the seasons in Rainbow Six Siege. You can get a list of all seasons or filter the seasons based on specific criteria. Here's an example of how to use the `getSeasons()` function:
|
|
712
|
+
|
|
713
|
+
```javascript
|
|
714
|
+
const r6Info = require('r6-data.js');
|
|
715
|
+
|
|
716
|
+
async function main() {
|
|
717
|
+
|
|
718
|
+
try {
|
|
719
|
+
const apiKey = 'YOUR_API_KEY';
|
|
720
|
+
|
|
721
|
+
// Get all seasons
|
|
722
|
+
const seasons = await r6Info.getSeasons(apiKey);
|
|
723
|
+
console.log('All seasons:', seasons);
|
|
724
|
+
|
|
725
|
+
// Filter seasons by name
|
|
726
|
+
const filteredSeasonsByName = await r6Info.getSeasons(apiKey, { name: 'Black Ice' });
|
|
727
|
+
console.log('Seasons filtered by name:', filteredSeasonsByName);
|
|
728
|
+
|
|
729
|
+
// Filter seasons by map
|
|
730
|
+
const filteredSeasonsByMap = await r6Info.getSeasons(apiKey, { map: 'Yacht' });
|
|
731
|
+
console.log('Seasons filtered by map:', filteredSeasonsByMap);
|
|
732
|
+
|
|
733
|
+
// Filter seasons by operators
|
|
734
|
+
const filteredSeasonsByOperators = await r6Info.getSeasons(apiKey, { operators: 'Buck, Frost' });
|
|
735
|
+
console.log('Seasons filtered by operators:', filteredSeasonsByOperators);
|
|
736
|
+
|
|
737
|
+
// Filter seasons by weapons
|
|
738
|
+
const filteredSeasonsByWeapons = await r6Info.getSeasons(apiKey, { weapons: 'C8-SFW, Super 90' });
|
|
739
|
+
console.log('Seasons filtered by weapons:', filteredSeasonsByWeapons);
|
|
740
|
+
|
|
741
|
+
} catch (error) {
|
|
742
|
+
console.error('Error while requesting seasons:', error.message);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
main();
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
Retrieving all seasons by calling `getSeasons()` without any parameters.
|
|
750
|
+
- Filtering seasons by name using the `name` parameter.
|
|
751
|
+
- Filtering seasons by map using the `map` parameter.
|
|
752
|
+
- Filtering seasons by operators using the `operators` parameter.
|
|
753
|
+
- Filtering seasons by weapons using the `weapons` parameter.
|
|
754
|
+
|
|
755
|
+
## Getting Attachment Information
|
|
756
|
+
|
|
757
|
+
The `getAttachment()` function allows you to retrieve information about the attachments available in Rainbow Six Siege. You can get a list of all attachments or filter the attachments based on specific criteria. Here's an example of how to use the `getAttachment()` function:
|
|
758
|
+
|
|
759
|
+
```javascript
|
|
760
|
+
const r6Info = require('r6-data.js');
|
|
761
|
+
|
|
762
|
+
async function main() {
|
|
763
|
+
|
|
764
|
+
try {
|
|
765
|
+
const apiKey = 'YOUR_API_KEY';
|
|
766
|
+
|
|
767
|
+
// Get all attachments
|
|
768
|
+
const attachments = await r6Info.getAttachment(apiKey);
|
|
769
|
+
console.log('All attachments:', attachments);
|
|
770
|
+
|
|
771
|
+
// Filter attachments by name
|
|
772
|
+
const filteredAttachmentsByName = await r6Info.getAttachment(apiKey, { name: 'Red Dot Sight' });
|
|
773
|
+
console.log('Attachments filtered by name:', filteredAttachmentsByName);
|
|
774
|
+
|
|
775
|
+
// Filter attachments by style
|
|
776
|
+
const filteredAttachmentsByStyle = await r6Info.getAttachment(apiKey, { style: 'colour' });
|
|
777
|
+
console.log('Attachments filtered by style:', filteredAttachmentsByStyle);
|
|
778
|
+
|
|
779
|
+
// Filter attachments by rarity
|
|
780
|
+
const filteredAttachmentsByRarity = await r6Info.getAttachment(apiKey, { rarity: 'common' });
|
|
781
|
+
console.log('Attachments filtered by rarity:', filteredAttachmentsByRarity);
|
|
782
|
+
|
|
783
|
+
// Filter attachments by availability
|
|
784
|
+
const filteredAttachmentsByAvailability = await r6Info.getAttachment(apiKey, { availability: 'removed' });
|
|
785
|
+
console.log('Attachments filtered by availability:', filteredAttachmentsByAvailability);
|
|
786
|
+
|
|
787
|
+
} catch (error) {
|
|
788
|
+
console.error('Error while requesting attachments:', error.message);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
main();
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
Retrieving all attachments by calling `getAttachment()` without any parameters.
|
|
796
|
+
- Filtering attachments by name using the `name` parameter.
|
|
797
|
+
- Filtering attachments by style using the `style` parameter.
|
|
798
|
+
- Filtering attachments by rarity using the `rarity` parameter.
|
|
799
|
+
- Filtering attachments by availability using the `availability` parameter.
|
|
800
|
+
|
|
801
|
+
## Getting Charm Information
|
|
802
|
+
|
|
803
|
+
```javascript
|
|
804
|
+
const r6Info = require('r6-data.js');
|
|
805
|
+
const apiKey = 'YOUR_API_KEY';
|
|
806
|
+
|
|
807
|
+
// Get all charms
|
|
808
|
+
const charms = await r6Info.getCharms(apiKey);
|
|
809
|
+
console.log('All charms:', charms);
|
|
810
|
+
|
|
811
|
+
// Filter charms by specific criteria
|
|
812
|
+
const filteredCharms = await r6Info.getCharms(apiKey, {
|
|
813
|
+
name: 'Chibi',
|
|
814
|
+
collection: 'Year 1',
|
|
815
|
+
rarity: 'legendary',
|
|
816
|
+
availability: 'available',
|
|
817
|
+
bundle: 'Pro League Set',
|
|
818
|
+
season: 'Burnt Horizon'
|
|
819
|
+
});
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
The `getCharms()` function allows you to retrieve information about the charms available in Rainbow Six Siege. You can get all charms or filter them based on specific criteria:
|
|
823
|
+
|
|
824
|
+
- `name`: Filter by charm name
|
|
825
|
+
- `collection`: Filter by charm collection
|
|
826
|
+
- `rarity`: Filter by rarity level (common, uncommon, rare, epic, legendary)
|
|
827
|
+
- `availability`: Filter by availability status
|
|
828
|
+
- `bundle`: Filter by bundle name
|
|
829
|
+
- `season`: Filter by season released
|
|
830
|
+
|
|
831
|
+
## Getting Weapon Information
|
|
832
|
+
|
|
833
|
+
The `getWeapons()` function allows you to retrieve information about the weapons available in Rainbow Six Siege. You can get a list of all weapons or filter them by name. Here's an example of how to use the `getWeapons()` function:
|
|
834
|
+
|
|
835
|
+
```javascript
|
|
836
|
+
const r6Info = require('r6-data.js');
|
|
837
|
+
|
|
838
|
+
async function main() {
|
|
839
|
+
|
|
840
|
+
try {
|
|
841
|
+
const apiKey = 'YOUR_API_KEY';
|
|
842
|
+
|
|
843
|
+
// Get all weapons
|
|
844
|
+
const weapons = await r6Info.getWeapons(apiKey);
|
|
845
|
+
console.log('All weapons:', weapons);
|
|
846
|
+
|
|
847
|
+
// Filter weapons by name
|
|
848
|
+
const filteredWeaponsByName = await r6Info.getWeapons(apiKey, { name: 'F2' });
|
|
849
|
+
console.log('Weapons filtered by name:', filteredWeaponsByName);
|
|
850
|
+
|
|
851
|
+
} catch (error) {
|
|
852
|
+
console.error('Error while requesting weapons:', error.message);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
main();
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
The `getWeapons()` function retrieves information about the weapons in Rainbow Six Siege. You can:
|
|
860
|
+
|
|
861
|
+
- Retrieve all weapons by calling `getWeapons()` without any parameters
|
|
862
|
+
- Filter weapons by name using the `name` parameter
|
|
863
|
+
|
|
864
|
+
## Getting Universal Skin Information
|
|
865
|
+
|
|
866
|
+
The `getUniversalSkins()` function allows you to retrieve information about the universal skins available in Rainbow Six Siege. You can get a list of all universal skins or filter them by name. Here's an example of how to use the `getUniversalSkins()` function:
|
|
867
|
+
|
|
868
|
+
```javascript
|
|
869
|
+
const r6Info = require('r6-data.js');
|
|
870
|
+
|
|
871
|
+
async function main() {
|
|
872
|
+
|
|
873
|
+
try {
|
|
874
|
+
const apiKey = 'YOUR_API_KEY';
|
|
875
|
+
|
|
876
|
+
// Get all universal skins
|
|
877
|
+
const universalSkins = await r6Info.getUniversalSkins(apiKey);
|
|
878
|
+
console.log('All universal skins:', universalSkins);
|
|
879
|
+
|
|
880
|
+
// Filter universal skins by name
|
|
881
|
+
const filteredSkinsByName = await r6Info.getUniversalSkins(apiKey, { name: 'Black Ice' });
|
|
882
|
+
console.log('Universal skins filtered by name:', filteredSkinsByName);
|
|
883
|
+
|
|
884
|
+
} catch (error) {
|
|
885
|
+
console.error('Error while requesting universal skins:', error.message);
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
main();
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
The `getUniversalSkins()` function retrieves information about universal weapon skins in Rainbow Six Siege. You can:
|
|
893
|
+
|
|
894
|
+
- Retrieve all universal skins by calling `getUniversalSkins()` without any parameters
|
|
895
|
+
- Filter universal skins by name using the name parameter
|
|
896
|
+
|
|
897
|
+
## Error Handling
|
|
898
|
+
The package functions throw an exception if an error occurs during API requests. Make sure to handle errors appropriately using try-catch blocks.
|
|
899
|
+
|
|
900
|
+
If the access token has expired or is invalid, an exception will be thrown with the message "Token expired or invalid". In this case, you need to obtain a new token using the getToken() function.
|
|
901
|
+
|
|
902
|
+
## License
|
|
903
|
+
This package is fan made, so it has been created for only informational purposes
|