getAircraftRegistrationsWithHttpInfo method

Future<Response> getAircraftRegistrationsWithHttpInfo(
  1. AircraftSearchByEnum searchBy,
  2. String searchParam
)

Single aircraft registration history (by tail-number, Mode-S or ID) TIER 1

Returns: A list of all known registrations of a single aircraft, best matching specified search criteria, if found

Note: This method returns the HTTP Response.

Parameters:

  • AircraftSearchByEnum searchBy (required): Criteria to search aircraft by

  • String searchParam (required): Value of the search criteria. If searchBy is: * id, then this field should be an ID of an aircraft (as specified in the database of this API); * reg, then this field should be a tail-number of an aircraft (with or without spaces or dashes, any case formats are acceptable, e.g.PH-BXO, DeMhJ), multiple matches are possible - see below; * icao24, then this field should be a ICAO 24-bit Mode-S address of an aircraft specified in hexadecimal format (e.g. 484161, 483EFD), multiple matches are possible - see below. If multiple matches are possible: see similar remark to Single aircraft endpoint.

Implementation

Future<Response> getAircraftRegistrationsWithHttpInfo(
  AircraftSearchByEnum searchBy,
  String searchParam,
) async {
  // ignore: prefer_const_declarations
  final path = r'/aircrafts/{searchBy}/{searchParam}/registrations'
      .replaceAll('{searchBy}', searchBy.toString())
      .replaceAll('{searchParam}', searchParam);

  // 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,
  );
}