raw_request method
Create a HTTP request. The function will return JSON data as Map if successful.
Implementation
Future<Map<String, dynamic>> raw_request({
List<Hourly>? hourly,
List<Current>? current,
}) =>
sendHttpRequest(apiUrl, 'air-quality', {
'hourly': hourly?.map((option) => option.name).join(","),
'current': current?.map((option) => option.name).join(","),
'domains': domains?.name,
'past_days': past_days,
'forecast_days': forecast_days,
'forecast_hours': forecast_hours,
'past_hours': past_hours,
'start_date': formatDate(start_date),
'end_date': formatDate(end_date),
'start_hour': formatTime(start_hour),
'end_hour': formatTime(end_hour),
'call_selection': cell_selection?.name,
'apikey': apikey,
'latitude': latitude,
'longitude': longitude,
'timeformat': 'unixtime',
'timezone': 'auto',
});