Class R6StatsClient
API client for parsing Rainbow6 Siege Game Data
Inheritance
Namespace: R6Stats
Assembly: R6Stat-Sharp.dll
Syntax
public sealed class R6StatsClient : IDisposable
Constructors
| Improve this Doc View SourceR6StatsClient(R6StatsClientConfig)
Create an instance of R6StatsClient
Declaration
public R6StatsClient(R6StatsClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| R6StatsClientConfig | config | R6StatsClientConfig containing the necessary information to instanciate the client |
R6StatsClient(R6StatsClientConfig, IDictionary<String, IEnumerable<String>>)
Create an instance of R6StatsClient
Declaration
public R6StatsClient(R6StatsClientConfig config, IDictionary<string, IEnumerable<string>> headers)
Parameters
| Type | Name | Description |
|---|---|---|
| R6StatsClientConfig | config | R6StatsClientConfigObject containing the necessary information to instanciate the client |
| IDictionary<System.String, IEnumerable<System.String>> | headers | Optional request headers to be used while making REST API requests |
Methods
| Improve this Doc View SourceDispose()
Declaration
public void Dispose()
GetGenericStats(String, Platform)
Method for making generic data request to the API
Declaration
public Task<APIResponse<GenericResponse>> GetGenericStats(string username, Platform platform)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | username | Username the stats belongs to |
| Platform | platform | Platform the user plays on |
Returns
| Type | Description |
|---|---|
| Task<APIResponse<GenericResponse>> | APIResponse<T> containing the request status data and a GenericResponse with the requested data |
Remarks
Generic information contains the basic profile information along with some overall information about gamemode stats
GetLeaderboard(Platform, Region)
Parse the current leaderboard for a region
Declaration
public Task<APIResponse<Leaderboard>> GetLeaderboard(Platform platform, Region region = Region.ALL)
Parameters
| Type | Name | Description |
|---|---|---|
| Platform | platform | Platform for the leaderboard |
| Region | region | Region of the players in the leaderboard |
Returns
| Type | Description |
|---|---|
| Task<APIResponse<Leaderboard>> | APIResponse<T> containing the request status data and a Leaderboard with the requested data |
GetOperatorStats(String, Platform)
Declaration
public Task<APIResponse<OperatorResponse>> GetOperatorStats(string username, Platform platform)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | username | Username the stats belongs to |
| Platform | platform | Platform the user plays on |
Returns
| Type | Description |
|---|---|
| Task<APIResponse<OperatorResponse>> | APIResponse<T> containing the request status data and a OperatorResponse with the requested data |
GetSeasonalStats(String, Platform)
Declaration
public Task<APIResponse<SeasonalResponse>> GetSeasonalStats(string username, Platform platform)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | username | Username the stats belongs to |
| Platform | platform | Platform the user plays on |
Returns
| Type | Description |
|---|---|
| Task<APIResponse<SeasonalResponse>> | APIResponse<T> containing the request status data and a SeasonalResponse with the requested data |
Examples
How to get seasonal stats
var seasonal = await GetSeasonalStats("username", Platform.PC)
GetWeaponCategoryStats(String, Platform)
Declaration
public Task<APIResponse<WeaponCategoryResponse>> GetWeaponCategoryStats(string username, Platform platform)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | username | Username the stats belongs to |
| Platform | platform | Platform the user plays on |
Returns
| Type | Description |
|---|---|
| Task<APIResponse<WeaponCategoryResponse>> | APIResponse<T> containing the request status data and a WeaponCategoryResponse with the requested data |
GetWeaponStats(String, Platform)
Declaration
public Task<APIResponse<WeaponsResponse>> GetWeaponStats(string username, Platform platform)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | username | Username the stats belongs to |
| Platform | platform | Platform the user plays on |
Returns
| Type | Description |
|---|---|
| Task<APIResponse<WeaponsResponse>> | APIResponse<T> containing the request status data and a WeaponsResponse with the requested data |