Challenge Overview
Challenge Objectives
-
Update an existing nodejs api wrapper with additional endpoints
-
Provide debug statements
Project Background
-
The overall project is about creating an Amazon Alexa Skill for allowing users to know more about cinemas located near them and the movies playing in the cinemas
-
The skill allows users to also book movie tickets
-
This wrapper is essentially a nodejs module that calls apis. The module can be used by other modules, where instead of making direct requests to the apis, the modules in turn call the functions exposed by the wrapper that do the same task but make it easier to maintain and read.
Technology Stack
-
Nodejs version 10
Code access
The code will be shared in the contest forum. You need to update it as part of this contest
Individual requirements
Update an existing nodejs api wrapper with additional endpoints (Major Requirement)
-
The following apis need to be added to the wrapper, with the wrapper exposing functions that can be called instead of the apis:
-
POST /api/Booking/CreateSession
-
POST /api/Booking/CancelSession
-
GET /api/ticketing/availableTickets/{BookingSessionId}
-
POST /api/ticketing/selectTickets
-
GET /api/seating/getLayout/{bookingSessionId}
-
POST /api/Seating/SelectSeats
-
POST /api/Booking/Complete
-
GET /api/Orders/Summary/{externalOrderId}
-
GET api/Orders/BookingSession/{bookingSessionId}
-
-
You need to provide documentation for the new apis, in the same manner as the documentation for the existing apis.
Provide debug statement (Minor Requirement)
-
At the moment, we don’t have any debug statements in the wrapper
-
Provide debug statements for the following:
-
When a function is called, log the function name and the parameters for the function (non header and auth values)
-
When an api call completes (success or failure), log the http status code of the api
-
Deployment guide and validation document
There is no deployment guide for the wrapper. We instead have documentation on how to use the wrapper and call the different functions. You are expected to update it. This is major requirement.
Important Notes
-
Follow existing conventions used in the wrapper
-
Ensure there are no lint errors
-
You need to update the tests too. Note that you will not test the api, but you will be testing the wrapper.
Final Submission Guidelines
You can submit a git patch or the entire code base inside a zip file.