0% found this document useful (0 votes)
58 views

Coding Assignment: Instructions

The document provides instructions for writing a command line tool that searches for flights using a Ryanair API based on input parameters including origin, destination, departure date, and number of adults. The tool is expected to output flight details including number, airports, times, price, and currency for the cheapest flights departing on the given date. If no flights are available, the output should indicate so. Unit tests and adherence to best practices are required. Examples of API requests are also provided.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Coding Assignment: Instructions

The document provides instructions for writing a command line tool that searches for flights using a Ryanair API based on input parameters including origin, destination, departure date, and number of adults. The tool is expected to output flight details including number, airports, times, price, and currency for the cheapest flights departing on the given date. If no flights are available, the output should indicate so. Unit tests and adherence to best practices are required. Examples of API requests are also provided.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

You might also like