Skip to content

eocode/Video-API_DRF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API

Build with dev container in VsCode

Objective: Test Dev Containers in VsCode with an app in Django and DRG for development

DEMO

How to test?

GET

curl http://localhost:8000/api/v1/videos

POST

curl -X POST http://localhost:8000/api/v1/videos -H "Content-Type: application/json" -d '{"title": "Nuevo Video", "description": "Una breve descripcion", "slug": "nuevo-video"}'

GET Id

curl http://localhost:8000/api/v1/videos/1 -I

PUT

curl -X PUT http://localhost:8000/api/v1/videos/2 -H "Content-Type: application/json" -d '{"title": "Nuevo título", "description": "Una nueva descripcion", "slug": "nuevo-video"}'

DELETE

curl -X DELETE http://localhost:8000/api/v1/videos/2

How to use?

Run VsCode Dev Containers and type:

pip install -r requirements.txt
python manage.py runserver