Skip to content

Latest commit

Β 

History

History
839 lines (592 loc) Β· 64.1 KB

DOCS.md

File metadata and controls

839 lines (592 loc) Β· 64.1 KB

Stratz

Kind: global class


new Stratz(apiToken)

Create a new instance of STRATZ REST API wrapper. This is the first thing you do to start.

Param Type Description
apiToken string Your API token. You can get yours for free at https://stratz.com/api.

stratz._apiReq(path, method, [queryParameters]) β‡’ Promise<(HttpExceptionBody|any)>

Create a direct HTTP request to the STRATZ API.

Kind: instance method of Stratz
Returns: Promise<(HttpExceptionBody|any)> - Promise object that resolves with the result object of the HTTPS request OR the error object of type HttpExceptionBody.
Internal:

Param Type Description
path string Endpoint path.
method string HTTPS method.
[queryParameters] * Query parameters for the request.

stratz.getAbilities([languageId], [gameVersionId]) β‡’ Record<string, Ability>

All information retaining to the Dota 2 Abilities by Game Version.

Kind: instance method of Stratz
Returns: Record<string, Ability> - Promise object that resolves to JSON response represented by GET /Ability.

Param Type Default Description
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguage() for the full list of avaliable languages.
If not specified, the response will contain results in English.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getGameVersion() β‡’ Promise<Array<GameVersion>>

The list of game versions the Dota 2 game has gone through.

Kind: instance method of Stratz
Returns: Promise<Array<GameVersion>> - Promise object that resolves to JSON response represented by GET /GameVersion.


stratz.getLanguages() β‡’ Promise<Record<string, string>>

Returns the list of languages which STRATZ supports.

Kind: instance method of Stratz
Returns: Promise<Record<string, string>> - Promise object that resolves to JSON response represented by GET /Language.


stratz.getCluster() β‡’ Promise<Array<Cluster>>

Provided directly from Dota 2 Region files, the cluster is the geographically breakdown of where the game is played.

Kind: instance method of Stratz
Returns: Promise<Array<Cluster>> - Promise object that resolves to JSON response represented by GET /Cluster.


stratz.getGameMode() β‡’ Promise<Record<string, GameMode>>

Returns a list of GameMode types which is directly supplied by Dota 2. Matches API call will have a input for this value.

Kind: instance method of Stratz
Returns: Promise<Record<string, GameMode>> - Promise object that resolves to JSON response represented by GET /GameMode.


stratz.getHeroes([languageId], [gameVersionId]) β‡’ Promise<Record<string, Hero>>

The current list of Heroes found in the Dota 2 client. Includes all base stats plus additional information on the hero.

Kind: instance method of Stratz
Returns: Promise<Record<string, Hero>> - Promise object that resolves to JSON response represented by GET /Hero.

Param Type Default Description
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguage() for the full list of avaliable languages.
If not specified, the response will contain results in English.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getItems([languageId], [gameVersionId]) β‡’ Promise<Record<string, Item>>

List of Items in the Dota 2 Game and details about each.

Kind: instance method of Stratz
Returns: Promise<Record<string, Item>> - Promise object that resolves to JSON response represented by GET /Item.

Param Type Default Description
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguage() for the full list of avaliable languages.
If not specified, the response will contain results in English.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getItemById(id, [gameVersionId]) β‡’ Promise<Item>

More specific details about the Item ID.

Kind: instance method of Stratz
Returns: Promise<Item> - Promise object that resolves to JSON response represented by GET /Item/{id}.

Param Type Description
id number The Item ID requested.
Required.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getNpc([gameVersionId]) β‡’ Promise<Record<string, Npc>>

All information retaining to the Dota 2 Npcs by Game Version.

Kind: instance method of Stratz
Returns: Promise<Record<string, Npc>> - Promise object that resolves to JSON response represented by GET /Npc.

Param Type Description
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getLeagues() β‡’ Promise<Array<League>>

Returns the list of Leagues limited by the queries.

Kind: instance method of Stratz
Returns: Promise<Array<League>> - Promise object that resolves to JSON response represented by GET /League.

Param Type Description
[queryParameters.tier] Array<(0|1|2|3|4|5|6|7|8|9)> The type of league your requested limit by Dota 2 filter of Tier. Accepted : 1 - Amateur, 2 - Professional, 3 - DPC Minors (Premium), 4 - DPC Majors (Premium).
Available values : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
[queryParameters.skip] number The amount to skip before returning results.
[queryParameters.take] number The amount of results to take.
Max amount 100.
[queryParameters.requireImage] boolean If the league must have an image to return.
[queryParameters.orderBy] string The determiantion of the order of the results returned. Accepted inputs are LastMatchTime and Id.
Default is LastMatchTime.

