Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
CalumW1 committed May 7, 2024
1 parent d96bf94 commit f934ec5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 32 deletions.
86 changes: 55 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# R6StatAPI

An API wrapper for Rainbow Six Seige written in JavaScript.

## Table of Contents

1. [Installation](#installation)
2. [Getting Started](#getting-started)
3. [Functions](#functions)
4. [Support](#support)

## Installation
``` npm i r6statapi ```
## Installation

`npm i r6statapi`

## Getting Started

Expand Down Expand Up @@ -46,7 +49,9 @@ console.log(user);
```

## Functions

### Table of Contents

1. [Auth](#Auth)
2. [GetUserByUsername](#get-user-by-username)
3. [GetUserByUserId](#get-user-by-userid)
Expand All @@ -57,24 +62,29 @@ console.log(user);
8. [GetOperators]()

#### Auth

Signs into the Ubisoft a returns a token.

```
await api.getAuth(email, password)
```

Example response

```
ewogICJ2ZXIiOiAiMSIsCiAgImFpZCI6ICJlM2Q1ZWE5ZS01MGJkLTQzYjctODhiZi0zOTc5NGY0ZTNkNDAiLAogICJlbnYiOiAiUHJvZCIsCiAgInNpZCI6ICI2YzVlY2E4MS1jYWI3LTQ0NjItOWUzOC04YjZkODA5OWQ1ZjEiLAogICJ0eXAiOiAiSldFIiwKICAiZW5jIjogIkExMjhDQkMiLAogICJpdiI6ICJPellRVVNkSkswNzJURTFJTXVpdFhnIiwKICAiaW50IjogIkhTMjU2IiwKICAia2lkIjogImFkNWNjMzFhLWI2ZmQtNGYyZS04N2JmLTNjZjRkOTc1OTY2NSIKfQ.-F6ZqzG9mOze0HRYJh3Ub23dQUR9BLR-VM7hMgbisN3tQZ1XLgZFyVH2sFmmX4VMPEKVG9e_PGLnPgrtyBfVkyyQBrjlppeWJXICTQPqj1-gg-0KCX4V3DkEd_o1VYbUAeuiA2QBtUeYIaxFluqxTZ5fr6fcGZvfB8npqMgahHLdcwyzcykp8klKbhOF5L17lUXMai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PUv26GcfsBzkuSHeFXSi_Xhg.oMj2gpJl_2eOj-pFuYvFyWr_t1JR48zgb2st82KTKWk
```

#### Get user by username

Gets a user by username

```
await api.getUserByUsername(userName, platform);
```

Example response

```
{
profileId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93',
Expand All @@ -86,12 +96,15 @@ Example response
```

#### Get user by userId

Gets a user by userId

```
await api.getUserById(user.userId, platform);
```

Example response

```
[
{
Expand All @@ -116,47 +129,56 @@ Example response
nameOnPlatform: 'calbob'
}
]
```
```

#### Get user progression

gets the progression for a user

```
await api.getUserProgression(user.userId, platform);
```
```

Example response

```
{
level: 326,
xp: 129949
{
level: 326,
xp: 129949
}
```

#### Get server status
Returns the status of a particular platform

Returns the status of a platform

platforms: pc, xbox, ps4

```
await api.getServerStatus(platfrom)
```

Example response

```
{
platform: 'PC',
status: 'Online',
maintenance: null,
impactedFeatures: []
}
```
```

#### Get user rank

Returns statistics for different gamemodes

```
await api.getUserRank(player.userId, platfrom);
```

Example response

```
{
casual: {
Expand Down Expand Up @@ -243,18 +265,18 @@ Example response
```

#### Get User Stats
Get seasonal user statistics

|Field | Type | Required | options |
| ----- | ---- | ------- | ------- |
| userId | id | yes | |
| platform | string | yes | uplay, xbox, ps4 |
| view | string | yes | seasonal |
| aggregation | string | yes | summary |
| gameMode | string | yes | All, Casual, Ranked |
| teamRole | string | yes | All|
| season | string | yes | format Y(No.)S(No.) Example Y6S3|
Get seasonal user statistics

| Field | Type | Required | options |
| ----------- | ------ | -------- | -------------------------------- |
| userId | id | yes | |
| platform | string | yes | uplay, xbox, ps4 |
| view | string | yes | seasonal |
| aggregation | string | yes | summary |
| gameMode | string | yes | All, Casual, Ranked |
| teamRole | string | yes | All |
| season | string | yes | format Y(No.)S(No.) Example Y6S3 |

```
const userStats = await api.getUserStats(
Expand All @@ -267,6 +289,7 @@ const userStats = await api.getUserStats(
season
);
```

Example response

```
Expand Down Expand Up @@ -317,19 +340,19 @@ Example response
]
```

#### Get Operator

#### Get Operator
Operator statistics for a particular season
Gets seasonal operator statistics

| Field | Type | Required | options |
| ----- | ---- | -------- | ------- |
| userId | Id | Yes|
| platform | string | Yes | uplay, xbox, ps4|
| view | string | Yes | seasonal |
| aggregation | string | Yes | operator |
| gameMode | string | Yes | All, Casual, Ranked |
| team role | string | Yes | Attacker, Defender|
| season | string | Yes | format Y(No.)S(No.) Example Y6S3 |
| Field | Type | Required | options |
| ----------- | ------ | -------- | -------------------------------- |
| userId | Id | Yes |
| platform | string | Yes | uplay, xbox, ps4 |
| view | string | Yes | seasonal |
| aggregation | string | Yes | operator |
| gameMode | string | Yes | All, Casual, Ranked |
| team role | string | Yes | Attacker, Defender |
| season | string | Yes | format Y(No.)S(No.) Example Y6S3 |

```
const operator = await api.getOperators(
Expand Down Expand Up @@ -510,4 +533,5 @@ Example Response
```

## Support
For any questions, bugs or feedback, please use our [Discord](https://discord.gg/Hc4rTJme4T) or create an issue on [Github]()

For any questions, bugs or feedback, please use our [Discord](https://discord.gg/Hc4rTJme4T) or create an issue on [Github](https://github.com/CalumW1/R6StatAPI)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"name": "r6statapi",
"description": "Wrapper for Rainbow Six Siege API",
"version": "1.2.4",
"version": "1.2.5",
"main": "src/index.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit f934ec5

Please sign in to comment.