OwHeroesService
A list of all methods in the OwHeroesService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
get_ow_heroes | List heroes |
get_ow_heroes_owHeroIdOrSlug | Get a single hero by ID or by slug |
get_ow_heroes
List heroes
- HTTP Method:
GET
- Endpoint:
/ow/heroes
Parameters
Name | Type | Required | Description |
---|---|---|---|
filter | FilterOverOwHeroes | ❌ | Options to filter results. String fields are case sensitive For more information on filtering, see docs. |
range | RangeOverOwHeroes | ❌ | Options to select results within ranges For more information on ranges, see docs. |
sort | any[] | ❌ | Options to sort results For more information on sorting, see docs. |
search | SearchOverOwHeroes | ❌ | Options to search results For more information on searching, see docs. |
page | Page | ❌ | Pagination in the form of page=2 or page[size]=30&page[number]=2 |
perPage | number | ❌ | Equivalent to page[size] |
Return Type
OwHero[]
Example Usage Code Snippet
import {
FilterOverOwHeroes,
OwHeroRole,
Page,
PandascoreClient,
RangeOverOwHeroes,
SearchOverOwHeroes,
} from 'pandascore_client';
(async () => {
const pandascoreClient = new PandascoreClient({
token: 'YOUR_TOKEN',
});
const owHeroRole = OwHeroRole.DAMAGE;
const filterOverOwHeroes: FilterOverOwHeroes = {
difficulty: [9],
id: [9],
name: ['deserunt ex '],
realName: ['cupidat'],
role: [owHeroRole],
slug: ['zv5jss750'],
};
const owHeroRole1 = OwHeroRole.DAMAGE;
const rangeOverOwHeroes: RangeOverOwHeroes = {
difficulty: [3],
id: [2],
name: ['minim sunt e'],
realName: ['sit e'],
role: [owHeroRole1],
slug: ['78i6qbl8zdp'],
};
const owHeroRole12 = OwHeroRole.DAMAGE;
const searchOverOwHeroes: SearchOverOwHeroes = {
name: 'officia',
realName: 'fugiat in off',
role: owHeroRole12,
slug: '1xp0s5w9_jk',
};
const page = 1;
const { data } = await pandascoreClient.owHeroes.getOwHeroes({
filter: filterOverOwHeroes,
range: rangeOverOwHeroes,
sort: [[]],
search: searchOverOwHeroes,
page: page,
perPage: 50,
});
console.log(data);
})();
get_ow_heroes_owHeroIdOrSlug
Get a single hero by ID or by slug
- HTTP Method:
GET
- Endpoint:
/ow/heroes/{ow_hero_id_or_slug}
Parameters
Name | Type | Required | Description |
---|---|---|---|
owHeroIdOrSlug | OwHeroIdOrSlug | ✅ | A hero ID or slug |
Return Type
OwHero
Example Usage Code Snippet
import { OwHeroIdOrSlug, PandascoreClient } from 'pandascore_client';
(async () => {
const pandascoreClient = new PandascoreClient({
token: 'YOUR_TOKEN',
});
const owHeroIdOrSlug = 2;
const { data } = await pandascoreClient.owHeroes.getOwHeroesOwHeroIdOrSlug();
console.log(data);
})();
Build Your Own SDKs with liblab
Build developer friendly SDKs in minutes from your APIs