public class FlightDelay
extends java.lang.Object
A namespaced client for the
/v1/travel/predictions/flight-delay endpoints.
Access via the Amadeus client object.
Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
amadeus.travel.predictions.flightDelay;| Constructor and Description |
|---|
FlightDelay(Amadeus client)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Prediction[] |
get()
Convenience method for calling
get without any parameters. |
Prediction[] |
get(Params params)
Predicts delay of a given flight.
|
public FlightDelay(Amadeus client)
public Prediction[] get(Params params) throws ResponseException
Predicts delay of a given flight.
Delay[] flightDelay = amadeus.travel.predictions.flightDelay.get(Params
.with("originLocationCode", "NCE")
.and("destinationLocationCode", "IST")
.and("departureDate", "2020-08-01")
.and("departureTime", "18:20:00"))
.and("arrivalDate", "2020-08-01")
.and("arrivalTime", "22:15:00")
.and("aircraftCode", "321"))
.and("carrierCode", "TK")
.and("flightNumber", "1816")
.and("duration", "PT31H10M"));
params - the parameters to send to the APIResponseException - when an exception occurspublic Prediction[] get() throws ResponseException
get without any parameters.ResponseExceptionget()