An open API service indexing awesome lists of open source software.

https://github.com/eocode/video-api_drf

Video API with DRF and Django
https://github.com/eocode/video-api_drf

api dev-containers django django-rest-framework docker drf rest-api video

Last synced: 5 months ago
JSON representation

Video API with DRF and Django

Awesome Lists containing this project

README

          

# 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

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

POST

```bash
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

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

PUT

```bash
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

```bash
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
```