Skip to main content

LeaguesService

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

MethodsDescription
get_leaguesList leagues
get_leagues_leagueIdOrSlugGet a single league by ID or by slug
get_leagues_leagueIdOrSlug_matchesList matches of the given league
get_leagues_leagueIdOrSlug_matches_pastList past matches for the given league
get_leagues_leagueIdOrSlug_matches_runningList currently running matches for the given league
get_leagues_leagueIdOrSlug_matches_upcomingList upcoming matches for the given league
get_leagues_leagueIdOrSlug_seriesList series for the given league
get_leagues_leagueIdOrSlug_tournamentsList tournaments of the given league

get_leagues

List leagues

  • HTTP Method: GET
  • Endpoint: /leagues

Parameters

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

League[]

Example Usage Code Snippet

import { FilterOverLeagues, Page, PandascoreClient, RangeOverLeagues, SearchOverLeagues } from 'pandascore_client';

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

const filterOverLeagues: FilterOverLeagues = {
id: [7],
modifiedAt: ['offici'],
name: ['ad ut'],
slug: ['p_'],
url: ['esse aliqu'],
};

const rangeOverLeagues: RangeOverLeagues = {
id: [10],
modifiedAt: ['ut nulla'],
name: ['ea mol'],
slug: ['pmjvmw-84d'],
url: ['ea aliquip'],
};

const searchOverLeagues: SearchOverLeagues = {
name: 'Duis dolo',
slug: '-teig',
url: 'adipisicing',
};
const page = 1;

const { data } = await pandascoreClient.leagues.getLeagues({
filter: filterOverLeagues,
range: rangeOverLeagues,
sort: [[]],
search: searchOverLeagues,
page: page,
perPage: 50,
});

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

get_leagues_leagueIdOrSlug

Get a single league by ID or by slug

  • HTTP Method: GET
  • Endpoint: /leagues/{league_id_or_slug}

Parameters

NameTypeRequiredDescription
leagueIdOrSlugLeagueIdOrSlugA league ID or slug

Return Type

League

Example Usage Code Snippet

import { LeagueIdOrSlug, PandascoreClient } from 'pandascore_client';

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

const leagueIdOrSlug = 7;

const { data } = await pandascoreClient.leagues.getLeaguesLeagueIdOrSlug();

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

get_leagues_leagueIdOrSlug_matches

List matches of the given league

  • HTTP Method: GET
  • Endpoint: /leagues/{league_id_or_slug}/matches

Parameters

NameTypeRequiredDescription
leagueIdOrSlugLeagueIdOrSlugA league ID or slug
filterFilterOverMatchesOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverMatchesOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverMatchesOptions 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

Match[]

Example Usage Code Snippet

import { FilterOverMatches, LeagueIdOrSlug, MatchStatus, MatchType, MatchWinnerType, Page, PandascoreClient, RangeOverMatches, SearchOverMatches } from 'pandascore_client';

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

const leagueIdOrSlug = 7;
const matchType = MatchType.ALLGAMESPLAYED;

const teamIdOrSlug = 10;;

const matchStatus = MatchStatus.CANCELED;

const videogameId = VideogameId._1;;

const filterOverMatchesVideogameTitle = 6;

const filterOverMatchesVideogameVersion = "1125897835.45";

const opponentId = 7;

const matchWinnerType = MatchWinnerType.PLAYER;

const filterOverMatches: FilterOverMatches = {
beginAt: ["ani"],
detailedStats: true,
draw: true,
endAt: ["ad ut com"],
finished: true,
forfeit: true,
future: true,
id: [3],
leagueId: [9],
matchType: [matchType],
modifiedAt: ["aute sit"],
name: ["exercitation te"],
notStarted: true,
numberOfGames: [8],
opponentId: [filterOverMatchesOpponentId],
opponentsFilled: true,
past: true,
running: true,
scheduledAt: ["esse aute n"],
serieId: [10],
slug: ["HiGqjR9"],
status: [matchStatus],
tournamentId: [3],
unscheduled: true,
videogame: [videogameIdOrSlug],
videogameTitle: [filterOverMatchesVideogameTitle],
videogameVersion: [filterOverMatchesVideogameVersion],
winnerId: [opponentId],
winnerType: [matchWinnerType]
};
const matchType1 = MatchType.ALLGAMESPLAYED;

