| 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 | [**flightsControllerGetFlightsV1**]( |
| 14 | |
| 15 | |
| 16 | # **flightsControllerGetAirlineV1 |
| 17 | > AirlineEntity flightsControllerGetAirlineV1(getAirlineDTO) |
| 18 | |
| 19 | Get airline |
| 20 | |
| 21 | Get airline with search query. This doesn't check if the number is correct |
| 22 | |
| 23 | ### Example |
| 24 | ```dart |
| 25 | import 'package:openapi/api.dart'; |
| 26 | |
| 27 | final api = Openapi(). |
| 28 | final GetAirlineDTO getAirlineDTO = ; |
| 29 | |
| 30 | try { |
| 31 | final response = api.flightsControllerGetAirlineV1 |
| 32 | print(response); |
| 33 | } catch on DioException (e) { |
| 34 | print('Exception when calling FlightsApi->flightsControllerGetAirlineV1: $e\n |
| 35 | } |
| 36 | ``` |
| 37 | |
| 38 | ### Parameters |
| 39 | |
| 40 | Name | Type | Description | Notes |
| 41 | ------------- | ------------- | ------------- | ------------- |
| 42 | **getAirlineDTO** | [ |
| 43 | |
| 44 | ### Return type |
| 45 | |
| 46 | [**AirlineEntity**]( |
| 47 | |
| 48 | ### Authorization |
| 49 | |
| 50 | [JWT-auth](../README.md#JWT-auth) |
| 51 | |
| 52 | ### HTTP request headers |
| 53 | |
| 54 | - **Content-Type** |
| 55 | - **Accept** |
| 56 | |
| 57 | [[Back to top]](#) |
| 58 | |
| 59 | # **flightsControllerGetFlightsV1 |
| 60 | > FlightsResponseEntity flightsControllerGetFlightsV1(from, to, date) |
| 61 | |
| 62 | Get flights between two airports |
| 63 | |
| 64 | Get all flights between two airports for a specific date |
| 65 | |
| 66 | ### Example |
| 67 | ```dart |
| 68 | import 'package:openapi/api.dart'; |
| 69 | |
| 70 | final api = Openapi(). |
| 71 | final String from = LAX |
| 72 | final String to = JFK |
| 73 | final String date = 2024 |
| 74 | |
| 75 | try { |
| 76 | final response = api.flightsControllerGetFlightsV1 |
| 77 | print(response); |
| 78 | } catch on DioException (e) { |
| 79 | print('Exception when calling FlightsApi->flightsControllerGetFlightsV1: $e\n |
| 80 | } |
| 81 | ``` |
| 82 | |
| 83 | ### Parameters |
| 84 | |
| 85 | Name | Type | Description | Notes |
| 86 | ------------- | ------------- | ------------- | ------------- |
| 87 | **from** | ** |
| 88 | **to** | ** |
| 89 | **date** | ** |
| 90 | |
| 91 | ### Return type |
| 92 | |
| 93 | [**FlightsResponseEntity**]( |
| 94 | |
| 95 | ### Authorization |
| 96 | |
| 97 | [JWT-auth](../README.md#JWT-auth) |
| 98 | |
| 99 | ### HTTP request headers |
| 100 | |
| 101 | - **Content-Type** |
| 102 | - **Accept** |
| 103 | |
| 104 | [[Back to top]](#) |
| 105 | |