platform |
OverwatchPlatform |
Yes |
The platform of the user |
region |
OverwatchRegion |
Yes |
The region of the user |
battletag |
string |
Yes |
The battletag of the user ie. My_Name_Is_Jeff_From_The_OW_Team#11561 |
##### Output |
|
|
|
The GetProfile function returns a Promise<OverwatchProfile> |
|
|
|
##### Usage |
|
|
|
```javascript |
|
|
|
const API = new OverwatchAPI(); |
|
|
|
API.GetProfile("pc", "us", "My_Name_Is_Jeff_From_The_OW_Team#11561").then((data) => { |
|
|
|
// Your Code Here :D |
|
|
|
}) |
|
|
|
``` |
|
|
|
#### GetCompleteStats |
|
|
|
##### Inputs |
|
|
|
```typescript |
|
|
|
type OverwatchPlatform = "pc" |
"xbox" |
"ps4" |
"nintendo-switch"; |
type OverwatchRegion = "us" |
"eu" |
"asia"; |
|
``` |
|
|
|
Parameter |
Type |
Required |
Description |
------------- |
------------- |
------------- |
------------- |
platform |
OverwatchPlatform |
Yes |
The platform of the user |
region |
OverwatchRegion |
Yes |
The region of the user |
battletag |
string |
Yes |
The battletag of the user ie. My_Name_Is_Jeff_From_The_OW_Team#11561 |
##### Output |
|
|
|
The GetCompleteStats function returns something im too lazy to add type def for so Promise<any> is what you get. |
|
|
|
##### Usage |
|
|
|
```javascript |
|
|
|
const API = new OverwatchAPI(); |
|
|
|
API.GetCompleteStats("pc", "us", "My_Name_Is_Jeff_From_The_OW_Team#11561").then((data) => { |
|
|
|
// Your Code Here :D |
|
|
|
}) |
|
|
|
``` |
|
|
|
#### GetHeroStats |
|
|
|
##### Inputs |
|
|
|
```typescript |
|
|
|
type OverwatchPlatform = "pc" |
"xbox" |
"ps4" |
"nintendo-switch"; |
type OverwatchRegion = "us" |
"eu" |
"asia"; |
|
type OverwatchHeros = ['ana' , 'ashe' , 'baptiste' , 'bastion' , 'brigitte' , 'doomfist' , 'dva' , 'echo' , 'genji' , 'hammond' , 'hanzo' , 'junkrat' , 'lucio' , 'mccree' , 'mei' , 'mercy' , 'moira' , 'orisa' , 'pharah' , 'reaper' , 'reinhardt' , 'roadhog' , 'sigma' , 'soldier' , 'sombra' , 'symmetra' , 'torbjorn' , 'tracer' , 'widowmaker' , 'winston' , 'zarya' , 'zenyatta']; |
|
|
|
``` |
|
|
|
Parameter |
Type |
Required |
Description |
------------- |
------------- |
------------- |
------------- |
platform |
OverwatchPlatform |
Yes |
The platform of the user |
region |
OverwatchRegion |
Yes |
The region of the user |
battletag |
string |
Yes |
The battletag of the user ie. My_Name_Is_Jeff_From_The_OW_Team#11561 |
heros |
OverwatchHeros |
Yes |
An Array of heros you want stats for. |
##### Output |
|
|
|
The GetHeroStats function returns something i was also too lazy to type def so Promise<any> is your best friend. |
|
|
|
##### Usage |
|
|
|
```javascript |
|
|
|
const API = new OverwatchAPI(); |
|
|
|
API.GetHeroStats("pc", "us", "My_Name_Is_Jeff_From_The_OW_Team#11561", ["genji", "hanzo"]).then((data) => { |
|
|
|
// Your Code Here :D |
|
|
|
}) |
|
|
|
``` |
|
|
|
### Return Types |
|
|
|
#### OverwatchProfile |
|
|
|
```typescript |
|
|
|
export interface OverwatchProfile { |
|
|
|
competitiveStats: { |
|
|
|
awards: { |
|
|
|
cards: number, |
|
|
|
medals: number, |
|
|
|
medalsBronze: number, |
|
|
|
medalsSilver: number, |
|
|
|
medalsGold: number |
|
|
|
}, |
|
|
|
games: { |
|
|
|
played: number, |
|
|
|
won: number |
|
|
|
}, |
|
|
|
}, |
|
|
|
endorsment: number, |
|
|
|
endorsementIcon: string, |
|
|
|
gamesWon: number, |
|
|
|
icon: string, |
|
|
|
level: number, |
|
|
|
levelIcon: string, |
|
|
|
name: string, |
|
|
|
prestige: number, |
|
|
|
prestigeIcon: string, |
|
|
|
private: boolean, |
|
|
|
quickPlayStats: { |
|
|
|
awards: { |
|
|
|
cards: number, |
|
|
|
medals: number, |
|
|
|
medalsBronze: number, |
|
|
|
medalsSilver: number, |
|
|
|
medalsGold: number, |
|
|
|
}, |
|
|
|
games: {played: number, won: number}, |
|
|
|
}, |
|
|
|
rating: number, |
|
|
|
ratingIcon: string, |
|
|
|
ratings: { |
|
|
|
level: number, |
|
|
|
role: string, |
|
|
|
roleIcon: string |
|
|
|
}[], |
|
|
|
} |
|
|
|
``` |
|
|
|