Class: h5/stats

h5/stats


new h5/stats()

Creates a metadata object

Members


_http

Initializes a new HttpWrapper with API Key

Methods


matchEvents(matchID)

Parameters:
Name Type Description
matchID string Match ID
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.matchEvents("matchID").then( (results) => {
  //Do code here
});

matchResultArena(matchID)

Parameters:
Name Type Description
matchID string Match ID
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.matchResultArena("matchID").then( (results) => {
  //Do code here
});

matchResultCampaign(matchID)

Parameters:
Name Type Description
matchID string Match ID
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.matchResultCampaign("matchID").then( (results) => {
  //Do code here
});

matchResultCustom(matchID)

Parameters:
Name Type Description
matchID string Match ID
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.matchResultCustom("matchID").then( (results) => {
  //Do code here
});

matchResultCustomPC(matchID)

Parameters:
Name Type Description
matchID string Match ID
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.matchResultCustomPC("matchID").then( (records) => {
  //Do code here
});

matchResultWarzone(matchID)

Parameters:
Name Type Description
matchID string Match ID
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.matchResultWarzone("matchID").then( (results) => {
  //Do code here
});

playerCSR(seasonID, playlistID, count)

Parameters:
Name Type Description
seasonID string Season ID
playlistID string Playlist ID
count number Count (default 200)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerCSR("seasonID", "playlistID").then( (results) => {
  //Do code here
});

playerMatchHistory(player, modes, start, count)

Parameters:
Name Type Description
player string Gamertag of Player
modes string Modes (arena, campaign, custom, or warzone) Comma separated. (default all)
start number Start index (default 0)
count number Count (default 25)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerMatchHistory ("matchID").then( (results) => {
  //Do code here
});

playerMatchHistoryPC(player, modes, start, count)

Parameters:
Name Type Description
player string Players Gamertags
modes string Modes (arena, campaign, custom, or warzone) (default all) Comma separated
start number Start index (default 0)
count number Count (default 25)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerMatchHistoryPC("MAX1MUM D3ATH").then( (matches) => {
  //Do code here
});

playerServiceRecordsArena(player, seasonID)

Parameters:
Name Type Description
player string Gamertags of players (comma separated)
seasonID string Season ID (default current season)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerServiceRecordsArena("MAX1MUM D3ATH").then( (records) => {
  //Do code here
});

playerServiceRecordsCampaign(player)

Parameters:
Name Type Description
player string Gamertags of players (comma separated)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerServiceRecordsCampaign("MAX1MUM D3ATH").then( (records) => {
  //Do code here
});

playerServiceRecordsCustom(player)

Parameters:
Name Type Description
player string Gamertags of players (comma separated)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerServiceRecordsCustom("MAX1MUM D3ATH").then( (records) => {
  //Do code here
});

playerServiceRecordsPC(players)

Parameters:
Name Type Description
players string Players Gamertags (comma separated)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerServiceRecordsPC("MAX1MUM D3ATH").then( (matches) => {
  //Do code here
});

playerServiceRecordsWarzone(player)

Parameters:
Name Type Description
player string Gamertags of players (comma separated)
Returns:
Promise of JSON from API
Type
Promise
Example
halo.h5.stats.playerServiceRecordsWarzone("MAX1MUM D3ATH").then( (records) => {
  //Do code here
});