Skip to content

miguelabfonseca/Alura-Challenge-Back-End-Week-3

Repository files navigation

Alura Challenge Week 3

About Alura Challenge Week 3

This week, the challenge will be to implement an authentication mechanism in the API, so that only authenticated users can interact with it.

In addition, it will also be necessary to deploy the API on some Cloud provider, such as Heroku.

API Working on: https://api.miguelfonseca.pt

Login API URI https://api.miguelfonseca.pt/apilogin

Test Login: Username: [email protected] Password: password


Alura Challenge API Description

POST Login https://api.miguelfonseca.pt/apilogin json { "email": "[email protected]", "password": "password" }

GET Get all videos https://api.miguelfonseca.pt/videos

GET Get all categorias https://api.miguelfonseca.pt/categories Authorization Bearer Token

GET Get one category https://api.miguelfonseca.pt/categories/2 Authorization Bearer Token

GET Get an error while trying to get inexistent category https://api.miguelfonseca.pt/categories/2322 Authorization Bearer Token

GET Get all videos https://api.miguelfonseca.pt/videos Authorization Bearer Token

GET Get all videos from a category https://api.miguelfonseca.pt/categories/2/videos Authorization Bearer Token

GET Get single video https://api.miguelfonseca.pt/videos/2 Authorization Bearer Token

GET Get an error while trying to get inexistent video https://api.miguelfonseca.pt/videos/2322 Authorization Bearer Token

POST Create new video https://api.miguelfonseca.pt/videos Authorization Bearer Token json { title category description url }

POST Create new category https://api.miguelfonseca.pt/categories Authorization Bearer Token json { title color }

POST Create new video with incomplete fields https://api.miguelfonseca.pt/videos Authorization Bearer Token json { description url }

POST Create new category with incomplete fields https://api.miguelfonseca.pt/categorias Authorization Bearer Token json { title }

PUT Update a video https://api.miguelfonseca.pt/videos/4 Authorization Bearer Token json { "title": "Como criar uma migration no laravel.", "description": "Como criar uma migration no Laravel, como definir a base de dados e criar os campos a partir das migrations.", "url": "https://www.youtube.com/link_atualizado" }

PUT Update a category https://api.miguelfonseca.pt/categorias/1 Authorization Bearer Token json { "title": "Sem Categoria", "color": "#cfcfcf" }

PUT Update a video with missing field https://api.miguelfonseca.pt/videos/4 Authorization Bearer Token json { "title": "Como criar uma migration no laravel.", "descricao": "Como criar uma migration no Laravel, como definir a base de dados e criar os campos a partir das migrations." }

PUT Update a category with missing field https://api.miguelfonseca.pt/categorias/4 Authorization Bearer Token json { "title": "VB" }

PUT Update an invalid video https://api.miguelfonseca.pt/videos/9239 Authorization Bearer Token json { "title": "Como criar uma migration no laravel.", "description": "Como criar uma migration no Laravel, como definir a base de dados e criar os campos a partir das migrations." }

PUT Update an invalid video category https://api.miguelfonseca.pt/categorias/992 Authorization Bearer Token json { "title": "C#", "description": "#fff" }

DEL Delete a video https://api.miguelfonseca.pt/videos/7 Authorization Bearer Token

DEL Delete a category https://api.miguelfonseca.pt/categorias/2 Authorization Bearer Token

GET Video search https://api.miguelfonseca.pt/videos?search=a Authorization Bearer Token Query Params search

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages