new hw2/stats()
Creates a stats object
Members
-
_http
-
Initializes a new HttpWrapper with API Key
Methods
-
matchEvents(ID)
-
Returns Match Events https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Match-Events?
Parameters:
Name Type Description ID
Number of match Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.matchEvents(ID).then( (events) => { //Do code here });
-
matchResult(ID)
-
Returns Match Results https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Match-Result?
Parameters:
Name Type Description ID
Number of match Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.matchResults(ID).then( (results) => { //Do code here });
-
playerCampaignProgress(Name)
-
Returns Player Campaign Progress https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Player-Campaign-Progress?
Parameters:
Name Type Description Name
String of player Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.playerCampaignProgress('player').then( (progress) => { //Do code here });
-
playerMatchHistory(Name, Match, Index, Count)
-
Returns Player Match History https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Player-Match-History?
Parameters:
Name Type Description Name
String of player Match
String Type (default all) Index
number of match to start on (default 0) Count
number of items to return (default 25) Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.playerMatchHistory('player', 'matchmaking', 0, 10).then( (matches) => { //Do code here });
-
playerPlaylistRatings(ID, Comma-separated)
-
Returns Player Playlist Ratings The ID that this wants can be obtained throuth the 'metadata' and then 'playlists' In the metadata JSON the ID is referred to as 'Identity' (NOT 'ID') and looks like a177b19a32164962abdc4653dfb7911b https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Player-Playlist-Ratings?
Parameters:
Name Type Description ID
String of playlist Comma-separated
String list of players Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.playerPlaylistRatings('a177b19a32164962abdc4653dfb7911b', 'player1,player2').then( (ratings) => { //Do code here });
-
playerSeasonStatsSummary(Name, ID)
-
Returns Player Season Stats Summary https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Player-Season-Stats-Summary?
Parameters:
Name Type Description Name
String of player ID
String of season Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.playerSeasonStatsSummary(ID, players).then( (stats) => { //Do code here });
-
playerStatsSummary(Name)
-
Returns Player Stats Summary https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Player-Stats-Summary?
Parameters:
Name Type Description Name
String of player Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.playerStatsSummary(player).then( (stats) => { //Do code here });
-
playerXPs(Name)
-
Returns Player XPs https://developer.haloapi.com/docs/services/58acdf27e2f7f71ad0dad84b/operations/Halo-Wars-2-Player-XPs?
Parameters:
Name Type Description Name
String of player Returns:
Promise of JSON from API- Type
- Promise
Example
halo.hw2.stats.playerXPs(player).then( (xps) => { //Do code here });