getAirportSolarTimeWithHttpInfo method
- AirportCodesByEnum codeType,
- String code, {
- DateTime? dateLocal,
Solar and day time at the airport TIER 1
What is the sun position in the sky now at a specific time at the airport? or When does the sun rise and set at the airport today or on the other day at the airport? or Is it dark now or is it day at the airport? At the moment airports having both ICAO and IATA code are present in database only. Returns: If airport is found, returns various solar-related information: sun position in the sky, daytime (day, night, twilight: civil, nautical, astronomical, golden/blue hours), sunrise and sunset times, etc.
Note: This method returns the HTTP Response.
Parameters:
-
AirportCodesByEnum codeType (required): Type of code to search airport by (
iataoricao) -
String code (required): If
codeTypeis: *icao, then this field must be a 4-character ICAO-code of the airport (e.g.: EHAM, KLAX, UUEE, etc.); *iata, then this field must be a 3-character IATA-code of the airport (e.g.: AMS, SFO, LAX, etc.). Full, stripped and any case formats are acceptable. -
DateTime dateLocal: The moment of time which solar data is request for (local time, format: YYYY-MM-DDTHH:mm). Default - current time.
Implementation
Future<Response> getAirportSolarTimeWithHttpInfo(
AirportCodesByEnum codeType,
String code, {
DateTime? dateLocal,
}) async {
// ignore: prefer_const_declarations
final path = r'/airports/{codeType}/{code}/time/solar/{dateLocal}'
.replaceAll('{codeType}', codeType.toString())
.replaceAll('{code}', code)
.replaceAll('{dateLocal}', dateLocal.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,
);
}