stratz.getLeagueById(id) β‡’ Promise<League>

Return more data about a specific League.

Kind: instance method of Stratz
Returns: Promise<League> - Promise object that resolves to JSON response represented by GET /League/{id}.

Param Type Description
id number League ID.
Required.

stratz.getLeagueByIdMatches(id) β‡’ Promise<Array<Match>>

Kind: instance method of Stratz
Returns: Promise<Array<Match>> - Promise object that resolves to JSON response represented by GET /League/{id}/matches.

Param Type Description
id number League ID.
Required.
[queryParameters.include] Array<string> Determines what data you want to include back from the system. This is a comma delimited array input. The default data for this call is very limited. Accepted Values: Player, Series, League, Team, Ability, PickBan, HeroImp. Player will return additional information about each player such as Name, Rank, Season Leader Board, etc. Series returns back any information about the series. League returns League Object. Team returns back the RadiantTeam and DireTeam Object. Ability will return the Ability (Learn Events) object. PickBan will return the PickBan Object (Hero Pick and Ban Events during the draft). HeroImp will return the AvgImp values.
[queryParameters.steamId] number Requests matches where Steam Account Id is present.
[queryParameters.seriesId] number Matches with a matching .getLeagueByIdSeries().
[queryParameters.teamId] number Requests matches where a specific Team is present.
[queryParameters.isParsed] boolean Requests matches where we have parsed data for the match.
Default takes both Parsed and Un-parsed.
[queryParameters.isLeague] boolean Requests matches where they are league if any kind. Default takes both leagues and non-leagues.
[queryParameters.hasAward] boolean Requests matches where the an award has been won. Must be used in conjunction with playerType = Single.
[queryParameters.isStats] boolean Require that STRATZ belives this was a legit match and did not contain a leaver, feeding, etc.
Default includes both Stats and Non-stats matches.
[queryParameters.stageType] Array<string> For league, if you want only data from a specific set of time. Like Group Stages, Main Event, etc. Not all league have stages. This will apply a start/end date time to the query automatically.
[queryParameters.gameMode] string Requests matches where a specific or a group of .getGameMode() are present. This is a comma delimited array input.
[queryParameters.lobbyType] string Requests matches where a specific or group of .getGameMode() are present.
This is a comma delimited array input.
[queryParameters.gameVersion] Array<number> Requests matches where a specific or group of .getGameVersion() are present.
This is a comma delimited array input.
[queryParameters.tier] Array<(0|1|2|3|4|5|6|7|8|9)> The type of league your requested limit by Dota 2 filter of Tier.
Accepted: 1 - Amateur, 2 - Premium, 3 - Professional.
[queryParameters.take] number The amount of matches that will be returned.
The max value is 250.
[queryParameters.skip] number The amount of matches that will be skipped before turning rows.

stratz.getLeagueByIdSeries(id, [stageType], [take], [skip]) β‡’ Promise<Array<Series>>

Returns a list of Series Ids with the Match Data included.

Kind: instance method of Stratz
Returns: Promise<Array<Series>> - Promise object that resolves to JSON response represented by GET /League/{id}/series.

Param Type Description
id number League ID.
Required.
[stageType] Array<string> For league, if you want only data from a specific set of time. Like Group Stages, Main Event, etc. Not all league have stages. This will apply a start/end date time to the query automatically.
[take] number The amount of matches that will be returned.
The max value is 250.
[skip] number The amount of matches that will be skipped before turning rows.

stratz.getLobbyType() β‡’ Promise<Record<string, LobbyType>>

Returns a list of Lobby Type which are mirrored from the Dota 2 client.

Kind: instance method of Stratz
Returns: Promise<Record<string, LobbyType>> - Promise object that resolves to JSON response represented by GET /lobbyType.


stratz.getMatchById(id) β‡’ Promise<MatchDetailed>

A very in depth return of data about the match.
Very large, about 500kb in size.

Kind: instance method of Stratz
Returns: Promise<MatchDetailed> - Promise object that resolves to JSON response represented by GET /match/{id}.

Param Type Description
id number The Match ID requested.
Required.

stratz.postMatchCallById(id) β‡’ Promise<unknown>

Should a match fail to download or a new parse is needed for new data, call retry will tell our system to download this match again.
This call is extremely limited.

Kind: instance method of Stratz
Returns: Promise<unknown> - Promise object that resolves to JSON response represented by POST /match/{id}/retry.

