checkpoint5b44ca05 months ago57 lines · 1.7 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 | [**airportsControllerGetAirportsV1**]( |
| 13 | |
| 14 | |
| 15 | # **airportsControllerGetAirportsV1 |
| 16 | > BuiltList<AirportEntity |
| 17 | |
| 18 | Get all airports |
| 19 | |
| 20 | Get all airports. We do not recommend using this route without any search query. This route has over 20k records |
| 21 | |
| 22 | ### Example |
| 23 | ```dart |
| 24 | import 'package:openapi/api.dart'; |
| 25 | |
| 26 | final api = Openapi(). |
| 27 | final String search = VIDP |
| 28 | |
| 29 | try { |
| 30 | final response = api.airportsControllerGetAirportsV1 |
| 31 | print(response); |
| 32 | } on DioException catch (e) { |
| 33 | print('Exception when calling AirportsApi->airportsControllerGetAirportsV1: $e\n |
| 34 | } |
| 35 | ``` |
| 36 | |
| 37 | ### Parameters |
| 38 | |
| 39 | Name | Type | Description | Notes |
| 40 | ------------- | ------------- | ------------- | ------------- |
| 41 | **search** | ** |
| 42 | |
| 43 | ### Return type |
| 44 | |
| 45 | [**BuiltList<AirportEntity>**]( |
| 46 | |
| 47 | ### Authorization |
| 48 | |
| 49 | No authorization required |
| 50 | |
| 51 | ### HTTP request headers |
| 52 | |
| 53 | - **Content-Type** |
| 54 | - **Accept** |
| 55 | |
| 56 | [[Back to top]](#) |
| 57 | |
AirportsApi.md#airportscontrollergetairportsv1
)
|
**
GET
**
/v1/airports | Get all airports
**
>
airportsControllerGetAirportsV1(search)
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
)