Coder Social home page Coder Social logo

traveler-api's Introduction

Your Task

There are 3 sets of data that need to be merged in order to display a summary of the travelers on a trip and their flight information.

The index.js file contains a sample object for one of the travelers. The basic structure is as follows.

{
  travelers: [
    id,
    name,
    flights: [
      {
        legs: [
          {
            airlineCode,
            airlineName,
            flightNumber,
            frequentFlyerNumber
          }
        ]
      }
    ]
  ]
}

Your task is to replace the hard-coded response and write a function that loads and merges the data returned by the stubbed services in the /api folder. The function should return a Promise that resolves to data that looks like the above example. The following are things to keep in mind as you work on your solution:

  • The trip defines who is flying where and on what airline
  • The order of the flights and legs matters
  • It's not guaranteed a traveler participates in the entire trip

Among other things, you will be assessed on how closely your result matches our expected response -- including field names and the types of values, so please check your result against the sample responses.

Working with the Data

This assignment isn't intended to assess your ability to integrate external services, read from a database/file system, etc. Each of the services in the /api folder has a get method that provides a stubbed response.

External Dependencies

This assignment doesn't require any external dependencies. If you feel an external library is required please explain its benefit when submitting your solution. Also include the necessary package.json file.

Node Version

Your solution should run on the current LTS release of Node.js (currently ^12.13.0), and may utilize any features present in that release. If you are using a different version, please specify that in your package.json.

traveler-api's People

Contributors

dansteryoo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.