fix flight date issuee026af2a year ago195 lines · 6.1 KB | 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**]( |
| 13 | [**flightsControllerGetFlightsInBoundsV1**]( |
| 14 | [**flightsControllerGetFlightsV1**]( |
| 15 | [**flightsControllerGetTrackedFlightsV1**]( |
| 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(). |
| 30 | final GetAirlineDTO getAirlineDTO = ; |
| 31 | |
| 32 | try { |
| 33 | final response = api.flightsControllerGetAirlineV1 |
| 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** | [ |
| 45 | |
| 46 | ### Return type |
| 47 | |
| 48 | [**AirlineEntity**]( |
| 49 | |
| 50 | ### Authorization |
| 51 | |
| 52 | [JWT-auth](../README.md#JWT-auth) |
| 53 | |
| 54 | ### HTTP request headers |
| 55 | |
| 56 | - **Content-Type** |
| 57 | - **Accept** |
| 58 | |
| 59 | [[Back to top]](#) |
| 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(). |
| 73 | final num minLat = 40 |
| 74 | final num maxLat = 50 |
| 75 | final num minLng = - |
| 76 | final num maxLng = 10 |
| 77 | |
| 78 | try { |
| 79 | final response = api.flightsControllerGetFlightsInBoundsV1 |
| 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** | ** |
| 91 | **maxLat** | ** |
| 92 | **minLng** | ** |
| 93 | **maxLng** | ** |
| 94 | |
| 95 | ### Return type |
| 96 | |
| 97 | [**FlightsControllerGetFlightsInBoundsV1200Response**]( |
| 98 | |
| 99 | ### Authorization |
| 100 | |
| 101 | [JWT-auth](../README.md#JWT-auth) |
| 102 | |
| 103 | ### HTTP request headers |
| 104 | |
| 105 | - **Content-Type** |
| 106 | - **Accept** |
| 107 | |
| 108 | [[Back to top]](#) |
| 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(). |
| 122 | final String from = LAX |
| 123 | final String to = JFK |
| 124 | final String date = 2024 |
| 125 | |
| 126 | try { |
| 127 | final response = api.flightsControllerGetFlightsV1 |
| 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** | ** |
| 139 | **to** | ** |
| 140 | **date** | ** |
| 141 | |
| 142 | ### Return type |
| 143 | |
| 144 | [**FlightsResponseEntity**]( |
| 145 | |
| 146 | ### Authorization |
| 147 | |
| 148 | [JWT-auth](../README.md#JWT-auth) |
| 149 | |
| 150 | ### HTTP request headers |
| 151 | |
| 152 | - **Content-Type** |
| 153 | - **Accept** |
| 154 | |
| 155 | [[Back to top]](#) |
| 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(). |
| 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**]( |
| 184 | |
| 185 | ### Authorization |
| 186 | |
| 187 | [JWT-auth](../README.md#JWT-auth) |
| 188 | |
| 189 | ### HTTP request headers |
| 190 | |
| 191 | - **Content-Type** |
| 192 | - **Accept** |
| 193 | |
| 194 | [[Back to top]](#) |
| 195 | |
FlightsApi.md#flightscontrollergetairlinev1
)
|
**
POST
**
/v1/flights/airline | Get airline
FlightsApi.md#flightscontrollergetflightsinboundsv1
)
|
**
GET
**
/v1/flights/bounds | Get flights within geographic bounds(deprecated - will return nothing)
FlightsApi.md#flightscontrollergetflightsv1
)
|
**
GET
**
/v1/flights | Get flights between two airports
FlightsApi.md#flightscontrollergettrackedflightsv1
)
|
**
GET
**
/v1/flights/tracked | Get all tracked flights
**
getFlightsApi
()
;
// GetAirlineDTO |
(getAirlineDTO)
;
'
)
;
**
GetAirlineDTO
**
]
(
GetAirlineDTO.md
)
| |
AirlineEntity.md
)
: application/json
: 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
)
**
getFlightsApi
()
;
;
// num | Minimum latitude of the bounding box
;
// num | Maximum latitude of the bounding box
10
;
// 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 |
FlightsControllerGetFlightsInBoundsV1200Response.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
)
**
getFlightsApi
()
;
;
// String | Departure airport IATA code
;
// String | Arrival airport IATA code
-
03
-
20
;
// String | Flight date in ISO format
(from
,
to
,
date)
;
'
)
;
String
**
| Departure airport IATA code |
String
**
| Arrival airport IATA code |
String
**
| Flight date in ISO format |
FlightsResponseEntity.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
)
**
getFlightsApi
()
;
()
;
'
)
;
TrackedFlightsResponseEntity.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
)