Extension:EsportsData

From Gamepedia Help Wiki
Jump to: navigation, search

The EsportsData extension exposes the gameapi parser tag, allowing editors to embed live data from the API of supported games.

Usage[edit | edit source]

The #gameapi parser tag requires two parameters. The game name which corresponds to the API being called and the API method to call on that service. A customized template can also be specified to control the output format. By default it will display a raw dump off the returned data in a list. Additional parameters that some API methods may require can be passed after the template parameter.

{{#gameapi:Game|API method[|Template|extra parameter ...]}}

Supported Game APIs[edit | edit source]

Abios Gaming[edit | edit source]

The game name for Abios Gaming is abiosgaming.

API Methods[edit | edit source]

games[edit | edit source]

Example:

{{#gameapi:abiosgaming|games}}

Will render a display of raw output of game information. The IDs return can be used to filter the matches API method for Abios Gaming.

matches[edit | edit source]

This parameter can be given provided game IDs taken from the games API response to limit the data returned.

Examples:

{{#gameapi:abiosgaming|matches|Template:TournamentRow}}

Displays upcoming tournament matches rendered into the specified template.

{{#gameapi:abiosgaming|matches|Template:TournamentRow|1,2}}

Displays upcoming tournament matches for game IDs 1 and 2 rendered into the specified template.


Smite[edit | edit source]

The game name for Smite is smite.

API Methods[edit | edit source]

getproleaguedata[edit | edit source]

This parameter can be given an additional parameter to filter data in the format of "key=value". The key is the array key in the raw data output.

Example:

{{#gameapi:smite|getproleaguedata|Template:ProLeagueList|home_team_tagname=TSM}}

Renders each entry of pro league data from the Smite api where TSM is the home team into the Template:ProLeagueList template individually.

getmatchdetails[edit | edit source]

Example:

{{#gameapi:smite|getmatchdetails|Template:MatchView|12358702984}}

Renders the details of the given match ID into the Template:MatchView template.


Rocket League[edit | edit source]

The game name for Rocket League is rocketleague.

API Methods[edit | edit source]

leaderboard[edit | edit source]

Two additional parameters can be specified. The leader board type which defaults to 3v3 and the maximum number of results to return which defaults to 10. Valid leader boards are 1v1, 2v2, 3v3, Wins, Goals, MVPs, Saves, Shots, Assists.

Example:

{{#gameapi:rocketleague|leaderboard|Template:LeaderboardPlayer|1v1|10}}

Renders the top 10 entries of Rocket League's 1v1 leader board into the Template:LeaderboardPlayer template individually.