const matchStatus1 = MatchStatus.CANCELED;

const opponentId1 = 7;

const matchWinnerType1 = MatchWinnerType.PLAYER;

const rangeOverMatches: RangeOverMatches = {
beginAt: ["al"],
detailedStats: [true],
draw: [true],
endAt: ["do d"],
forfeit: [true],
id: [6],
matchType: [matchType1],
modifiedAt: ["dolore ve"],
name: ["dolore "],
numberOfGames: [10],
scheduledAt: ["nisi sed aut"],
slug: ["bAjOZ"],
status: [matchStatus1],
tournamentId: [3],
winnerId: [opponentId1],
winnerType: [matchWinnerType1]
};
const matchType12 = MatchType.ALLGAMESPLAYED;

const matchStatus12 = MatchStatus.CANCELED;

const matchWinnerType12 = MatchWinnerType.PLAYER;

const searchOverMatches: SearchOverMatches = {
matchType: matchType12,
name: "nulla veniam ",
slug: "WfL1ZPQ",
status: matchStatus12,
winnerType: matchWinnerType12
};
const page = 1;

const { data } = await pandascoreClient.leagues.getLeaguesLeagueIdOrSlugMatches(
,
{
filter: filterOverMatches,
range: rangeOverMatches,
sort: [[]],
search: searchOverMatches,
page: page,
perPage: 50,
}
);

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

get_leagues_leagueIdOrSlug_matches_past

List past matches for the given league

  • HTTP Method: GET
  • Endpoint: /leagues/{league_id_or_slug}/matches/past

Parameters

NameTypeRequiredDescription
leagueIdOrSlugLeagueIdOrSlugA league ID or slug
filterFilterOverMatchesOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverMatchesOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverMatchesOptions 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

Match[]

Example Usage Code Snippet

import { FilterOverMatches, LeagueIdOrSlug, MatchStatus, MatchType, MatchWinnerType, Page, PandascoreClient, RangeOverMatches, SearchOverMatches } from 'pandascore_client';

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

const leagueIdOrSlug = 7;
const matchType = MatchType.ALLGAMESPLAYED;

const teamIdOrSlug = 10;;

const matchStatus = MatchStatus.CANCELED;

const videogameId = VideogameId._1;;

const filterOverMatchesVideogameTitle = 6;

const filterOverMatchesVideogameVersion = "1125897835.45";

const opponentId = 7;

const matchWinnerType = MatchWinnerType.PLAYER;

const filterOverMatches: FilterOverMatches = {
beginAt: ["ani"],
detailedStats: true,
draw: true,
endAt: ["ad ut com"],
finished: true,
forfeit: true,
future: true,
id: [3],
leagueId: [9],
matchType: [matchType],
modifiedAt: ["aute sit"],
name: ["exercitation te"],
notStarted: true,
numberOfGames: [8],
opponentId: [filterOverMatchesOpponentId],
opponentsFilled: true,
past: true,
running: true,
scheduledAt: ["esse aute n"],
serieId: [10],
slug: ["HiGqjR9"],
status: [matchStatus],
tournamentId: [3],
unscheduled: true,
videogame: [videogameIdOrSlug],
videogameTitle: [filterOverMatchesVideogameTitle],
videogameVersion: [filterOverMatchesVideogameVersion],
winnerId: [opponentId],
winnerType: [matchWinnerType]
};
const matchType1 = MatchType.ALLGAMESPLAYED;

const matchStatus1 = MatchStatus.CANCELED;

const opponentId1 = 7;

const matchWinnerType1 = MatchWinnerType.PLAYER;

const rangeOverMatches: RangeOverMatches = {
beginAt: ["al"],
detailedStats: [true],
draw: [true],
endAt: ["do d"],
forfeit: [true],
id: [6],
matchType: [matchType1],
modifiedAt: ["dolore ve"],
name: ["dolore "],
numberOfGames: [10],
scheduledAt: ["nisi sed aut"],
slug: ["bAjOZ"],
status: [matchStatus1],
tournamentId: [3],
winnerId: [opponentId1],
winnerType: [matchWinnerType1]
};
const matchType12 = MatchType.ALLGAMESPLAYED;

