Skip to main content

Dota2HeroesService

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

MethodsDescription
get_dota2_heroesList heroes
get_dota2_heroes_dota2HeroIdOrSlugGet a single hero by ID or by slug

get_dota2_heroes

List heroes

  • HTTP Method: GET
  • Endpoint: /dota2/heroes

Parameters

NameTypeRequiredDescription
filterFilterOverDota2HeroesOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverDota2HeroesOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverDota2HeroesOptions 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

Dota2Hero[]

Example Usage Code Snippet

import {
FilterOverDota2Heroes,
Page,
PandascoreClient,
RangeOverDota2Heroes,
SearchOverDota2Heroes,
} from 'pandascore_client';

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

const filterOverDota2Heroes: FilterOverDota2Heroes = {
id: [2],
localizedName: ['et do'],
name: ['-rmn'],
};

const rangeOverDota2Heroes: RangeOverDota2Heroes = {
id: [6],
localizedName: ['id pariatu'],
name: ['5'],
};

const searchOverDota2Heroes: SearchOverDota2Heroes = {
localizedName: 'consectetur',
name: '4mqbolw_x',
};
const page = 1;

const { data } = await pandascoreClient.dota2Heroes.getDota2Heroes({
filter: filterOverDota2Heroes,
range: rangeOverDota2Heroes,
sort: [[]],
search: searchOverDota2Heroes,
page: page,
perPage: 50,
});

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

get_dota2_heroes_dota2HeroIdOrSlug

Get a single hero by ID or by slug

  • HTTP Method: GET
  • Endpoint: /dota2/heroes/{dota2_hero_id_or_slug}

Parameters

NameTypeRequiredDescription
dota2HeroIdOrSlugDota2HeroIdOrSlugA hero ID or slug

Return Type

Dota2Hero

Example Usage Code Snippet

import { Dota2HeroIdOrSlug, PandascoreClient } from 'pandascore_client';

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

const dota2HeroIdOrSlug = 9;

const { data } = await pandascoreClient.dota2Heroes.getDota2HeroesDota2HeroIdOrSlug();

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

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →