👉 LIVE DE HOJE:
➡ SUGESTÕES DE APIS QUE PODEMOS CRIAR:
In-memory key-value store
Tinder
Tinder para linguagens de programação
Youtube
Notícias
Música
Instagram
Facebook
Uber
iFood
ToDo
➡ O que é API? (Application Programming Interface)
➡ APIs públicas/privadas
➡ Verbos HTTP (GET, POST, PUT, PATCH, DELETE, HEAD, etc)
➡ Padrões: SOAP, REST, GraphQL, etc.
➙ REST: 7 endpoints por resource (recurso) ➙ RESTful
GET index (lista)
GET show (detalhes)
GET new
POST create
GET edit
PATCH/PUT update
DELETE destroy
➡ Modo --api
➡ Cliente (app) que vamos usar para consumir a API: https://insomnia.rest/
➡ http://www.railsstatuscodes.com/
➡ Códigos HTTP:
1xx (Informational): The request was received, continuing process
2xx (Successful): The request was successfully received, understood and accepted
3xx (Redirection): Further action needs to be taken in order to complete the request
4xx (Client Error): The request contains bad syntax or cannot be fulfilled
5xx (Server Error): The server failed to fulfill an apparently valid request
➡ https://jsonapi.org/
👉 Código (que virou um PR) desenvolvido durante a LIVE:
▪ https://github.com/lucascaton/tindev/...
👉 Gostou desse vídeo? Entre no meu canal do Telegram para receber mais conteúdo: https://www.lucascaton.com.br/telegram/