nodejs代写: Backend Take-Home

Backend Take-Home

Introduction

Udacity exposes its course offerings to internal and external clients via the catalog API. In this API, courses are first class entities and can be queried directly (via their node key), whereas related data, like the instructors, affiliates and projects, is embedded in the course data.

While this denormalized format is convenient for our current use cases, one could envision use cases in which it would be helpful to treat some of this related data, in this case the instructors, as the basis for our queries. For this assignment, your task will be to design and implement an HTTP instructor API that wraps the catalog API and exposes data about the course instructors.

Our intention is for this assignment to take most people between 3-5 hours. If you find that you’re exceeding that time, please feel free to just send us what you have and let us know which parts were most time consuming (as well as what you didn’t get to, but would do if you had longer to work on it).

Part 1: Catalog API

The first task is to explore the catalog API and get a sense of the data that’s available about courses, instructors and other related entities.

API Conventions

The primary identifier for a course offering is the node key (sometimes referred to as the key), which is typically two or more letters, followed by three or more digits (ex. or ). These node keys are also grouped into tracks, which allow for querying of

courses by category. Endpoints

Tracks

https://catalog-api.udacity.com/v1/tracks

Courses

https://catalog-api.udacity.com/v1/courses

https://catalog-api.udacity.com/v1/courses/ud836

Hints

Nanodegrees (sometimes written as degrees or NDs) are a separate product offering (with their own endpoints in the catalog API). You can ignore them for the purposes

of this assignment.

Deliverable None

Part 2: Instructor API Design

Now that you have a sense of what properties and relationships can be derived from the catalog API response, your next task is to design an API to expose this data, as it relates to instructors.

This API should be intended for consumption by web/mobile/desktop clients and should be exposed via HTTP.

Example Uses

Here are some examples of potential consumers for the API. Please note that you’re not expected to build the client, they’re just here to help you think about how other developers might utilize your API.

A section on a course overview page (example: https://www.udacity.com/course/android-basics-user-input–ud836) that links to other courses by the same instructor
A landing page that showcases all of our instructors for courses in the Android track

Hints

Don’t get too bogged down by providing lots of extra information. We care more about providing a robust implementation for these two use cases than a comprehensive API.

Deliverable

Write up some basic documentation for your API. It doesn’t have to be polished enough to offer the API to external consumers, but should be enough for us to understand your

thought process and run a few example queries.

Please also include examples of the API calls that would be required to implement the two use cases above.

Part 3: Instructor API Implementation

The third part of the assignment is to create a working version of your API, based on the actual data from the catalog API. It’s fine to not worry too much about performance at this point, but be explicit about what would or wouldn’t work in a production (or team) setting.

Hints

Perfect is the enemy of done. We want to see how you approach the problem and a working model of how you transform the data from the catalog API; not whether you can make it handle thousands of requests per second.

Deliverable
In addition to sending us your code, please include a text or markdown file telling us:

What we need to know to get your code to run How long you spent on the assignment