Param Type Description
id number The Match ID requested.
Required.

stratz.getMatchBreakdown(id) β‡’ Promise<any>

Match Breakdown is a fast way to gather basic yet more advanced information about a match.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /match/{id}/breakdown.

Param Type Description
id number The Match ID for the Breakdown Data.
Required.

stratz.getMatchLive(id, [skip]) β‡’ Promise<Match>

Match Live is data where a match is on the Dota Watch list and still active. All League games are also Live.

Kind: instance method of Stratz
Returns: Promise<Match> - Promise object that resolves to JSON response represented by GET /match/{id}/live.

Param Type Description
id number The Match ID for the Live Data.
Required.
[skip] number The amount in seconds you wish to skip until you start getting MatchEvents or PlayerMatchEvents.

stratz.getPatchNotes([languageId]) β‡’ Promise<any>

Deprecated

Return Patch Notes for each Item/Ability. These are found when you hover over each object in-game.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /Patch/notes.

Param Type Default Description
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguage() for the full list of avaliable languages.
If not specified, the response will contain results in English.

stratz.getPlayer(id) β‡’ Promise<StratzPlayer>

Returns specific data about specific Steam Account ID.

Kind: instance method of Stratz
Returns: Promise<StratzPlayer> - Promise object that resolves to JSON response represented by GET /Player/{id}.

Param Type Description
id number Steam Account ID.
Required.

stratz.getPlayerBasic(id) β‡’ Promise<StratzPlayerBasic>

Returns a very small quantity of data about a user.

Kind: instance method of Stratz
Returns: Promise<StratzPlayerBasic> - Promise object that resolves to JSON response represented by GET /Player/{id}/basic.

Param Type Description
id number Steam Account ID.
Required.

stratz.getPlayerMatches(id) β‡’ Promise<Array<MatchBreakdown>>

Returns matches about a specific Steam Account ID.

Kind: instance method of Stratz
Returns: Promise<Array<MatchBreakdown>> - Promise object that resolves to JSON response represented by GET /Player/{id}/matches.