const matchStatus12 = MatchStatus.CANCELED;

const matchWinnerType12 = MatchWinnerType.PLAYER;

const searchOverMatches: SearchOverMatches = {
matchType: matchType12,
name: "nulla veniam ",
slug: "WfL1ZPQ",
status: matchStatus12,
winnerType: matchWinnerType12
};
const page = 1;

const { data } = await pandascoreClient.leagues.getLeaguesLeagueIdOrSlugMatchesPast(
,
{
filter: filterOverMatches,
range: rangeOverMatches,
sort: [[]],
search: searchOverMatches,
page: page,
perPage: 50,
}
);

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

get_leagues_leagueIdOrSlug_matches_running

List currently running matches for the given league

  • HTTP Method: GET
  • Endpoint: /leagues/{league_id_or_slug}/matches/running

Parameters

NameTypeRequiredDescription
leagueIdOrSlugLeagueIdOrSlugA league ID or slug
filterFilterOverMatchesOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverMatchesOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverMatchesOptions 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

Match[]

Example Usage Code Snippet

import { FilterOverMatches, LeagueIdOrSlug, MatchStatus, MatchType, MatchWinnerType, Page, PandascoreClient, RangeOverMatches, SearchOverMatches } from 'pandascore_client';

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

const leagueIdOrSlug = 7;
const matchType = MatchType.ALLGAMESPLAYED;

const teamIdOrSlug = 10;;

const matchStatus = MatchStatus.CANCELED;

const videogameId = VideogameId._1;;

const filterOverMatchesVideogameTitle = 6;

const filterOverMatchesVideogameVersion = "1125897835.45";

const opponentId = 7;

const matchWinnerType = MatchWinnerType.PLAYER;

const filterOverMatches: FilterOverMatches = {
beginAt: ["ani"],
detailedStats: true,
draw: true,
endAt: ["ad ut com"],
finished: true,
forfeit: true,
future: true,
id: [3],
leagueId: [9],
matchType: [matchType],
modifiedAt: ["aute sit"],
name: ["exercitation te"],
notStarted: true,
numberOfGames: [8],
opponentId: [filterOverMatchesOpponentId],
opponentsFilled: true,
past: true,
running: true,
scheduledAt: ["esse aute n"],
serieId: [10],
slug: ["HiGqjR9"],
status: [matchStatus],
tournamentId: [3],
unscheduled: true,
videogame: [videogameIdOrSlug],
videogameTitle: [filterOverMatchesVideogameTitle],
videogameVersion: [filterOverMatchesVideogameVersion],
winnerId: [opponentId],
winnerType: [matchWinnerType]
};
const matchType1 = MatchType.ALLGAMESPLAYED;

const matchStatus1 = MatchStatus.CANCELED;

const opponentId1 = 7;

const matchWinnerType1 = MatchWinnerType.PLAYER;

const rangeOverMatches: RangeOverMatches = {
beginAt: ["al"],
detailedStats: [true],
draw: [true],
endAt: ["do d"],
forfeit: [true],
id: [6],
matchType: [matchType1],
modifiedAt: ["dolore ve"],
name: ["dolore "],
numberOfGames: [10],
scheduledAt: ["nisi sed aut"],
slug: ["bAjOZ"],
status: [matchStatus1],
tournamentId: [3],
winnerId: [opponentId1],
winnerType: [matchWinnerType1]
};
const matchType12 = MatchType.ALLGAMESPLAYED;

const matchStatus12 = MatchStatus.CANCELED;

const matchWinnerType12 = MatchWinnerType.PLAYER;

const searchOverMatches: SearchOverMatches = {
matchType: matchType12,
name: "nulla veniam ",
slug: "WfL1ZPQ",
status: matchStatus12,
winnerType: matchWinnerType12
};
const page = 1;

const { data } = await pandascoreClient.leagues.getLeaguesLeagueIdOrSlugMatchesRunning(
,
{
filter: filterOverMatches,
range: rangeOverMatches,
sort: [[]],
search: searchOverMatches,
page: page,
perPage: 50,
}
);

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

get_leagues_leagueIdOrSlug_matches_upcoming

List upcoming matches for the given league

  • HTTP Method: GET
  • Endpoint: /leagues/{league_id_or_slug}/matches/upcoming

