Giter Site home page Giter Site logo

backend-rose-api-thecary's Introduction

Rose API-thecary (A locally sourced, hand-crafted API)

Demo

Link to Demo

Getting Started

Use this template to get started.

Learning Objectives

  • Use a GET route in Express to retrieve a list of related resources from a Postgres database

Description

Welcome to Rose API-thecary. A locally-sourced hand-crafted API which returns lists of Characters, Episodes and Quotes from the instant-classic show Schitt's Creek. You have been provided with some seed data and the skeleton Model files but you will need to add controllers and add static model methods for retrieving the data to meet the acceptance criteria.

Work one route at a time -- remove the .skip from the test and get the test to pass. Then ACP. You should end up with at least 3 commits - 1 for each route and your CI should be passing on each commit.

Acceptance Criteria

  • Users should be able to view a list of Episodes at /episodes -- episode data should include a nested array of quotes and have the following shape
{
  id: '3',
  title: 'New Car',
  season: 3,
  number: 303,
  quotes: [
    {
      id: 3,
      detail: "I dont want to be taken advantage of because I'm overdressed.",
      character_id: 2,
    },
  ],
}
  • Users should be able to view a list of Characters at /characters - character data should include a nested list of quotes and have the following shape
{
  id: '1',
  first_name: 'Moira',
  last_name: 'Rose',
  quotes: [
    {
      id: 1,
      detail:
        'What you did was impulsive, capricious, and melodramatic. But, it was also wrong.',
      character_id: 1,
    },
  ],
}
  • All tests are passing

Rubric

Task Points
At least 2 commits, one per route 2
GET /episodes route 4
GET /characters route 4
Minus 1 for each failed test -1

Stretch Goal (+2 points)

  • Users should be able to add a new Quote to the database via a POST route to /quotes. The request body should have the following shape:
{
  character_id: 3,
  episode_id: 6,
  detail: "Okay, I have never heard someone say so many wrong things, one after the other, consecutively, in a row."
}

backend-rose-api-thecary's People

Contributors

emilysellers avatar

Watchers

 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.