Param Type Default Description
id number | string Steam Account ID of the Player.
Required.
[queryParameters.matchId] Array<number> Requests matches where the match id is an exact match.
This is a comma delimited array input.
[queryParameters.include] Array<string> Determines what data you want to include back from the system. This is a comma delimited array input. The default data for this call is very limited. Accepted Values: Player, Series, League, Team, Ability, PickBan, Spectators, Stats, StatsBreakdown. Player will return additional information about each player such as Name, Rank, Season Leader Board, etc. Series returns back any information about the series. League returns League Object. Team returns back the RadiantTeam and DireTeam Object. Ability will return the Ability (Learn Events) object. PickBan will return the PickBan Object (Hero Pick and Ban Events during the draft). Stats will return back the world average stats for basic data such as kills, deaths and assists based on Hero Rank/Lane/Role. Will also include extremely basic data for MatchPlayerStats.
[queryParameters.playerList] string "&quot;Single&quot;" PlayerList determines if just the original player will be returned OR all 10.
Accepted Values: All, Single. Default is Single.
[queryParameters.heroId] Array<number> Requests matches where heroId is present.
This is a comma delimited array input.
[queryParameters.leagueId] number Requests matches where a specific League is present.
[queryParameters.seriesId] number Matches with a matching .getLeagueByIdSeries().
[queryParameters.teamId] number Requests matches where a specific Team is present.
[queryParameters.isParsed] boolean Requests matches where we have parsed data for the match.
Default takes both Parsed and Un-parsed.
[queryParameters.isLeague] boolean Requests matches where they are league if any kind. Default takes both leagues and non-leagues.
[queryParameters.hasAward] boolean Requests matches where the an award has been won. Must be used in conjunction with playerType = Single.
[queryParameters.isStats] boolean Require that STRATZ belives this was a legit match and did not contain a leaver, feeding, etc.
Default includes both Stats and non-stats matches.
[queryParameters.isVictory] boolean Requests matches where the SteamId is Victorious. Default is null which returns both wins and defeats. Setting to 0 returns only defeats.
[queryParameters.gameMode] string Requests matches where a specific or a group of .getGameMode() are present.
This is a comma delimited array input.
[queryParameters.lobbyType] string Requests matches where a specific or a group of .getLobbyType() are present.
This is a comma delimited array input.
[queryParameters.gameVersionId] Array<number> Requests matches where a specific or a group of .getGameVersion() are present.
This is a comma delimited array input.
[queryParameters.withFriends] Array<number> Request matches where the friend Steam Account ID must be present. More than one value requires that all players must exist in the match.
This is a comma delimited array input.
[queryParameters.withFriendsHero] Array<number> Requests matches where the friend must be playing the specific hero. Must have the same array length as withFriends.
This is a comma delimited array input.
[queryParameters.lane] Array<(0|1|2|3|4|255)> Requests matches where the SteamId played in a specific lane. Default is null which returns all lanes.
This is a comma delimited array input.
Available values : 0, 1, 2, 3, 4, 255.
[queryParameters.role] number Requests matches where the SteamId played in a specific Role. (Core/Support).
Default is null which returns both roles.
Available values: 0, 1, 2, 255.
[queryParameters.tier] Array<(0|1|2|3|4|5|6|7|8|9)> Requests matches where the League tier matches.
Available values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
[queryParameters.region] Array<number> A comma delimited array model of Region Ids. Leaving null will produce all regions.
[queryParameters.rank] Array<number> "Requests matches where the average Rank of the match is in the bracket. Enter 0 for unknown average rank. Followed by 1-7 for each Dota 2 Rank.
This is a comma delimited array input.
[queryParameters.minDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no minimum.
[queryParameters.maxDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no maximum.
[queryParameters.minGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no minimum.
[queryParameters.maxGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.startDateTime] number Requests matches where the match end date is greater than the inputted time. Must input an Epoc Unix Timestamp of the time.
Default is null and there is no minium.
[queryParameters.endDateTime] number Requests matches where the match end date is less than the inputted time. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.isParty] boolean Shows only matches where the user is in a party.
[queryParameters.partyCount] Array<number> true Matches where the user is in a party with this many friends.
This is a comma delimited array input.
[queryParameters.isRadiant] boolean Matches where the user is on the Radiant Faction. Default is null which shows both factions.
Set to false for Dire.
[queryParameters.award] 0 | 1 | 2 | Array<3> Matches where the user gets a specific award.
This is a comma delimited array input.
Available values: 0, 1, 2, 3.
[queryParameters.isTeam] boolean Requests matches where they are on a team if any kind.
Default takes both team and non-team matches.
[queryParameters.take] number The amount of matches that will be returned.
The max value is 50.
[queryParameters.skip] number The amount of matches that will be skipped before turning rows.

stratz.getPlayerHeroPerformance(id, [heroId]) β‡’ Promise<(HeroPerformance|Array<HeroPerformance>)>

Returns a list of all Heroes played by the Steam Account ID and contains data about the average performance.

Kind: instance method of Stratz
Returns: Promise<(HeroPerformance|Array<HeroPerformance>)> - Promise object that resolves to JSON response represented by GET /Player/{id}/heroPerformance/{heroId}.

Param Type Default Description
id number Steam Account ID of the Player.
Required.
[heroId] Array<number> Requests matches where heroId is present.
If specified, shows the detailed statistics for matching heroId.
[queryParameters.matchId] Array<number> Requests matches where the match id is an exact match.
This is a comma delimited array input.
[queryParameters.leagueId] number Requests matches where a specific League is present.
[queryParameters.seriesId] number Matches with a matching .getLeagueByIdSeries().
[queryParameters.teamId] number Requests matches where a specific Team is present.
[queryParameters.isParsed] boolean Requests matches where we have parsed data for the match.
Default takes both Parsed and Un-parsed.
[queryParameters.isLeague] boolean Requests matches where they are league if any kind. Default takes both leagues and non-leagues.
[queryParameters.hasAward] boolean Requests matches where the an award has been won. Must be used in conjunction with playerType = Single.
[queryParameters.isStats] boolean Require that STRATZ belives this was a legit match and did not contain a leaver, feeding, etc.
Default includes both Stats and non-stats matches.
[queryParameters.isVictory] boolean Requests matches where the SteamId is Victorious. Default is null which returns both wins and defeats. Setting to 0 returns only defeats.
[queryParameters.gameMode] string Requests matches where a specific or a group of .getGameMode() are present.
This is a comma delimited array input.
[queryParameters.lobbyType] string Requests matches where a specific or a group of .getLobbyType() are present.
This is a comma delimited array input.
[queryParameters.gameVersionId] Array<number> Requests matches where a specific or a group of .getGameVersion() are present.
This is a comma delimited array input.
[queryParameters.withFriends] Array<number> Request matches where the friend Steam Account ID must be present. More than one value requires that all players must exist in the match.
This is a comma delimited array input.
[queryParameters.withFriendsHero] Array<number> Requests matches where the friend must be playing the specific hero. Must have the same array length as withFriends.
This is a comma delimited array input.
[queryParameters.lane] Array<(0|1|2|3|4|255)> Requests matches where the SteamId played in a specific lane. Default is null which returns all lanes.
This is a comma delimited array input.
Available values : 0, 1, 2, 3, 4, 255.
[queryParameters.role] number Requests matches where the SteamId played in a specific Role. (Core/Support).
Default is null which returns both roles.
Available values: 0, 1, 2, 255.
[queryParameters.tier] Array<(0|1|2|3|4|5|6|7|8|9)> Requests matches where the League tier matches.
Available values : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
[queryParameters.region] Array<number> A comma delimited array model of Region Ids. Leaving null will produce all regions.
[queryParameters.rank] Array<number> "Requests matches where the average Rank of the match is in the bracket. Enter 0 for unknown average rank. Followed by 1-7 for each Dota 2 Rank.
This is a comma delimited array input.
[queryParameters.minDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no minimum.
[queryParameters.maxDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no maximum.
[queryParameters.minGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no minimum.
[queryParameters.maxGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.startDateTime] number Requests matches where the match end date is greater than the inputted time. Must input an Epoc Unix Timestamp of the time.
Default is null and there is no minium.
[queryParameters.endDateTime] number Requests matches where the match end date is less than the inputted time. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.isParty] boolean Shows only matches where the user is in a party.
[queryParameters.partyCount] Array<number> true Matches where the user is in a party with this many friends.
This is a comma delimited array input.
[queryParameters.isRadiant] boolean Matches where the user is on the Radiant Faction. Default is null which shows both factions.
Set to false for Dire.
[queryParameters.award] 0 | 1 | 2 | Array<3> Matches where the user gets a specific award.
This is a comma delimited array input.
Available values: 0, 1, 2, 3.
[queryParameters.isTeam] boolean Requests matches where they are on a team if any kind.
Default takes both team and non-team matches.

stratz.getPlayerHeroPerformanceByHeroId(id, heroId) β‡’ Promise<HeroPerformance>

A more in depth at a single player's single hero performance.

Kind: instance method of Stratz
Returns: Promise<HeroPerformance> - Promise object that resolves to JSON response represented by GET /Player/{id}/heroPerformance/{heroId}.

Param Type Default Description
id number Steam Account ID of the Player.
Required.
heroId Array<number> Requests matches where heroId is present.
This is a comma delimited array input.
Required.
[queryParameters.matchId] Array<number> Requests matches where the match id is an exact match.
This is a comma delimited array input.
[queryParameters.leagueId] number Requests matches where a specific League is present.
[queryParameters.seriesId] number Matches with a matching .getLeagueByIdSeries().
[queryParameters.teamId] number Requests matches where a specific Team is present.
[queryParameters.isParsed] boolean Requests matches where we have parsed data for the match.
Default takes both Parsed and Un-parsed.
[queryParameters.isLeague] boolean Requests matches where they are league if any kind. Default takes both leagues and non-leagues.
[queryParameters.hasAward] boolean Requests matches where the an award has been won. Must be used in conjunction with playerType = Single.
[queryParameters.isStats] boolean Require that STRATZ belives this was a legit match and did not contain a leaver, feeding, etc.
Default includes both Stats and non-stats matches.
[queryParameters.isVictory] boolean Requests matches where the SteamId is Victorious. Default is null which returns both wins and defeats. Setting to 0 returns only defeats.
[queryParameters.gameMode] string Requests matches where a specific or a group of .getGameMode() are present.
This is a comma delimited array input.
[queryParameters.lobbyType] string Requests matches where a specific or a group of .getLobbyType() are present.
This is a comma delimited array input.
[queryParameters.gameVersionId] Array<number> Requests matches where a specific or a group of .getGameVersion() are present.
This is a comma delimited array input.
[queryParameters.withFriends] Array<number> Request matches where the friend Steam Account ID must be present. More than one value requires that all players must exist in the match.
This is a comma delimited array input.
[queryParameters.withFriendsHero] Array<number> Requests matches where the friend must be playing the specific hero. Must have the same array length as withFriends.
This is a comma delimited array input.
[queryParameters.lane] Array<(0|1|2|3|4|255)> Requests matches where the SteamId played in a specific lane. Default is null which returns all lanes.
This is a comma delimited array input.
Available values : 0, 1, 2, 3, 4, 255.
[queryParameters.role] number Requests matches where the SteamId played in a specific Role. (Core/Support).
Default is null which returns both roles.
Available values: 0, 1, 2, 255.
[queryParameters.tier] Array<(0|1|2|3|4|5|6|7|8|9)> Requests matches where the League tier matches.
Available values : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
[queryParameters.region] Array<number> A comma delimited array model of Region Ids. Leaving null will produce all regions.
[queryParameters.rank] Array<number> "Requests matches where the average Rank of the match is in the bracket. Enter 0 for unknown average rank. Followed by 1-7 for each Dota 2 Rank.
This is a comma delimited array input.
[queryParameters.minDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no minimum.
[queryParameters.maxDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no maximum.
[queryParameters.minGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no minimum.
[queryParameters.maxGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.startDateTime] number Requests matches where the match end date is greater than the inputted time. Must input an Epoc Unix Timestamp of the time.
Default is null and there is no minium.
[queryParameters.endDateTime] number Requests matches where the match end date is less than the inputted time. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.isParty] boolean Shows only matches where the user is in a party.
[queryParameters.partyCount] Array<number> true Matches where the user is in a party with this many friends.
This is a comma delimited array input.
[queryParameters.isRadiant] boolean Matches where the user is on the Radiant Faction. Default is null which shows both factions.
Set to false for Dire.
[queryParameters.award] 0 | 1 | 2 | Array<3> Matches where the user gets a specific award.
This is a comma delimited array input.
Available values: 0, 1, 2, 3.
[queryParameters.isTeam] boolean Requests matches where they are on a team if any kind.
Default takes both team and non-team matches.

stratz.getDotaPlusLeaderboard([heroId], [orderBy], [skip], [take]) β‡’ Promise<DotaPlusLeaderboard>

Gets the Players of Dota which have DotaPlus and have a high level hero.

Kind: instance method of Stratz
Returns: Promise<DotaPlusLeaderboard> - Promise object that resolves to JSON response represented by GET /Player/dotaPlusLeaderboard.

Param Type Default Description
[heroId] number If you want to limit to a single HeroId to find awards.
It can be found at .getGameVersion().
[orderBy] string Helps with the ordering. Accepted values are recent (Shows the most recent awards given) and level (showes by the highest level first).
[skip] number 0 Amount of records you want to skip before starting.
[take] number 20 Amount of total records you want to take.
Maximum amount is 100.

stratz.getProSteamAccounts() β‡’ Promise<Record<string, ESportsPlayer>>

Returns all known Professional eSport Players.

Kind: instance method of Stratz
Returns: Promise<Record<string, ESportsPlayer>> - Promise object that resolves to JSON response represented by GET /Player/proSteamAccount.


stratz.getPlayedWithPro(id) β‡’ Promise<unknown>

Picked the top pros and announcers and determines if you ever have played with them and when.

Kind: instance method of Stratz
Returns: Promise<unknown> - Promise object that resolves to JSON response represented by GET Player/{id}/playedWithPro.

Param Type Description
id number Steam Account ID.
Required.

stratz.getPlayerSummary(id) β‡’ Promise<PlayerSummary>

Returns a list of all Heroes played by the Steam Account ID and contains data about the average performance.

Kind: instance method of Stratz
Returns: Promise<PlayerSummary> - Promise object that resolves to JSON response represented by GET /player/{id}/summary.

Param Type Default Description
id number Steam Account ID of the Player.
Required.
[queryParameters.matchId] Array<number> Requests matches where the match id is an exact match.
This is a comma delimited array input.
[queryParameters.heroId] Array<number> Requests matches where heroId is present.
This is a comma delimited array input.
[queryParameters.leagueId] number Requests matches where a specific League is present.
[queryParameters.seriesId] number Matches with a matching .getLeagueByIdSeries().
[queryParameters.teamId] number Requests matches where a specific Team is present.
[queryParameters.isParsed] boolean Requests matches where we have parsed data for the match.
Default takes both Parsed and Un-parsed.
[queryParameters.isLeague] boolean Requests matches where they are league if any kind. Default takes both leagues and non-leagues.
[queryParameters.hasAward] boolean Requests matches where the an award has been won. Must be used in conjunction with playerType = Single.
[queryParameters.isStats] boolean Require that STRATZ belives this was a legit match and did not contain a leaver, feeding, etc.
Default includes both Stats and non-stats matches.
[queryParameters.isVictory] boolean Requests matches where the SteamId is Victorious. Default is null which returns both wins and defeats. Setting to 0 returns only defeats.
[queryParameters.gameMode] string Requests matches where a specific or a group of .getGameMode() are present.
This is a comma delimited array input.
[queryParameters.lobbyType] string Requests matches where a specific or a group of .getLobbyType() are present.
This is a comma delimited array input.
[queryParameters.gameVersionId] Array<number> Requests matches where a specific or a group of .getGameVersion() are present.
This is a comma delimited array input.
[queryParameters.withFriends] Array<number> Request matches where the friend Steam Account ID must be present. More than one value requires that all players must exist in the match.
This is a comma delimited array input.
[queryParameters.withFriendsHero] Array<number> Requests matches where the friend must be playing the specific hero. Must have the same array length as withFriends.
This is a comma delimited array input.
[queryParameters.lane] Array<(0|1|2|3|4|255)> Requests matches where the SteamId played in a specific lane. Default is null which returns all lanes.
This is a comma delimited array input.
Available values : 0, 1, 2, 3, 4, 255.
[queryParameters.role] number Requests matches where the SteamId played in a specific Role. (Core/Support).
Default is null which returns both roles.
Available values: 0, 1, 2, 255.
[queryParameters.tier] Array<(0|1|2|3|4|5|6|7|8|9)> Requests matches where the League tier matches.
Available values : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
[queryParameters.region] Array<number> A comma delimited array model of Region Ids. Leaving null will produce all regions.
[queryParameters.rank] Array<number> "Requests matches where the average Rank of the match is in the bracket. Enter 0 for unknown average rank. Followed by 1-7 for each Dota 2 Rank.
This is a comma delimited array input.
[queryParameters.minDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no minimum.
[queryParameters.maxDuration] number Requests matches where the match is no longer than this many minutes.
Default is null and there is no maximum.
[queryParameters.minGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no minimum.
[queryParameters.maxGameVersionId] number Requests matches where the match is lower than this input. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.startDateTime] number Requests matches where the match end date is greater than the inputted time. Must input an Epoc Unix Timestamp of the time.
Default is null and there is no minium.
[queryParameters.endDateTime] number Requests matches where the match end date is less than the inputted time. See .getGameVersion() API call for a list of patch IDs.
Default is null and there is no maximum.
[queryParameters.isParty] boolean Shows only matches where the user is in a party.
[queryParameters.partyCount] Array<number> true Matches where the user is in a party with this many friends.
This is a comma delimited array input.
[queryParameters.isRadiant] boolean Matches where the user is on the Radiant Faction. Default is null which shows both factions.
Set to false for Dire.
[queryParameters.award] 0 | 1 | 2 | Array<3> Matches where the user gets a specific award.
This is a comma delimited array input.
Available values: 0, 1, 2, 3.
[queryParameters.isTeam] boolean Requests matches where they are on a team if any kind.
Default takes both team and non-team matches.

stratz.getRegion() β‡’ Promise<Region>

Give a list connection the Cluster Id to a Region ID.

Kind: instance method of Stratz
Returns: Promise<Region> - Promise object that resolves to JSON response represented by GET /Region.


stratz.getUser() β‡’ Promise<User>

Get information about the current logged in user.
Required Authorization.

Kind: instance method of Stratz
Returns: Promise<User> - Promise object that resolves to JSON response represented by GET /User.


stratz.getUserSteam([returnUrl]) β‡’ Promise<any>

Get information about the current logged in user. Required Authorization.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /User/steam.

Param Type Default Description
[returnUrl] string "/api/v1/home/news" The return URL
Required.
Default value: '/api/v1/home/news'.

stratz.getSearch(query) β‡’ Promise<any>

The basic search system for STRATZ. Input a query and apply filters to limit the result set. There is over 50,000,000 names in the database. Be specific.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /Search.

Param Type Description
query string The text query you wish to search on.
Minimum input is 2 characters.
Required.
[queryParameters.minRank] number Value of the current badge for a Player. 80 is Immortal, 70 Divine, etc.
[queryParameters.maxRank] number Value of the current badge for a Player. 80 is Immortal, 70 Divine, etc.
[queryParameters.leaderboardRegion] Array<(0|1|2|3)> A list of Leaderboard Region Values.
0 America, 1 SE Asia, 2 Europe, 3 China. This is a comma delimited array input.
[queryParameters.lastSeen] number The Epoc Datestamp of when the player must have played by.
[queryParameters.tiers] Array<(1|2|3|4|5)> Used when searching Leagues.
1 Amateur, 2 Professional, 3 Premium, 4 and 5 are Pro Circuit.
[queryParameters.isPro] boolean Used when searching Teams, if the Team is a professional team.
[queryParameters.take] number Amount of results to be returned.
Max is 150.

stratz.getSearchByPlayer(query) β‡’ Promise<any>

The basic search system for STRATZ. Input a query and apply filters to limit the result set. There is over 50,000,000 names in the database. Be specific.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /search/player.

Param Type Description
query string The text query you wish to search on.
Minimum input is 2 characters.
Required.
[queryParameters.minRank] number Value of the current badge for a Player. 80 is Immortal, 70 Divine, etc.
[queryParameters.maxRank] number Value of the current badge for a Player. 80 is Immortal, 70 Divine, etc.
[queryParameters.leaderboardRegion] Array<number> A list of Leaderboard Region Values.
0 America, 1 SE Asia, 2 Europe, 3 China. This is a comma delimited array input.
[queryParameters.lastSeen] number The Epoc Datestamp of when the player must have played by.
[queryParameters.take] number Amount of results to be returned.
Max is 150.

stratz.getSearchByLeague(query, [tiers], [take]) β‡’ Promise<any>

The basic league search system for STRATZ. Input a query and apply filters to limit the result set. There is over 50,000,000 names in the database. Be specific.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /search/league.

Param Type Description
query string The text query you wish to search on.
Minimum input is 2 characters.
Required.
[tiers] Array<(1|2|3|4|5)> Used when searching Leagues.
1 Amateur, 2 Professional, 3 Premium, 4 and 5 are Pro Circuit.
[take] number Amount of results to be returned.
Max is 150.

stratz.getSearchByTeam(query, [isPro], [take]) β‡’ Promise<any>

The basic team search system for STRATZ. Input a query and apply filters to limit the result set. There is over 50,000,000 names in the database. Be specific.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /search/team.

Param Type Description
query string The text query you wish to search on.
Minimum input is 2 characters.
Required.
[isPro] boolean Used when searching Teams, if the Team is a professional team.
[take] number Amount of results to be returned.
Max is 150.

stratz.getSearchByMatch(query) β‡’ Promise<any>

The basic match search system for STRATZ. Input a query and apply filters to limit the result set. There is over 50,000,000 names in the database. Be specific.

Kind: instance method of Stratz
Returns: Promise<any> - Promise object that resolves to JSON response represented by GET /search/match.

Param Type Description
query string The text query you wish to search on.
Minimum input is 2 characters.
Required.

stratz.getHeroById([id], [languageId], [gameVersionId]) β‡’ Promise<Hero>

Search a Hero by its ID.

Kind: instance method of Stratz
Returns: Promise<Hero> - Promise object that resolves to JSON representation of a hero information.

Param Type Default Description
[id] number Hero ID according to .getHeroList().
If not specified, the resolve is equivalent to .getHeroes() method.
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguages() for the full list of avaliable languages.
If not specified, the response will contain results in English.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getAbilityById([id], [languageId], [gameVersionId]) β‡’ Promise<(Ability|Record<string, Ability>)>

Search an Ability by its ID.

Kind: instance method of Stratz
Returns: Promise<(Ability|Record<string, Ability>)> - Promise object that resolves to JSON representation of a hero's abilities information.

Param Type Default Description
[id] number Ability ID according to .getAbilityList().
If not specified, the resolve is equivalent to .getAbilities() method.
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguages() for the full list of avaliable languages.
If not specified, the response will contain results in English.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getHeroList([languageId], [gameVersionId]) β‡’ Promise

List of All Heroes in the Dota 2 Game by Name and Hero ID.

Kind: instance method of Stratz
Returns: Promise - Promise object that resolves to JSON representation of a list of abilities.

Param Type Default Description
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguages() for the full list of avaliable languages.
If not specified, the response will contain results in English.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getAbilityList([languageId], [gameVersionId]) β‡’ Promise<Array<AbilityList>>

List of All Abilities in the Dota 2 Game by Name and Ability ID.

Kind: instance method of Stratz
Returns: Promise<Array<AbilityList>> - Promise object that resolves to JSON representation of a list of abilities.

Param Type Default Description
[languageId] number StratzLanguage.English Language for the data to come back. Check .getLanguages() for the full list of avaliable languages.
If not specified, the response will contain results in English.
[gameVersionId] number Game Version ID matching .getGameVersion().
If not specified, the latest version data will be presented.

stratz.getLatestGameVersion([outputType]) β‡’ Promise<(number|string|GameVersion|Date|undefined)>

Get the Latest Version of Dota 2 Game with different variations.

Kind: instance method of Stratz
Returns: Promise<(number|string|GameVersion|Date|undefined)> - Promise object that resolves to a representation of a latest Dota 2 version.

Param Type Description
[outputType] 'date' | 'name' | 'id' The type of the value returned.
Accepted: "date", "name", "id" as strings.
If not specified, returns an object with all these values.