Parameters

NameTypeRequiredDescription
leagueIdOrSlugLeagueIdOrSlugA league ID or slug
filterFilterOverMatchesOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverMatchesOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverMatchesOptions 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

Match[]

Example Usage Code Snippet

import { FilterOverMatches, LeagueIdOrSlug, MatchStatus, MatchType, MatchWinnerType, Page, PandascoreClient, RangeOverMatches, SearchOverMatches } from 'pandascore_client';

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

const leagueIdOrSlug = 7;
const matchType = MatchType.ALLGAMESPLAYED;

const teamIdOrSlug = 10;;

const matchStatus = MatchStatus.CANCELED;

const videogameId = VideogameId._1;;

const filterOverMatchesVideogameTitle = 6;

const filterOverMatchesVideogameVersion = "1125897835.45";

const opponentId = 7;

const matchWinnerType = MatchWinnerType.PLAYER;

const filterOverMatches: FilterOverMatches = {
beginAt: ["ani"],
detailedStats: true,
draw: true,
endAt: ["ad ut com"],
finished: true,
forfeit: true,
future: true,
id: [3],
leagueId: [9],
matchType: [matchType],
modifiedAt: ["aute sit"],
name: ["exercitation te"],
notStarted: true,
numberOfGames: [8],
opponentId: [filterOverMatchesOpponentId],
opponentsFilled: true,
past: true,
running: true,
scheduledAt: ["esse aute n"],
serieId: [10],
slug: ["HiGqjR9"],
status: [matchStatus],
tournamentId: [3],
unscheduled: true,
videogame: [videogameIdOrSlug],
videogameTitle: [filterOverMatchesVideogameTitle],
videogameVersion: [filterOverMatchesVideogameVersion],
winnerId: [opponentId],
winnerType: [matchWinnerType]
};
const matchType1 = MatchType.ALLGAMESPLAYED;

const matchStatus1 = MatchStatus.CANCELED;

const opponentId1 = 7;

const matchWinnerType1 = MatchWinnerType.PLAYER;

const rangeOverMatches: RangeOverMatches = {
beginAt: ["al"],
detailedStats: [true],
draw: [true],
endAt: ["do d"],
forfeit: [true],
id: [6],
matchType: [matchType1],
modifiedAt: ["dolore ve"],
name: ["dolore "],
numberOfGames: [10],
scheduledAt: ["nisi sed aut"],
slug: ["bAjOZ"],
status: [matchStatus1],
tournamentId: [3],
winnerId: [opponentId1],
winnerType: [matchWinnerType1]
};
const matchType12 = MatchType.ALLGAMESPLAYED;

const matchStatus12 = MatchStatus.CANCELED;

const matchWinnerType12 = MatchWinnerType.PLAYER;

const searchOverMatches: SearchOverMatches = {
matchType: matchType12,
name: "nulla veniam ",
slug: "WfL1ZPQ",
status: matchStatus12,
winnerType: matchWinnerType12
};
const page = 1;

const { data } = await pandascoreClient.leagues.getLeaguesLeagueIdOrSlugMatchesUpcoming(
,
{
filter: filterOverMatches,
range: rangeOverMatches,
sort: [[]],
search: searchOverMatches,
page: page,
perPage: 50,
}
);

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

get_leagues_leagueIdOrSlug_series

List series for the given league

  • HTTP Method: GET
  • Endpoint: /leagues/{league_id_or_slug}/series

Parameters

NameTypeRequiredDescription
leagueIdOrSlugLeagueIdOrSlugA league ID or slug
filterFilterOverSeriesOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverSeriesOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverSeriesOptions 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

Serie[]

Example Usage Code Snippet

import { FilterOverSeries, LeagueIdOrSlug, OpponentType, Page, PandascoreClient, RangeOverSeries, SearchOverSeries } from 'pandascore_client';

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

const leagueIdOrSlug = 7;
const filterOverSeriesVideogameTitle = 7;

const opponentId = 7;

const opponentType = OpponentType.PLAYER;

