chill5018 / flightapp-api Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Use email address to find all bookings associated with that email
GET - api/v1/airlines
--> Returns all available airlines with flights
POST - api/v1/airlines
--> Create city with flights
GET - api/v1/airports
--> Returns all available airports with flights
POST - api/v1/airports
--> Create airport
GET - api/v1/cities
--> Returns all available cities with flights
POST - api/v1/cities
--> Create city with flights
Primary Endpoint
GET - api/v1/flights
--> Returns all available flights
params: {
"origin": "String",
"destination": "String",
"departureDate": "Long",
"returnDate": "Long",
"ticketCount": "Int"
}
POST - api/v1/flights
--> Create flight
GET - api/v1/offers
--> Returns all available offers with flights
POST - api/v1/offers
--> Create offer
The process of actually purchasing a flight
A user should be able to select a Departure City, and an Arrival City, for a specific date.
Please enable cors on the express server so that we can make requests to the API on Heroku.
express.use(cors({
origin: '*',
credentials: true
}));
Create a seed file to populate the database with some content. It is recommended that we use dates starting in february. So that this does not have to be updated for the exam.
Use #15 to define models for TDD
We need data in the app, so need to create some seed files so that the clients can make queries.
http://docs.sequelizejs.com/manual/tutorial/migrations.html#creating-first-seed
We need to be able to send a query to the API where the Client can query a list of available flights using the following query params:
GET /flights?departureCity="Copenhagen"&arrivalCity="New York City"&departureDate="21/12/2018"&returnDate="21/12/2018
The Readme does not reflect our project. It needs to be updated.
How to initialize the project, how to run the project locally. Where to find the deployed version, a Link to the available routes.
Should test that the API endpoint responds with the correct data.
For this we can use supertest
{
"originName": "Copenhagen",
"originCode": "CPH",
"destinationName": "New York City",
"destinationCode": "JFK",
// CPH, JFK, LGA, NWK, SWF (Norwegian)
"airports": {
"id": "int",
"name": "String"
},
// Airline Selling Ticket (SAS, Norwegian, British Airways, American Airlines, Turkish Air)
"airline": {
"id": "int",
"name": "String",
"offerIndex": ["OfferId - Int"]
},
// Ticket
"offer": {
"id": "int",
"price": "Double - BaseCurrency [EUR, DKK, USD]",
"flightIndex": ["flightId"]
},
// Booking
"flight": {
"id": "int",
"airlineIndex": "airlineId",
"flightNumber": "string",
"departureDateTime": "timestamp",
"arrivalDateTime": "timestamp",
"destinationIndex": "airportId",
"originIndex": "airportId"
}
}
Currently, we use 2 types of configs for the sequelize commands. We need to be consistent and only use config/config.json
file and avoid using the .env
files for that matter
An admin portal to update the flight information
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.