getFlightDatesWithHttpInfo method

Future<Response> getFlightDatesWithHttpInfo(
  1. FlightSearchByEnum searchBy,
  2. String searchParam, {
  3. DateTime? fromLocal,
  4. DateTime? toLocal,
})

Flight departure dates TIER 2

On which days the flight operates? or What is the flight schedule? Flight can be searched by: * flight number it's being operated under; or * ATC-callsign it's being operated under; or * tail-number of the aircraft it's being operated by; or * Mode-S 24-bit ICAO Transponder address of the aircraft it's being operated by. Returns: Array of local departure dates in (YYYY-MM-DD) format for flights operated under speified call-sign and within the time range specified.

Note: This method returns the HTTP Response.

Parameters:

  • FlightSearchByEnum searchBy (required): Criteria to search flight by

  • String searchParam (required): Value of the search criteria. If searchBy is: * number, then this field shoud be Flight number (with or without spaces, IATA or ICAO, any case formats are acceptable, e.g. KL1395, Klm 1395) * callsign, then this field should be ATC call-sign of the flight (with or without spaces, any case formats are acceptable, e.g.AFL1482, nca 008X); * reg: then this field should be Aircraft tail-number (with or without spaces or dashes, any case formats are acceptable, e.g.PH-BXO, DeMhJ); * icao24, then this field should be Aircraft ICAO 24-bit Mode-S address specified in hexadecimal format (e.g. 484161, 483EFD).

  • DateTime fromLocal: Beginning of the search range (local time, format: YYYY-MM-DD)

  • DateTime toLocal: End of the search range (local time, format: YYYY-MM-DD)

Implementation

Future<Response> getFlightDatesWithHttpInfo(
  FlightSearchByEnum searchBy,
  String searchParam, {
  DateTime? fromLocal,
  DateTime? toLocal,
}) async {
  // ignore: prefer_const_declarations
  final path =
      r'/flights/{searchBy}/{searchParam}/dates/{fromLocal}/{toLocal}'
          .replaceAll('{searchBy}', searchBy.toString())
          .replaceAll('{searchParam}', searchParam)
          .replaceAll('{fromLocal}', fromLocal.toString())
          .replaceAll('{toLocal}', toLocal.toString());

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}