formula1.js
Version:
Formula 1 Ergast API Wrapper
44 lines (43 loc) • 1.16 kB
TypeScript
import { datet, loosegp, loosegpcircuit, session, sessionType, year } from '../../Types';
export declare class Schedule {
constructor(year: year);
pop(): Promise<Schedule>;
private year;
initialized: boolean;
season: number;
rounds: GrandPrix[];
getAllSessions(): Session[];
findNextSession(): Session;
findLastSession(): Session;
}
export declare class GrandPrix {
constructor(schedule: Schedule, data: loosegp);
name: string;
round: number;
season: number;
schedule: Schedule;
sprintWeekend: boolean;
circuit: Circuit;
sessions: Session[];
getSession(id: session): Session;
}
export declare class Session {
constructor(grandprix: GrandPrix, data: datet, name: session, type: sessionType);
name: session;
grandprix: GrandPrix;
date: Date;
completed: boolean;
type: sessionType;
}
export declare class Circuit {
constructor(grandprix: GrandPrix, data: loosegpcircuit);
grandprix: GrandPrix;
name: string;
id: string;
location: {
latitude: number;
longitude: number;
locality: string;
country: string;
};
}