uefa-api
Version:
Typescript bindings and utils for the UEFA APIs
28 lines (27 loc) • 1.1 kB
TypeScript
import type { Team } from '../api';
interface FilterCriteria {
competitionId?: string | number;
roundIds?: string | number | (string | number)[];
teamIds?: string | number | (string | number)[];
associationId?: string | number;
seasonYear?: string | number;
}
/**
* Get team details based on filter criteria
* The API response is paginated by a limit and offset, except when filtering by team ids
*
* @param filter The criteria to filter teams by (competition id, round ids, team ids, association id, season year)
* @param limit Maximum number of teams to return
* @param offset Number of teams to skip
* @returns Promise resolving to an array of teams
*/
export declare const getTeams: (filter: FilterCriteria, limit?: number, offset?: number) => Promise<Team[]>;
/**
* Get team details based on team id
*
* @param teamId The id of the team to get details for
* @returns Promise resolving to a team
* @throws Error if no team is found for the provided id
*/
export declare const getTeam: (teamId: number | string) => Promise<Team>;
export {};