Skip to main content

Dota2GamesService

A list of all methods in the Dota2GamesService service. Click on the method name to view detailed information about that method.

MethodsDescription
get_dota2_games_dota2GameIdGet a single Dota 2 game by ID
get_dota2_games_dota2GameId_framesList frames for a given Dota 2 game
get_dota2_matches_matchIdOrSlug_gamesList games for a given Dota 2 match
get_dota2_teams_teamIdOrSlug_gamesList finished games for a given Dota 2 team

get_dota2_games_dota2GameId

Get a single Dota 2 game by ID

  • HTTP Method: GET
  • Endpoint: /dota2/games/{dota2_game_id}

Parameters

NameTypeRequiredDescription
dota2GameIdnumberA game ID

Return Type

Dota2Game

Example Usage Code Snippet

import { PandascoreClient } from 'pandascore_client';

(async () => {
const pandascoreClient = new PandascoreClient({
token: 'YOUR_TOKEN',
});

const { data } = await pandascoreClient.dota2Games.getDota2GamesDota2GameId(7);

console.log(data);
})();

get_dota2_games_dota2GameId_frames

List frames for a given Dota 2 game

  • HTTP Method: GET
  • Endpoint: /dota2/games/{dota2_game_id}/frames

Parameters

NameTypeRequiredDescription
dota2GameIdnumberA game ID
pagePagePagination in the form of page=2 or page[size]=30&page[number]=2
perPagenumberEquivalent to page[size]

Return Type

Dota2Frame[]

Example Usage Code Snippet

import { Page, PandascoreClient } from 'pandascore_client';

(async () => {
const pandascoreClient = new PandascoreClient({
token: 'YOUR_TOKEN',
});

const page = 1;

const { data } = await pandascoreClient.dota2Games.getDota2GamesDota2GameIdFrames(5, {
page: page,
perPage: 50,
});

console.log(data);
})();

get_dota2_matches_matchIdOrSlug_games

List games for a given Dota 2 match

  • HTTP Method: GET
  • Endpoint: /dota2/matches/{match_id_or_slug}/games

Parameters

NameTypeRequiredDescription
matchIdOrSlugMatchIdOrSlugA match ID or slug
filterFilterOverDota2GamesOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverDota2GamesOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverDota2GamesOptions to search results
For more information on searching, see docs.
pagePagePagination in the form of page=2 or page[size]=30&page[number]=2
perPagenumberEquivalent to page[size]

Return Type

Dota2Game[]

Example Usage Code Snippet

import { FilterOverDota2Games, GameStatus, MatchIdOrSlug, OpponentType, Page, PandascoreClient, RangeOverDota2Games, SearchOverDota2Games } from 'pandascore_client';

(async () => {
const pandascoreClient = new PandascoreClient({
token: 'YOUR_TOKEN'});

const matchIdOrSlug = 5;
const gameStatus = GameStatus.FINISHED;

const opponentType = OpponentType.PLAYER;

const filterOverDota2Games: FilterOverDota2Games = {
beginAt: ["ad"],
complete: true,
detailedStats: true,
endAt: ["laboris "],
finished: true,
firstBlood: [7],
forfeit: true,
id: [5],
length: [2],
matchId: [10],
position: [2],
status: [gameStatus],
winnerType: [opponentType]
};
const gameStatus1 = GameStatus.FINISHED;

const opponentType1 = OpponentType.PLAYER;

const rangeOverDota2Games: RangeOverDota2Games = {
beginAt: ["Ut"],
complete: [true],
detailedStats: [true],
endAt: ["cillum"],
finished: [true],
firstBlood: [6],
forfeit: [true],
id: [4],
length: [9],
matchId: [2],
position: [1],
status: [gameStatus1],
winnerType: [opponentType1]
};
const gameStatus12 = GameStatus.FINISHED;

const opponentType12 = OpponentType.PLAYER;

const searchOverDota2Games: SearchOverDota2Games = {
status: gameStatus12,
winnerType: opponentType12
};
const page = 1;

const { data } = await pandascoreClient.dota2Games.getDota2MatchesMatchIdOrSlugGames(
,
{
filter: filterOverDota2Games,
range: rangeOverDota2Games,
sort: [[]],
search: searchOverDota2Games,
page: page,
perPage: 50,
}
);

console.log(data);
})();

get_dota2_teams_teamIdOrSlug_games

List finished games for a given Dota 2 team

  • HTTP Method: GET
  • Endpoint: /dota2/teams/{team_id_or_slug}/games

Parameters

NameTypeRequiredDescription
teamIdOrSlugTeamIdOrSlugA team ID or slug
pagePagePagination in the form of page=2 or page[size]=30&page[number]=2
perPagenumberEquivalent to page[size]

Return Type

BaseDota2Game[]

Example Usage Code Snippet

import { Page, PandascoreClient, TeamIdOrSlug } from 'pandascore_client';

(async () => {
const pandascoreClient = new PandascoreClient({
token: 'YOUR_TOKEN'});

const teamIdOrSlug = 10;
const page = 1;

const { data } = await pandascoreClient.dota2Games.getDota2TeamsTeamIdOrSlugGames(
,
{
page: page,
perPage: 50,
}
);

console.log(data);
})();

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →