matching API andpoints

This commit is contained in:
2025-09-25 21:10:11 +02:00
parent 048a1f06d6
commit 4cd422a993
5 changed files with 26 additions and 67 deletions

View File

@@ -83,15 +83,6 @@ export class Calco2latoClient {
return items.map(a => new Airport(a));
}
/** @returns {Promise<Airport>} */
async getAirport(code) {
const data = await this._fetchJSON({
method: 'GET',
query: { endpoint: 'airports.get', code }
});
return new Airport(data);
}
// ---------- Flights ----------
/**
@@ -105,13 +96,4 @@ export class Calco2latoClient {
});
return new Flight(data);
}
/** @returns {Promise<Flight>} */
async getFlight(id) {
const data = await this._fetchJSON({
method: 'GET',
query: { endpoint: 'flights.get', id }
});
return new Flight(data);
}
}