real-python-drf/README.md

16 lines
788 B
Markdown
Raw Normal View History

2020-10-21 14:25:17 +11:00
# README
This is a practice repository following [Test Driven Development of a Django RESTful API](https://realpython.com/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/<id> 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.