add booking detail option and improve shareable card8af415aa year ago389 lines · 13.1 KB | 1 | # openapi.api.FlightApi |
| 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 | [**flightControllerCreateFlightBookingV1**]( |
| 13 | [**flightControllerDeleteFlightBookingV1**]( |
| 14 | [**flightControllerGetFlightBookingV1**]( |
| 15 | [**flightControllerGetFlightBookingsByFlightIdV1**]( |
| 16 | [**flightControllerGetFlightTrackV1**]( |
| 17 | [**flightControllerGetFlightV1**]( |
| 18 | [**flightControllerSearchFlightsV1**]( |
| 19 | [**flightControllerUpdateFlightBookingV1**]( |
| 20 | |
| 21 | |
| 22 | # **flightControllerCreateFlightBookingV1 |
| 23 | > FlightBookingEntity flightControllerCreateFlightBookingV1(createFlightBookingDTO) |
| 24 | |
| 25 | Create a flight booking |
| 26 | |
| 27 | Create a new booking for a flight with booking details |
| 28 | |
| 29 | ### Example |
| 30 | ```dart |
| 31 | import 'package:openapi/api.dart'; |
| 32 | |
| 33 | final api = Openapi(). |
| 34 | final CreateFlightBookingDTO createFlightBookingDTO = ; |
| 35 | |
| 36 | try { |
| 37 | final response = api.flightControllerCreateFlightBookingV1 |
| 38 | print(response); |
| 39 | } catch on DioException (e) { |
| 40 | print('Exception when calling FlightApi->flightControllerCreateFlightBookingV1: $e\n |
| 41 | } |
| 42 | ``` |
| 43 | |
| 44 | ### Parameters |
| 45 | |
| 46 | Name | Type | Description | Notes |
| 47 | ------------- | ------------- | ------------- | ------------- |
| 48 | **createFlightBookingDTO** | [ |
| 49 | |
| 50 | ### Return type |
| 51 | |
| 52 | [**FlightBookingEntity**]( |
| 53 | |
| 54 | ### Authorization |
| 55 | |
| 56 | [JWT-auth](../README.md#JWT-auth) |
| 57 | |
| 58 | ### HTTP request headers |
| 59 | |
| 60 | - **Content-Type** |
| 61 | - **Accept** |
| 62 | |
| 63 | [[Back to top]](#) |
| 64 | |
| 65 | # **flightControllerDeleteFlightBookingV1 |
| 66 | > FlightControllerDeleteFlightBookingV1200Response flightControllerDeleteFlightBookingV1(bookingId) |
| 67 | |
| 68 | Delete a flight booking |
| 69 | |
| 70 | Delete a flight booking |
| 71 | |
| 72 | ### Example |
| 73 | ```dart |
| 74 | import 'package:openapi/api.dart'; |
| 75 | |
| 76 | final api = Openapi(). |
| 77 | final String bookingId = booking_abc123; |
| 78 | |
| 79 | try { |
| 80 | final response = api.flightControllerDeleteFlightBookingV1 |
| 81 | print(response); |
| 82 | } catch on DioException (e) { |
| 83 | print('Exception when calling FlightApi->flightControllerDeleteFlightBookingV1: $e\n |
| 84 | } |
| 85 | ``` |
| 86 | |
| 87 | ### Parameters |
| 88 | |
| 89 | Name | Type | Description | Notes |
| 90 | ------------- | ------------- | ------------- | ------------- |
| 91 | **bookingId** | ** |
| 92 | |
| 93 | ### Return type |
| 94 | |
| 95 | [**FlightControllerDeleteFlightBookingV1200Response**]( |
| 96 | |
| 97 | ### Authorization |
| 98 | |
| 99 | [JWT-auth](../README.md#JWT-auth) |
| 100 | |
| 101 | ### HTTP request headers |
| 102 | |
| 103 | - **Content-Type** |
| 104 | - **Accept** |
| 105 | |
| 106 | [[Back to top]](#) |
| 107 | |
| 108 | # **flightControllerGetFlightBookingV1 |
| 109 | > FlightBookingEntity flightControllerGetFlightBookingV1(bookingId) |
| 110 | |
| 111 | Get a flight booking |
| 112 | |
| 113 | Get details of a specific flight booking |
| 114 | |
| 115 | ### Example |
| 116 | ```dart |
| 117 | import 'package:openapi/api.dart'; |
| 118 | |
| 119 | final api = Openapi(). |
| 120 | final String bookingId = booking_abc123; |
| 121 | |
| 122 | try { |
| 123 | final response = api.flightControllerGetFlightBookingV1 |
| 124 | print(response); |
| 125 | } catch on DioException (e) { |
| 126 | print('Exception when calling FlightApi->flightControllerGetFlightBookingV1: $e\n |
| 127 | } |
| 128 | ``` |
| 129 | |
| 130 | ### Parameters |
| 131 | |
| 132 | Name | Type | Description | Notes |
| 133 | ------------- | ------------- | ------------- | ------------- |
| 134 | **bookingId** | ** |
| 135 | |
| 136 | ### Return type |
| 137 | |
| 138 | [**FlightBookingEntity**]( |
| 139 | |
| 140 | ### Authorization |
| 141 | |
| 142 | [JWT-auth](../README.md#JWT-auth) |
| 143 | |
| 144 | ### HTTP request headers |
| 145 | |
| 146 | - **Content-Type** |
| 147 | - **Accept** |
| 148 | |
| 149 | [[Back to top]](#) |
| 150 | |
| 151 | # **flightControllerGetFlightBookingsByFlightIdV1 |
| 152 | > BuiltList<FlightBookingEntity |
| 153 | |
| 154 | Get all bookings for a flight |
| 155 | |
| 156 | Get all bookings associated with a specific flight |
| 157 | |
| 158 | ### Example |
| 159 | ```dart |
| 160 | import 'package:openapi/api.dart'; |
| 161 | |
| 162 | final api = Openapi(). |
| 163 | final String flightId = flight_abc123; |
| 164 | |
| 165 | try { |
| 166 | final response = api.flightControllerGetFlightBookingsByFlightIdV1 |
| 167 | print(response); |
| 168 | } catch on DioException (e) { |
| 169 | print('Exception when calling FlightApi->flightControllerGetFlightBookingsByFlightIdV1: $e\n |
| 170 | } |
| 171 | ``` |
| 172 | |
| 173 | ### Parameters |
| 174 | |
| 175 | Name | Type | Description | Notes |
| 176 | ------------- | ------------- | ------------- | ------------- |
| 177 | **flightId** | ** |
| 178 | |
| 179 | ### Return type |
| 180 | |
| 181 | [**BuiltList<FlightBookingEntity>**]( |
| 182 | |
| 183 | ### Authorization |
| 184 | |
| 185 | [JWT-auth](../README.md#JWT-auth) |
| 186 | |
| 187 | ### HTTP request headers |
| 188 | |
| 189 | - **Content-Type** |
| 190 | - **Accept** |
| 191 | |
| 192 | [[Back to top]](#) |
| 193 | |
| 194 | # **flightControllerGetFlightTrackV1 |
| 195 | > FlightTrackResponseEntity flightControllerGetFlightTrackV1(iata, icao, timezone, date) |
| 196 | |
| 197 | Get flight track/path |
| 198 | |
| 199 | Get the flight path with all position data points for a specific flight |
| 200 | |
| 201 | ### Example |
| 202 | ```dart |
| 203 | import 'package:openapi/api.dart'; |
| 204 | |
| 205 | final api = Openapi(). |
| 206 | final String iata = UA123 |
| 207 | final String icao = UAL123 |
| 208 | final String timezone = IST |
| 209 | final String date = 2024 |
| 210 | |
| 211 | try { |
| 212 | final response = api.flightControllerGetFlightTrackV1 |
| 213 | print(response); |
| 214 | } catch on DioException (e) { |
| 215 | print('Exception when calling FlightApi->flightControllerGetFlightTrackV1: $e\n |
| 216 | } |
| 217 | ``` |
| 218 | |
| 219 | ### Parameters |
| 220 | |
| 221 | Name | Type | Description | Notes |
| 222 | ------------- | ------------- | ------------- | ------------- |
| 223 | **iata** | ** |
| 224 | **icao** | ** |
| 225 | **timezone** | ** |
| 226 | **date** | ** |
| 227 | |
| 228 | ### Return type |
| 229 | |
| 230 | [**FlightTrackResponseEntity**]( |
| 231 | |
| 232 | ### Authorization |
| 233 | |
| 234 | [JWT-auth](../README.md#JWT-auth) |
| 235 | |
| 236 | ### HTTP request headers |
| 237 | |
| 238 | - **Content-Type** |
| 239 | - **Accept** |
| 240 | |
| 241 | [[Back to top]](#) |
| 242 | |
| 243 | # **flightControllerGetFlightV1 |
| 244 | > FlightResponseEntity flightControllerGetFlightV1(iata, icao, timezone, date, forceUpdate, faFlightId) |
| 245 | |
| 246 | Get flight details |
| 247 | |
| 248 | Get detailed information about a specific flight including real-time tracking data. Use faFlightId to fetch a specific flight after searching. |
| 249 | |
| 250 | ### Example |
| 251 | ```dart |
| 252 | import 'package:openapi/api.dart'; |
| 253 | |
| 254 | final api = Openapi(). |
| 255 | final String iata = UA123 |
| 256 | final String icao = UAL123 |
| 257 | final String timezone = timezone_example; |
| 258 | final String date = 2024 |
| 259 | final bool forceUpdate = true |
| 260 | final String faFlightId = faFlightId_example; |
| 261 | |
| 262 | try { |
| 263 | final response = api.flightControllerGetFlightV1 |
| 264 | print(response); |
| 265 | } catch on DioException (e) { |
| 266 | print('Exception when calling FlightApi->flightControllerGetFlightV1: $e\n |
| 267 | } |
| 268 | ``` |
| 269 | |
| 270 | ### Parameters |
| 271 | |
| 272 | Name | Type | Description | Notes |
| 273 | ------------- | ------------- | ------------- | ------------- |
| 274 | **iata** | ** |
| 275 | **icao** | ** |
| 276 | **timezone** | ** |
| 277 | **date** | ** |
| 278 | **forceUpdate** | ** |
| 279 | **faFlightId** | ** |
| 280 | |
| 281 | ### Return type |
| 282 | |
| 283 | [**FlightResponseEntity**]( |
| 284 | |
| 285 | ### Authorization |
| 286 | |
| 287 | [JWT-auth](../README.md#JWT-auth) |
| 288 | |
| 289 | ### HTTP request headers |
| 290 | |
| 291 | - **Content-Type** |
| 292 | - **Accept** |
| 293 | |
| 294 | [[Back to top]](#) |
| 295 | |
| 296 | # **flightControllerSearchFlightsV1 |
| 297 | > FlightSearchResponseEntity flightControllerSearchFlightsV1(iata, icao, timezone, date) |
| 298 | |
| 299 | Search flights |
| 300 | |
| 301 | Search for flights by identifier and optional date. Returns lightweight flight summaries for selection. |
| 302 | |
| 303 | ### Example |
| 304 | ```dart |
| 305 | import 'package:openapi/api.dart'; |
| 306 | |
| 307 | final api = Openapi(). |
| 308 | final String iata = UA123 |
| 309 | final String icao = UAL123 |
| 310 | final String timezone = timezone_example; |
| 311 | final String date = 2024 |
| 312 | |
| 313 | try { |
| 314 | final response = api.flightControllerSearchFlightsV1 |
| 315 | print(response); |
| 316 | } catch on DioException (e) { |
| 317 | print('Exception when calling FlightApi->flightControllerSearchFlightsV1: $e\n |
| 318 | } |
| 319 | ``` |
| 320 | |
| 321 | ### Parameters |
| 322 | |
| 323 | Name | Type | Description | Notes |
| 324 | ------------- | ------------- | ------------- | ------------- |
| 325 | **iata** | ** |
| 326 | **icao** | ** |
| 327 | **timezone** | ** |
| 328 | **date** | ** |
| 329 | |
| 330 | ### Return type |
| 331 | |
| 332 | [**FlightSearchResponseEntity**]( |
| 333 | |
| 334 | ### Authorization |
| 335 | |
| 336 | [JWT-auth](../README.md#JWT-auth) |
| 337 | |
| 338 | ### HTTP request headers |
| 339 | |
| 340 | - **Content-Type** |
| 341 | - **Accept** |
| 342 | |
| 343 | [[Back to top]](#) |
| 344 | |
| 345 | # **flightControllerUpdateFlightBookingV1 |
| 346 | > FlightBookingEntity flightControllerUpdateFlightBookingV1(bookingId, updateFlightBookingDTO) |
| 347 | |
| 348 | Update a flight booking |
| 349 | |
| 350 | Update an existing flight booking |
| 351 | |
| 352 | ### Example |
| 353 | ```dart |
| 354 | import 'package:openapi/api.dart'; |
| 355 | |
| 356 | final api = Openapi(). |
| 357 | final String bookingId = booking_abc123; |
| 358 | final UpdateFlightBookingDTO updateFlightBookingDTO = ; |
| 359 | |
| 360 | try { |
| 361 | final response = api.flightControllerUpdateFlightBookingV1 |
| 362 | print(response); |
| 363 | } catch on DioException (e) { |
| 364 | print('Exception when calling FlightApi->flightControllerUpdateFlightBookingV1: $e\n |
| 365 | } |
| 366 | ``` |
| 367 | |
| 368 | ### Parameters |
| 369 | |
| 370 | Name | Type | Description | Notes |
| 371 | ------------- | ------------- | ------------- | ------------- |
| 372 | **bookingId** | ** |
| 373 | **updateFlightBookingDTO** | [ |
| 374 | |
| 375 | ### Return type |
| 376 | |
| 377 | [**FlightBookingEntity**]( |
| 378 | |
| 379 | ### Authorization |
| 380 | |
| 381 | [JWT-auth](../README.md#JWT-auth) |
| 382 | |
| 383 | ### HTTP request headers |
| 384 | |
| 385 | - **Content-Type** |
| 386 | - **Accept** |
| 387 | |
| 388 | [[Back to top]](#) |
| 389 | |
FlightApi.md#flightcontrollercreateflightbookingv1
)
|
**
POST
**
/v1/flight/booking | Create a flight booking
FlightApi.md#flightcontrollerdeleteflightbookingv1
)
|
**
DELETE
**
/v1/flight/booking/{bookingId} | Delete a flight booking
FlightApi.md#flightcontrollergetflightbookingv1
)
|
**
GET
**
/v1/flight/booking/{bookingId} | Get a flight booking
FlightApi.md#flightcontrollergetflightbookingsbyflightidv1
)
|
**
GET
**
/v1/flight/booking/flight/{flightId} | Get all bookings for a flight
FlightApi.md#flightcontrollergetflighttrackv1
)
|
**
GET
**
/v1/flight/track | Get flight track/path
FlightApi.md#flightcontrollergetflightv1
)
|
**
GET
**
/v1/flight | Get flight details
FlightApi.md#flightcontrollersearchflightsv1
)
|
**
GET
**
/v1/flight/search | Search flights
FlightApi.md#flightcontrollerupdateflightbookingv1
)
|
**
PUT
**
/v1/flight/booking/{bookingId} | Update a flight booking
**
getFlightApi
()
;
// CreateFlightBookingDTO |
(createFlightBookingDTO)
;
'
)
;
**
CreateFlightBookingDTO
**
]
(
CreateFlightBookingDTO.md
)
| |
FlightBookingEntity.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
)
**
getFlightApi
()
;
// String | ID of the booking to delete
(bookingId)
;
'
)
;
String
**
| ID of the booking to delete |
FlightControllerDeleteFlightBookingV1200Response.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
)
**
getFlightApi
()
;
// String | ID of the booking to retrieve
(bookingId)
;
'
)
;
String
**
| ID of the booking to retrieve |
FlightBookingEntity.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
)
**
>
flightControllerGetFlightBookingsByFlightIdV1(flightId)
getFlightApi
()
;
// String | ID of the flight
(flightId)
;
'
)
;
String
**
| ID of the flight |
FlightBookingEntity.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
)
**
getFlightApi
()
;
;
// String | IATA flight number
;
// String | ICAO flight number
;
// String | The timezone from which the request is being made.
-
03
-
20
;
// String | Flight date (ISO format). Defaults to current date if not provided
(iata
,
icao
,
timezone
,
date)
;
'
)
;
String
**
| IATA flight number |
String
**
| ICAO flight number |
String
**
| The timezone from which the request is being made. |
String
**
| Flight date (ISO format). Defaults to current date if not provided |
[
optional
]
FlightTrackResponseEntity.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
)
**
getFlightApi
()
;
;
// String | IATA flight number
;
// String | ICAO flight number
// String | The timezone from which the request is being made.
-
03
-
20
;
// String | Flight date (ISO format). Defaults to current date if not provided
;
// bool | Force update the flight data(used to refresh the flight data)
// String | FlightAware flight ID to fetch a specific flight. Use this after searching for flights to get details of a selected flight.
(iata
,
icao
,
timezone
,
date
,
forceUpdate
,
faFlightId)
;
'
)
;
String
**
| IATA flight number |
String
**
| ICAO flight number |
String
**
| The timezone from which the request is being made. |
String
**
| Flight date (ISO format). Defaults to current date if not provided |
[
optional
]
bool
**
| Force update the flight data(used to refresh the flight data) |
[
optional
]
[default to false]
String
**
| FlightAware flight ID to fetch a specific flight. Use this after searching for flights to get details of a selected flight. |
[
optional
]
FlightResponseEntity.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
)
**
getFlightApi
()
;
;
// String | IATA flight number
;
// String | ICAO flight number
// String | The timezone from which the request is being made.
-
03
-
20
;
// String | Flight date (ISO format). Filters flights by date if provided
(iata
,
icao
,
timezone
,
date)
;
'
)
;
String
**
| IATA flight number |
String
**
| ICAO flight number |
String
**
| The timezone from which the request is being made. |
String
**
| Flight date (ISO format). Filters flights by date if provided |
[
optional
]
FlightSearchResponseEntity.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
)
**
getFlightApi
()
;
// String | ID of the booking to update
// UpdateFlightBookingDTO |
(bookingId
,
updateFlightBookingDTO)
;
'
)
;
String
**
| ID of the booking to update |
**
UpdateFlightBookingDTO
**
]
(
UpdateFlightBookingDTO.md
)
| |
FlightBookingEntity.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
)