Challenge Overview
Challenge Objectives
-
Update an existing nodejs api wrapper with additional endpoints
-
Update one existing api wrapper endpoint based on updates to the actual api
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/Loyalty/Login
-
POST /api/Loyalty/RefreshSession
-
POST /api/Loyalty/Logout
-
POST /api/Loyalty/Profile
-
POST /api/Loyalty/PasswordReset
-
POST /api/Booking/ExtendSession
-
-
Each api is defined in a swagger specification which will be shared in the contest forum
-
You need to provide documentation for the new apis, in the same manner as the documentation for the existing apis.
Update the existing api wrapper endpoint based on updates to the actual api (Minor Requirement)
-
The api wrapper provided already has existing methods for other apis.
-
For the Booking - create booking wrapper method, update both the wrapper sample code and the documentation for the api to match the details in the specification, namely, update the request body in the documentation to contain the customerDetails (definition already exists under /docs/CustomerDetails.md)
Provide debug statement (Minor Requirement)
-
For the new endpoints that will be added in this contest, you need to ensure that the debug statements work
-
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 a major requirement.
Important Notes
-
Follow existing conventions used in the api
-
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 (Do a git init and git commit of the provided code and then generate patch of your changes) or the entire code base inside a zip file.