Simples API para cadastro de cursos e avaliação de cursos.
Instale school-api com docker
git clone https://github.com/isaias0rt0n/school-api.git
cd school-api
docker-compose up
Rodando as migrations
docker-compose exec app python manage.py makemigrations
docker-compose exec app python manage.py migrate
Para rodar os testes, rode o seguinte comando
- Lembrando de configurar no
settings.py
a autenticação para TokenAuthentication
python test_pytest.py
Deploy do Projeto na AWS/Azure
Coming soon!
POST http://localhost:8000/api/users/
curl --request POST \
--url http://localhost:8000/api/users/ \
--header 'Content-Type: application/json' \
--data '{
"username": "user_1",
"password": "123456789"
}'
{
"username": "user_1"
}
Campos: grant_type, client_id, client_secret, username, password, scope
curl -X POST \
--data '{"grant_type": "password", "client_id": "", "client_secret": "", "username": "", "password": <>, "scope": "write"}' \
> --header 'Content-Type: application/json' \
> --url http://localhost:8000/o/token/
{
"access_token": "6gMqKXWD9n0JX9r7WQ4GI955CBw14A",
"expires_in": 36000,
"token_type": "Bearer",
"scope": "write",
"refresh_token": "QUoIDI2HqTh0Zge3OK0rbNR7SoohBC"
}