const filterOverSeries: FilterOverSeries = {
beginAt: ["sunt cillum dol"],
endAt: ["dolor"],
id: [5],
leagueId: [7],
modifiedAt: ["deserunt"],
name: ["laboris"],
season: ["proident"],
slug: ["_9"],
videogameTitle: [filterOverSeriesVideogameTitle],
winnerId: [opponentId],
winnerType: [opponentType],
year: [123]
};
const opponentId1 = 7;

const opponentType1 = OpponentType.PLAYER;

const rangeOverSeries: RangeOverSeries = {
beginAt: ["sint c"],
endAt: ["ex dolore tempo"],
id: [6],
leagueId: [6],
modifiedAt: ["lab"],
name: ["animea labore e"],
season: ["ipsum i"],
slug: ["8"],
winnerId: [opponentId1],
winnerType: [opponentType1],
year: [123]
};
const opponentType12 = OpponentType.PLAYER;

const searchOverSeries: SearchOverSeries = {
name: "fugia",
season: "aute al",
slug: "cc3u_",
winnerType: opponentType12
};
const page = 1;

const { data } = await pandascoreClient.leagues.getLeaguesLeagueIdOrSlugSeries(
,
{
filter: filterOverSeries,
range: rangeOverSeries,
sort: [[]],
search: searchOverSeries,
page: page,
perPage: 50,
}
);

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

get_leagues_leagueIdOrSlug_tournaments

List tournaments of the given league

  • HTTP Method: GET
  • Endpoint: /leagues/{league_id_or_slug}/tournaments

Parameters

NameTypeRequiredDescription
leagueIdOrSlugLeagueIdOrSlugA league ID or slug
filterFilterOverShortTournamentsOptions to filter results. String fields are case sensitive
For more information on filtering, see docs.
rangeRangeOverShortTournamentsOptions to select results within ranges
For more information on ranges, see docs.
sortany[]Options to sort results
For more information on sorting, see docs.
searchSearchOverShortTournamentsOptions 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

ShortTournament[]

Example Usage Code Snippet

import { FilterOverShortTournaments, LeagueIdOrSlug, OpponentType, Page, PandascoreClient, RangeOverShortTournaments, SearchOverShortTournaments, SearchOverValorantShortTournamentsTier2 } from 'pandascore_client';

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

const leagueIdOrSlug = 7;
const searchOverValorantShortTournamentsTier2 = SearchOverValorantShortTournamentsTier2.A;

const filterOverShortTournamentsVideogameTitle = 5;

const opponentId = 7;

const opponentType = OpponentType.PLAYER;

const filterOverShortTournaments: FilterOverShortTournaments = {
beginAt: ["pariat"],
detailedStats: true,
endAt: ["eli"],
hasBracket: true,
id: [4],
liveSupported: true,
modifiedAt: ["cillu"],
name: ["Excepteur do"],
prizepool: ["in ut veniam "],
serieId: [10],
slug: ["z160_"],
tier: [searchOverValorantShortTournamentsTier2],
videogameTitle: [filterOverShortTournamentsVideogameTitle],
winnerId: [opponentId],
winnerType: [opponentType]
};
const searchOverValorantShortTournamentsTier21 = SearchOverValorantShortTournamentsTier2.A;

const opponentId1 = 7;

const opponentType1 = OpponentType.PLAYER;

const rangeOverShortTournaments: RangeOverShortTournaments = {
beginAt: ["et"],
detailedStats: [true],
endAt: ["commo"],
hasBracket: [true],
id: [1],
modifiedAt: ["nul"],
name: ["enim "],
prizepool: ["qui ull"],
serieId: [3],
slug: ["vyokv"],
tier: [searchOverValorantShortTournamentsTier21],
winnerId: [opponentId1],
winnerType: [opponentType1]
};
const searchOverValorantShortTournamentsTier212 = SearchOverValorantShortTournamentsTier2.A;

const opponentType12 = OpponentType.PLAYER;

const searchOverShortTournaments: SearchOverShortTournaments = {
name: "sunt minim",
prizepool: "utid magna es",
slug: "50l9n",
tier: searchOverValorantShortTournamentsTier212,
winnerType: opponentType12
};
const page = 1;

const { data } = await pandascoreClient.leagues.getLeaguesLeagueIdOrSlugTournaments(
,
{
filter: filterOverShortTournaments,
range: rangeOverShortTournaments,
sort: [[]],
search: searchOverShortTournaments,
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 →