| 1 | # openapi.api.FlightsApi |
| 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 | [**flightsControllerGetAirlineV1**](FlightsApi.md#flightscontrollergetairlinev1) | **POST** /v1/flights/airline | Get airline |
| 13 | [**flightsControllerGetFlightsInBoundsV1**](FlightsApi.md#flightscontrollergetflightsinboundsv1) | **GET** /v1/flights/bounds | Get flights within geographic bounds(deprecated - will return nothing) |
| 14 | [**flightsControllerGetFlightsV1**](FlightsApi.md#flightscontrollergetflightsv1) | **GET** /v1/flights | Get flights between two airports |
| 15 | [**flightsControllerGetTrackedFlightsV1**](FlightsApi.md#flightscontrollergettrackedflightsv1) | **GET** /v1/flights/tracked | Get all tracked flights |
| 16 | |
| 17 | |
| 18 | # **flightsControllerGetAirlineV1** |
| 19 | > AirlineEntity flightsControllerGetAirlineV1(getAirlineDTO) |
| 20 | |
| 21 | Get airline |
| 22 | |
| 23 | Get airline with search query. This doesn't check if the number is correct |
| 24 | |
| 25 | ### Example |
| 26 | ```dart |
| 27 | import 'package:openapi/api.dart'; |
| 28 | |
| 29 | final api = Openapi().getFlightsApi(); |
| 30 | final GetAirlineDTO getAirlineDTO = ; // GetAirlineDTO | |
| 31 | |
| 32 | try { |
| 33 | final response = api.flightsControllerGetAirlineV1(getAirlineDTO); |
| 34 | print(response); |
| 35 | } catch on DioException (e) { |
| 36 | print('Exception when calling FlightsApi->flightsControllerGetAirlineV1: $e\n'); |
| 37 | } |
| 38 | ``` |
| 39 | |
| 40 | ### Parameters |
| 41 | |
| 42 | Name | Type | Description | Notes |
| 43 | ------------- | ------------- | ------------- | ------------- |
| 44 | **getAirlineDTO** | [**GetAirlineDTO**](GetAirlineDTO.md)| | |
| 45 | |
| 46 | ### Return type |
| 47 | |
| 48 | [**AirlineEntity**](AirlineEntity.md) |
| 49 | |
| 50 | ### Authorization |
| 51 | |
| 52 | [JWT-auth](../README.md#JWT-auth) |
| 53 | |
| 54 | ### HTTP request headers |
| 55 | |
| 56 | - **Content-Type**: application/json |
| 57 | - **Accept**: application/json |
| 58 | |
| 59 | [[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) |
| 60 | |
| 61 | # **flightsControllerGetFlightsInBoundsV1** |
| 62 | > FlightsControllerGetFlightsInBoundsV1200Response flightsControllerGetFlightsInBoundsV1(minLat, maxLat, minLng, maxLng) |
| 63 | |
| 64 | Get flights within geographic bounds(deprecated - will return nothing) |
| 65 | |
| 66 | Get all aircraft currently flying within a specified geographic bounding box using FlightAware data with comprehensive aircraft details |
| 67 | |
| 68 | ### Example |
| 69 | ```dart |
| 70 | import 'package:openapi/api.dart'; |
| 71 | |
| 72 | final api = Openapi().getFlightsApi(); |
| 73 | final num minLat = 40; // num | Minimum latitude of the bounding box |
| 74 | final num maxLat = 50; // num | Maximum latitude of the bounding box |
| 75 | final num minLng = -10; // num | Minimum longitude of the bounding box |
| 76 | final num maxLng = 10; // num | Maximum longitude of the bounding box |
| 77 | |
| 78 | try { |
| 79 | final response = api.flightsControllerGetFlightsInBoundsV1(minLat, maxLat, minLng, maxLng); |
| 80 | print(response); |
| 81 | } catch on DioException (e) { |
| 82 | print('Exception when calling FlightsApi->flightsControllerGetFlightsInBoundsV1: $e\n'); |
| 83 | } |
| 84 | ``` |
| 85 | |
| 86 | ### Parameters |
| 87 | |
| 88 | Name | Type | Description | Notes |
| 89 | ------------- | ------------- | ------------- | ------------- |
| 90 | **minLat** | **num**| Minimum latitude of the bounding box | |
| 91 | **maxLat** | **num**| Maximum latitude of the bounding box | |
| 92 | **minLng** | **num**| Minimum longitude of the bounding box | |
| 93 | **maxLng** | **num**| Maximum longitude of the bounding box | |
| 94 | |
| 95 | ### Return type |
| 96 | |
| 97 | [**FlightsControllerGetFlightsInBoundsV1200Response**](FlightsControllerGetFlightsInBoundsV1200Response.md) |
| 98 | |
| 99 | ### Authorization |
| 100 | |
| 101 | [JWT-auth](../README.md#JWT-auth) |
| 102 | |
| 103 | ### HTTP request headers |
| 104 | |
| 105 | - **Content-Type**: Not defined |
| 106 | - **Accept**: application/json |
| 107 | |
| 108 | [[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) |
| 109 | |
| 110 | # **flightsControllerGetFlightsV1** |
| 111 | > FlightsResponseEntity flightsControllerGetFlightsV1(from, to, date) |
| 112 | |
| 113 | Get flights between two airports |
| 114 | |
| 115 | Get all flights between two airports for a specific date |
| 116 | |
| 117 | ### Example |
| 118 | ```dart |
| 119 | import 'package:openapi/api.dart'; |
| 120 | |
| 121 | final api = Openapi().getFlightsApi(); |
| 122 | final String from = LAX; // String | Departure airport IATA code |
| 123 | final String to = JFK; // String | Arrival airport IATA code |
| 124 | final String date = 2024-03-20; // String | Flight date in ISO format |
| 125 | |
| 126 | try { |
| 127 | final response = api.flightsControllerGetFlightsV1(from, to, date); |
| 128 | print(response); |
| 129 | } catch on DioException (e) { |
| 130 | print('Exception when calling FlightsApi->flightsControllerGetFlightsV1: $e\n'); |
| 131 | } |
| 132 | ``` |
| 133 | |
| 134 | ### Parameters |
| 135 | |
| 136 | Name | Type | Description | Notes |
| 137 | ------------- | ------------- | ------------- | ------------- |
| 138 | **from** | **String**| Departure airport IATA code | |
| 139 | **to** | **String**| Arrival airport IATA code | |
| 140 | **date** | **String**| Flight date in ISO format | |
| 141 | |
| 142 | ### Return type |
| 143 | |
| 144 | [**FlightsResponseEntity**](FlightsResponseEntity.md) |
| 145 | |
| 146 | ### Authorization |
| 147 | |
| 148 | [JWT-auth](../README.md#JWT-auth) |
| 149 | |
| 150 | ### HTTP request headers |
| 151 | |
| 152 | - **Content-Type**: Not defined |
| 153 | - **Accept**: application/json |
| 154 | |
| 155 | [[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) |
| 156 | |
| 157 | # **flightsControllerGetTrackedFlightsV1** |
| 158 | > TrackedFlightsResponseEntity flightsControllerGetTrackedFlightsV1() |
| 159 | |
| 160 | Get all tracked flights |
| 161 | |
| 162 | Returns a list of all flights that have been tracked in the system, sorted by most recently created. Limited to 50 most recent flights. |
| 163 | |
| 164 | ### Example |
| 165 | ```dart |
| 166 | import 'package:openapi/api.dart'; |
| 167 | |
| 168 | final api = Openapi().getFlightsApi(); |
| 169 | |
| 170 | try { |
| 171 | final response = api.flightsControllerGetTrackedFlightsV1(); |
| 172 | print(response); |
| 173 | } catch on DioException (e) { |
| 174 | print('Exception when calling FlightsApi->flightsControllerGetTrackedFlightsV1: $e\n'); |
| 175 | } |
| 176 | ``` |
| 177 | |
| 178 | ### Parameters |
| 179 | This endpoint does not need any parameter. |
| 180 | |
| 181 | ### Return type |
| 182 | |
| 183 | [**TrackedFlightsResponseEntity**](TrackedFlightsResponseEntity.md) |
| 184 | |
| 185 | ### Authorization |
| 186 | |
| 187 | [JWT-auth](../README.md#JWT-auth) |
| 188 | |
| 189 | ### HTTP request headers |
| 190 | |
| 191 | - **Content-Type**: Not defined |
| 192 | - **Accept**: application/json |
| 193 | |
| 194 | [[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) |
| 195 | |