real-python-drf/README.md

788 B

README

This is a practice repository following Test Driven Development of a Django RESTful API

RESTful Structure

In a RESTful API, endpoints (URLs) define the structure of the API and how end users access data from our application using the HTTP methods - GET, POST, PUT, DELETE. Endpoints should be logically organized around collections and elements, both of which are resources.

In our case, we have one single resource, puppies, so we will use the following URLS - /puppies/ and /puppies/ for collections and elements, respectively

Routes and TDD

Process for development:

  1. Create skeleton code that doomed to fail
  2. Add a unit test for failure
  3. Update the code to make it pass the test.