Sie sind auf Seite 1von 2

Coding Assignment

Write a command line tool that uses a web API to search for flights based on the input
parameters.

The source for the flight data will be an airline named Ryanair. See their website here to validate
output of your application. (​https://www.ryanair.com/gb/en/​)

Instructions

Your program, called SearchFlights, should have the following inputs and outputs. Make sure to
read all of the expectations to make sure that your program implements all required features.

Example requests to Ryanair API are on the following page. The API will return JSON that will
need to be studied and compared against the website in order to ensure that it is being parsed
correctly.

Inputs
● Origin (Airport you are leaving from)
● Destination (Airport you are flying to)
● DepartureDate (Date the flight is departing)
● ADT (Number of Adults)

Outputs
● Flight Number
● Origin
● Destination
● Departure Time
● Arrival Time
● Price
● Currency

Example Output
FR 8859 DUB --> LIS (6/30/2019 9:30:00 --> 6/30/2019 17:05:00) - 11535.32 HUF

Expectations
● Only flights departing on the date requested should be displayed.
● If there are no flights available for a given date, the output should be “No flights found.”
● Flights should be ordered by price, displaying the cheapest first. If the flights are the
same price, order by earliest departure time next.
● Attention will be paid to code readability and adherence to best practices.
● Unit tests are required for all methods related to data.
● Ask questions if some points are not clear.
Here are some example requests to the API:

Several flights for one day


https://desktopapps.ryanair.com/v4/en-gb/availability?ADT=1&CHD=0&DateOut=2019-07-19&Destinati
on=DUB&FlexDaysOut=2&INF=0&IncludeConnectingFlights=true&Origin=LGW&RoundTrip=false&TEEN=0&ToU
s=AGREED&exists=false

No flights for date available


https://desktopapps.ryanair.com/v4/en-gb/availability?ADT=1&CHD=0&DateOut=2019-11-04&Destinati
on=LIS&FlexDaysOut=4&INF=0&IncludeConnectingFlights=true&Origin=BUD&RoundTrip=false&TEEN=0&ToU
s=AGREED&exists=false

Das könnte Ihnen auch gefallen