Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HaiderABB/WingData-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

53 Commits

Repository files navigation

Flight Information API

Overview

This API provides endpoints to retrieve flight information based on various parameters such as origin, destination, travel dates, number of passengers, and class preference (economy, business, or first class).

Endpoints

Get Flights

Endpoint

Query Parameters

  • from: Departure location.
  • to: Destination location.
  • oneWay: Boolean indicating if it's a one-way flight (true or false).
  • departureDate: Date of departure (format: YYYY-MM-DD).
  • returnDate: Date of return flight (required if oneWay is false; format: YYYY-MM-DD).
  • passengers: Number of passengers.
  • class: Travel class preference (e.g., economy, business, first).

Example Usage

curl -X GET 'http://localhost:5000/api/flights?from=New+York&to=Los+Angeles&oneWay=false&departureDate=2024年07月10日&returnDate=2024年07月15日&passengers=2&class=economy'

Setup

To set up and run the API locally, follow these steps :

  1. Clone the Repository
git clone https://github.com/your-username/flight-info-api.git
cd flight-info-api
  1. Install Dependencies
npm install
  1. Run the Server
npm start

About

This project is a backend server using Node.js and Express, offering a RESTful API for user authentication and data such as flights, Hotels, Restaurants, and Guides. It uses MongoDB with Mongoose for database management and bcrypt.js for secure password hashing. The server provides secure user management and flight information endpoints.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /