Refactor flight and distance models, enhance OpenAPI documentation, and improve Wear OS integrationffa46ec2 years ago121 lines · 4.4 KB | 1 | # openapi (EXPERIMENTAL) |
| 2 | Plane Pal API Documentation |
| 3 | |
| 4 | This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech |
| 5 | |
| 6 | - API version: 1.0.0 |
| 7 | - Generator version: 7.10.0 |
| 8 | - Build package: org.openapitools.codegen.languages.DartDioClientCodegen |
| 9 | |
| 10 | ## Requirements |
| 11 | |
| 12 | * Dart 2.15.0+ or Flutter 2.8.0+ |
| 13 | * Dio 5.0.0+ (https://pub.dev/packages/dio) |
| 14 | |
| 15 | ## Installation & Usage |
| 16 | |
| 17 | ### pub.dev |
| 18 | To use the package from [pub.dev](https://pub.dev |
| 19 | ```yaml |
| 20 | dependencies: |
| 21 | openapi: 1.0.0 |
| 22 | ``` |
| 23 | |
| 24 | ### Github |
| 25 | If this Dart package is published to Github, please include the following in pubspec.yaml |
| 26 | ```yaml |
| 27 | dependencies: |
| 28 | openapi: |
| 29 | git: |
| 30 | url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git |
| 31 | #ref: main |
| 32 | ``` |
| 33 | |
| 34 | ### Local development |
| 35 | To use the package from your local drive, please include the following in pubspec.yaml |
| 36 | ```yaml |
| 37 | dependencies: |
| 38 | openapi: |
| 39 | path: /path/to/openapi |
| 40 | ``` |
| 41 | |
| 42 | ## Getting Started |
| 43 | |
| 44 | Please follow the [installation procedure](#installation--usage |
| 45 | |
| 46 | ```dart |
| 47 | import 'package:openapi/openapi.dart'; |
| 48 | |
| 49 | |
| 50 | final api = Openapi(). |
| 51 | final String search = search_example; |
| 52 | |
| 53 | try { |
| 54 | final response = await api. |
| 55 | print(response); |
| 56 | } catch on DioException (e) { |
| 57 | print("Exception when calling AirlinesApi->airlinesControllerGetAirlinesV1: $e\n |
| 58 | } |
| 59 | |
| 60 | ``` |
| 61 | |
| 62 | ## Documentation for API Endpoints |
| 63 | |
| 64 | All URIs are relative to *http://localhost* |
| 65 | |
| 66 | Class | Method | HTTP request | Description |
| 67 | ------------ | ------------- | ------------- | ------------- |
| 68 | [*AirlinesApi*]( |
| 69 | [*AirportsApi*]( |
| 70 | [*AppApi*]( |
| 71 | [*AuthenticationApi*]( |
| 72 | [*AuthenticationApi*]( |
| 73 | [*AuthenticationApi*]( |
| 74 | [*FlightApi*]( |
| 75 | [*FlightsApi*]( |
| 76 | [*FlightsApi*]( |
| 77 | |
| 78 | |
| 79 | ## Documentation For Models |
| 80 | |
| 81 | - [AircraftEntity](doc/AircraftEntity.md |
| 82 | - [AircraftFlightEntity](doc/AircraftFlightEntity.md |
| 83 | - [AirlineEntity](doc/AirlineEntity.md |
| 84 | - [AirlineInfo](doc/AirlineInfo.md |
| 85 | - [AirportEntity](doc/AirportEntity.md |
| 86 | - [AirportInfo](doc/AirportInfo.md |
| 87 | - [AirportType](doc/AirportType.md |
| 88 | - [FlighType](doc/FlighType.md |
| 89 | - [FlightEntity](doc/FlightEntity.md |
| 90 | - [FlightResponseEntity](doc/FlightResponseEntity.md |
| 91 | - [FlightStatus](doc/FlightStatus.md |
| 92 | - [FlightsResponseEntity](doc/FlightsResponseEntity.md |
| 93 | - [FlightsRouteEntity](doc/FlightsRouteEntity.md |
| 94 | - [GenericErrorEntity](doc/GenericErrorEntity.md |
| 95 | - [GetAirlineDTO](doc/GetAirlineDTO.md |
| 96 | - [LocationEntity](doc/LocationEntity.md |
| 97 | - [LoginDTO](doc/LoginDTO.md |
| 98 | - [LoginEntity](doc/LoginEntity.md |
| 99 | - [PartialAirlineEntity](doc/PartialAirlineEntity.md |
| 100 | - [RegisterDTO](doc/RegisterDTO.md |
| 101 | - [RegisterEntity](doc/RegisterEntity.md |
| 102 | - [RouteAirportEntity](doc/RouteAirportEntity.md |
| 103 | - [RouteInfoEntity](doc/RouteInfoEntity.md |
| 104 | - [StringifiedGreatCircleDistanceEntity](doc/StringifiedGreatCircleDistanceEntity.md |
| 105 | - [TimeEntity](doc/TimeEntity.md |
| 106 | - [UserEntity](doc/UserEntity.md |
| 107 | |
| 108 | |
| 109 | ## Documentation For Authorization |
| 110 | |
| 111 | |
| 112 | Authentication schemes defined for the API: |
| 113 | ### JWT-auth |
| 114 | |
| 115 | - **Type**: HTTP Bearer Token authentication (JWT) |
| 116 | |
| 117 | |
| 118 | ## Author |
| 119 | |
| 120 | |
| 121 | |
)
project:
)
, please include the following in pubspec.yaml
)
and then run the following:
getAirlinesApi
()
;
// String | The full(or a part of) name, ident or icao. Case Insensitive.
airlinesControllerGetAirlinesV1
(search)
;
"
)
;
doc/AirlinesApi.md
)
|
[
**
airlinesControllerGetAirlinesV1
**
]
(
doc/AirlinesApi.md#airlinescontrollergetairlinesv1
)
|
**
GET
**
/v1/airlines | Get airlines
doc/AirportsApi.md
)
|
[
**
airportsControllerGetAirportsV1
**
]
(
doc/AirportsApi.md#airportscontrollergetairportsv1
)
|
**
GET
**
/v1/airports | Get all airports
doc/AppApi.md
)
|
[
**
appControllerGetHelloV1
**
]
(
doc/AppApi.md#appcontrollergethellov1
)
|
**
GET
**
/v1 |
doc/AuthenticationApi.md
)
|
[
**
authControllerGetCurrentUserV1
**
]
(
doc/AuthenticationApi.md#authcontrollergetcurrentuserv1
)
|
**
GET
**
/v1/auth/@me | Get current user
doc/AuthenticationApi.md
)
|
[
**
authControllerLoginV1
**
]
(
doc/AuthenticationApi.md#authcontrollerloginv1
)
|
**
POST
**
/v1/auth/login | Login
doc/AuthenticationApi.md
)
|
[
**
authControllerRegisterV1
**
]
(
doc/AuthenticationApi.md#authcontrollerregisterv1
)
|
**
POST
**
/v1/auth/register | Register
doc/FlightApi.md
)
|
[
**
flightControllerGetFlightV1
**
]
(
doc/FlightApi.md#flightcontrollergetflightv1
)
|
**
GET
**
/v1/flight | Get flight details
doc/FlightsApi.md
)
|
[
**
flightsControllerGetAirlineV1
**
]
(
doc/FlightsApi.md#flightscontrollergetairlinev1
)
|
**
POST
**
/v1/flights/airline | Get airline
doc/FlightsApi.md
)
|
[
**
flightsControllerGetFlightsV1
**
]
(
doc/FlightsApi.md#flightscontrollergetflightsv1
)
|
**
GET
**
/v1/flights | Get flights between two airports
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)