| 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**](AirportsApi.md#airportscontrollergetairportsv1) | **GET** /v1/airports | Get all airports |
| 13 | |
| 14 | |
| 15 | # **airportsControllerGetAirportsV1** |
| 16 | > BuiltList<AirportEntity> airportsControllerGetAirportsV1(search) |
| 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().getAirportsApi(); |
| 27 | final String search = VIDP; // String | Search query for airport. Can be iata, ident(icao), name or a part of any these. Searching is case insensitive |
| 28 | |
| 29 | try { |
| 30 | final response = api.airportsControllerGetAirportsV1(search); |
| 31 | print(response); |
| 32 | } catch on DioException (e) { |
| 33 | print('Exception when calling AirportsApi->airportsControllerGetAirportsV1: $e\n'); |
| 34 | } |
| 35 | ``` |
| 36 | |
| 37 | ### Parameters |
| 38 | |
| 39 | Name | Type | Description | Notes |
| 40 | ------------- | ------------- | ------------- | ------------- |
| 41 | **search** | **String**| Search query for airport. Can be iata, ident(icao), name or a part of any these. Searching is case insensitive | [optional] |
| 42 | |
| 43 | ### Return type |
| 44 | |
| 45 | [**BuiltList<AirportEntity>**](AirportEntity.md) |
| 46 | |
| 47 | ### Authorization |
| 48 | |
| 49 | No authorization required |
| 50 | |
| 51 | ### HTTP request headers |
| 52 | |
| 53 | - **Content-Type**: Not defined |
| 54 | - **Accept**: application/json |
| 55 | |
| 56 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 57 | |