Git Product home page Git Product logo

disney-villains-api-'s Introduction

Disney Villain API

In this two part exercise you are tasked with create a REST API for accessing Disney Villain data, complete with test suite.

Part One

In the initial commit to this project, you have been provided with data for Disney villains. Your task is to implement an Express driven REST API that allows a user to retrieve this data. Your API should store its data in a database table and implement the routes defined below. Create a branch called part-one-answer to do this work in.

Requests and Expected Respones

Get All

GET http://localhost:1337/villains

Response

[{
  name: 'Captain Hook',
  movie: 'Peter Pan',
  slug: 'captain-hook',
},
... all other movies
]

Get By Slug (Should 404 when not found)

GET http://localhost:1337/villains/jafar

Response

{
  name: 'Jafar',
  movie: 'Aladdin',
  slug: 'jafar',
}

Create New

POST http://localhost:1337/villains

Body

{
  name: 'Red Skull',
  movie: 'Captain America: The First Avenger',
  slug: 'red-skull',
}

Response

{
  id: 21,
  name: 'Red Skull',
  movie: 'Captain America: The First Avenger',
  slug: 'red-skull',
  updatedAt: '2020-04-24T13:12:15.656Z',
  createdAt: '2020-04-24T13:12:15.656Z'
}

Part Two

In a branch called part-two-answer, continuing from your part-one-answer branch, you are tasked with creating a test suite for your API. You should have tests for each of your controller functions. These tests should cover both happy path as well as error cases.

disney-villains-api-'s People

Watchers

Connor M. Gerrits avatar Andre Petion 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.