I AM LOVING THIS APP!!!!7244518a year ago155 lines · 4.9 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 | |
| 16 | |
| 17 | # **flightsControllerGetAirlineV1 |
| 18 | > AirlineEntity flightsControllerGetAirlineV1(getAirlineDTO) |
| 19 | |
| 20 | Get airline |
| 21 | |
| 22 | Get airline with search query. This doesn't check if the number is correct |
| 23 | |
| 24 | ### Example |
| 25 | ```dart |
| 26 | import 'package:openapi/api.dart'; |
| 27 | |
| 28 | final api = Openapi(). |
| 29 | final GetAirlineDTO getAirlineDTO = ; |
| 30 | |
| 31 | try { |
| 32 | final response = api.flightsControllerGetAirlineV1 |
| 33 | print(response); |
| 34 | } catch on DioException (e) { |
| 35 | print('Exception when calling FlightsApi->flightsControllerGetAirlineV1: $e\n |
| 36 | } |
| 37 | ``` |
| 38 | |
| 39 | ### Parameters |
| 40 | |
| 41 | Name | Type | Description | Notes |
| 42 | ------------- | ------------- | ------------- | ------------- |
| 43 | **getAirlineDTO** | [ |
| 44 | |
| 45 | ### Return type |
| 46 | |
| 47 | [**AirlineEntity**]( |
| 48 | |
| 49 | ### Authorization |
| 50 | |
| 51 | [JWT-auth](../README.md#JWT-auth) |
| 52 | |
| 53 | ### HTTP request headers |
| 54 | |
| 55 | - **Content-Type** |
| 56 | - **Accept** |
| 57 | |
| 58 | [[Back to top]](#) |
| 59 | |
| 60 | # **flightsControllerGetFlightsInBoundsV1 |
| 61 | > FlightsControllerGetFlightsInBoundsV1200Response flightsControllerGetFlightsInBoundsV1(minLat, maxLat, minLng, maxLng) |
| 62 | |
| 63 | Get flights within geographic bounds(deprecated - will return nothing) |
| 64 | |
| 65 | Get all aircraft currently flying within a specified geographic bounding box using FlightAware data with comprehensive aircraft details |
| 66 | |
| 67 | ### Example |
| 68 | ```dart |
| 69 | import 'package:openapi/api.dart'; |
| 70 | |
| 71 | final api = Openapi(). |
| 72 | final num minLat = 40 |
| 73 | final num maxLat = 50 |
| 74 | final num minLng = - |
| 75 | final num maxLng = 10 |
| 76 | |
| 77 | try { |
| 78 | final response = api.flightsControllerGetFlightsInBoundsV1 |
| 79 | print(response); |
| 80 | } catch on DioException (e) { |
| 81 | print('Exception when calling FlightsApi->flightsControllerGetFlightsInBoundsV1: $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 | [**FlightsControllerGetFlightsInBoundsV1200Response**]( |
| 97 | |
| 98 | ### Authorization |
| 99 | |
| 100 | [JWT-auth](../README.md#JWT-auth) |
| 101 | |
| 102 | ### HTTP request headers |
| 103 | |
| 104 | - **Content-Type** |
| 105 | - **Accept** |
| 106 | |
| 107 | [[Back to top]](#) |
| 108 | |
| 109 | # **flightsControllerGetFlightsV1 |
| 110 | > FlightsResponseEntity flightsControllerGetFlightsV1(from, to, date) |
| 111 | |
| 112 | Get flights between two airports |
| 113 | |
| 114 | Get all flights between two airports for a specific date |
| 115 | |
| 116 | ### Example |
| 117 | ```dart |
| 118 | import 'package:openapi/api.dart'; |
| 119 | |
| 120 | final api = Openapi(). |
| 121 | final String from = LAX |
| 122 | final String to = JFK |
| 123 | final String date = 2024 |
| 124 | |
| 125 | try { |
| 126 | final response = api.flightsControllerGetFlightsV1 |
| 127 | print(response); |
| 128 | } catch on DioException (e) { |
| 129 | print('Exception when calling FlightsApi->flightsControllerGetFlightsV1: $e\n |
| 130 | } |
| 131 | ``` |
| 132 | |
| 133 | ### Parameters |
| 134 | |
| 135 | Name | Type | Description | Notes |
| 136 | ------------- | ------------- | ------------- | ------------- |
| 137 | **from** | ** |
| 138 | **to** | ** |
| 139 | **date** | ** |
| 140 | |
| 141 | ### Return type |
| 142 | |
| 143 | [**FlightsResponseEntity**]( |
| 144 | |
| 145 | ### Authorization |
| 146 | |
| 147 | [JWT-auth](../README.md#JWT-auth) |
| 148 | |
| 149 | ### HTTP request headers |
| 150 | |
| 151 | - **Content-Type** |
| 152 | - **Accept** |
| 153 | |
| 154 | [[Back to top]](#) |
| 155 | |
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
**
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
)