Run api

pip install -r requirements.txt,
python manage.py makemigrations,
python manage.py migrate
python3 manage.py runserver 0.0.0.0:7000

Run api with docker

docker-compose up -d

Endpoints

Default

  • default (Read the first observation on top of this doc)
Method Endpoint Communication
GET / REST

Response
{
}

User

  • registro usuário usando nick único e senha
Method Endpoint Description BP QP
GET /v1/users It returns the details of all user
POST /v1/users It enter new user
On Success On Error
{
  "name": 'paulo',
  'telefone': '923453925',
  'email': "jhon@gmail.com",
  'password': '1234'
}
status : 201
{
  False
} status : 404

Tweet

  • Tweet (Criação / remoção)
  • Like / deslike
Method Endpoint Description Communication
GET /v1/tweets It returns the details of all user REST
POST /v1/tweets It post new tweets REST
PUT /v1/tweets/like It Like or dislike REST
> Method POST
On Success On Error
{
  "user": "ef5da2dc-3b46-4d30-92f2-154f6f75f1ad",
  "description": "Olá primeiro tweets",
  "midia": "/source/test.png",
  "emoji": "",
  "gif": ""
}
{
  False
} status : 404
> Method PUT
{
  "id": "59b26050-cf1f-4ae6-a017-c95aa7108bc9"
}
{
  False
} status : 404

Retweet

  • Retweet Diferencial
  • Like / deslike
Method Endpoint Description Communication
GET /v1/retweets It returns the details of all retweets REST
POST /v1/retweets It post retweets REST
PUT /v1/retweets/like It Like or dislike REST
> Method POST
On Success On Error
{
  "tweet": "59b26050-cf1f-4ae6-a017-c95aa7108bc9",
  "description": "Olá Retweets"
}
{
  False
} status : 404
> Method PUT
{
  "id": "ef5da2dc-3b46-4d30-92f2-154f6f75f1ad"
}
{
  False
} status : 404