matching API andpoints
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user