add airport info 75d04954 months ago 151 lines · 5.1 KB 1 # openapi.api.AirportsApi 2 3 ## Load the API package 4 ``` dart 5 import 'package:openapi/api.dart' ; 6 ``` 7 8 All URIs are relative to * http://localhost * 9 10 Method | HTTP request | Description 11 ------------- | ------------- | ------------- 12 [ ** airportsControllerGetAirportDetailsV1 ** ] ( 13 [ ** airportsControllerGetAirportsInBoundsV1 ** ] ( 14 [ ** airportsControllerGetAirportsV1 ** ] ( 15 16 17 # ** airportsControllerGetAirportDetailsV1 18 > AirportDetailsEntity airportsControllerGetAirportDetailsV1(ident) 19 20 Get detailed live information for an airport 21 22 Aggregates current delays plus the latest METAR observation and TAF forecast (raw + decoded) for the given airport identifier (ICAO/IATA). Each source is best-effort; missing data is returned as null. 23 24 ### Example 25 ``` dart 26 import 'package:openapi/api.dart' ; 27 28 final api = Openapi () . 29 final String ident = VIDP 30 31 try { 32 final response = api . airportsControllerGetAirportDetailsV1 33 print (response) ; 34 } on DioException catch (e) { 35 print ( 'Exception when calling AirportsApi->airportsControllerGetAirportDetailsV1: $ e \n 36 } 37 ``` 38 39 ### Parameters 40 41 Name | Type | Description | Notes 42 ------------- | ------------- | ------------- | ------------- 43 ** ident ** | ** 44 45 ### Return type 46 47 [ ** AirportDetailsEntity ** ] ( 48 49 ### Authorization 50 51 No authorization required 52 53 ### HTTP request headers 54 55 - ** Content-Type ** 56 - ** Accept ** 57 58 [ [Back to top] ] ( # ) 59 60 # ** airportsControllerGetAirportsInBoundsV1 61 > BuiltList<AirportEntity> airportsControllerGetAirportsInBoundsV1(minLat, maxLat, minLng, maxLng) 62 63 Get airports within geographic bounds 64 65 Returns airports whose coordinates fall inside the given bounding box. Restricted to non-closed airports with an IATA code, prioritized by size and capped at 200 results. Intended for plotting airports on a map as the user pans at a sufficient zoom level. 66 67 ### Example 68 ``` dart 69 import 'package:openapi/api.dart' ; 70 71 final api = Openapi () . 72 final num minLat = 28 73 final num maxLat = 29 74 final num minLng = 76 75 final num maxLng = 77 76 77 try { 78 final response = api . airportsControllerGetAirportsInBoundsV1 79 print (response) ; 80 } on DioException catch (e) { 81 print ( 'Exception when calling AirportsApi->airportsControllerGetAirportsInBoundsV1: $ e \n 82 } 83 ``` 84 85 ### Parameters 86 87 Name | Type | Description | Notes 88 ------------- | ------------- | ------------- | ------------- 89 ** minLat ** | ** 90 ** maxLat ** | ** 91 ** minLng ** | ** 92 ** maxLng ** | ** 93 94 ### Return type 95 96 [ ** BuiltList<AirportEntity> ** ] ( 97 98 ### Authorization 99 100 No authorization required 101 102 ### HTTP request headers 103 104 - ** Content-Type ** 105 - ** Accept ** 106 107 [ [Back to top] ] ( # ) 108 109 # ** airportsControllerGetAirportsV1 110 > BuiltList<AirportEntity> airportsControllerGetAirportsV1(search) 111 112 Get all airports 113 114 Get all airports. We do not recommend using this route without any search query. This route has over 20k records 115 116 ### Example 117 ``` dart 118 import 'package:openapi/api.dart' ; 119 120 final api = Openapi () . 121 final String search = VIDP 122 123 try { 124 final response = api . airportsControllerGetAirportsV1 125 print (response) ; 126 } on DioException catch (e) { 127 print ( 'Exception when calling AirportsApi->airportsControllerGetAirportsV1: $ e \n 128 } 129 ``` 130 131 ### Parameters 132 133 Name | Type | Description | Notes 134 ------------- | ------------- | ------------- | ------------- 135 ** search ** | ** 136 137 ### Return type 138 139 [ ** BuiltList<AirportEntity> ** ] ( 140 141 ### Authorization 142 143 No authorization required 144 145 ### HTTP request headers 146 147 - ** Content-Type ** 148 - ** Accept ** 149 150 [ [Back to top] ] ( # ) 151
AirportsApi.md#airportscontrollergetairportdetailsv1
)
|
**
GET
**
/v1/airports/{ident}/details | Get detailed live information for an airport
AirportsApi.md#airportscontrollergetairportsinboundsv1
)
|
**
GET
**
/v1/airports/bounds | Get airports within geographic bounds
AirportsApi.md#airportscontrollergetairportsv1
)
|
**
GET
**
/v1/airports | Get all airports
**
getAirportsApi
()
;
;
// String | Airport identifier (ICAO preferred, IATA accepted)
(ident)
;
'
)
;
String
**
| Airport identifier (ICAO preferred, IATA accepted) |
AirportDetailsEntity.md
)
: Not defined
: application/json
[
[Back to API list]
]
(
../README.md#documentation-for-api-endpoints
)
[
[Back to Model list]
]
(
../README.md#documentation-for-models
)
[
[Back to README]
]
(
../README.md
)
**
getAirportsApi
()
;
;
// num | Minimum latitude of the bounding box
;
// num | Maximum latitude of the bounding box
;
// num | Minimum longitude of the bounding box
;
// num | Maximum longitude of the bounding box
(minLat
,
maxLat
,
minLng
,
maxLng)
;
'
)
;
num
**
| Minimum latitude of the bounding box |
num
**
| Maximum latitude of the bounding box |
num
**
| Minimum longitude of the bounding box |
num
**
| Maximum longitude of the bounding box |
AirportEntity.md
)
: Not defined
: application/json
[
[Back to API list]
]
(
../README.md#documentation-for-api-endpoints
)
[
[Back to Model list]
]
(
../README.md#documentation-for-models
)
[
[Back to README]
]
(
../README.md
)
**
getAirportsApi
()
;
;
// String | Search query for airport. Can be iata, ident(icao), name or a part of any these. Searching is case insensitive
(search)
;
'
)
;
String
**
| Search query for airport. Can be iata, ident(icao), name or a part of any these. Searching is case insensitive |
[
optional
]
AirportEntity.md
)
: Not defined
: application/json
[
[Back to API list]
]
(
../README.md#documentation-for-api-endpoints
)
[
[Back to Model list]
]
(
../README.md#documentation-for-models
)
[
[Back to README]
]
(
../README.md
)