You need to implement the following user story:
As a user, I want to see the trains that fit my travel schedule, So that I can decide what to buy
Write a function that will download schedules from 2 different train carrier API S1 and S2
Schedules can be retrieved from the following two endpoints (we need them both):
Merge the schedule s1 and s2 to a single schedule.
- Create a function that will take one input: time in ISO 8601 format,
e.g.
2011-12-03T10:15:30+01:00
- The function should return the next 3 trains from the time provided
- The time zone of the schedule is in UTC
- The schedule loops around, i.e. if my input is close to midnight, it should include results from after midnight
Expose this an HTTP API
- Change the
S1
endpoint to the following (less reliable): - Can we paralelise the HTTP requests?
- We don't need to persist the timetable
- Their is no trap, we don't have an hidden S3 carrier that we will add later
- If you take shortcut just tell us it's fine, the time is short
- You can read all the documentation you need, google, copy paste like you do in real life. It doesn't matter if you have forgot