Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/paulo-lopes-estevao/tochallengetwitter


https://github.com/paulo-lopes-estevao/tochallengetwitter

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# 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

```json
{
}
```

### **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

```json
{
"name": 'paulo',
'telefone': '923453925',
'email': "[email protected]",
'password': '1234'
}
status : 201
```

```json
{
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

```json
{
"user": "ef5da2dc-3b46-4d30-92f2-154f6f75f1ad",
"description": "Olá primeiro tweets",
"midia": "/source/test.png",
"emoji": "",
"gif": ""
}

```

```json
{
False
} status : 404

```

> Method PUT

```json
{
"id": "59b26050-cf1f-4ae6-a017-c95aa7108bc9"
}

```

```json
{
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

```json
{
"tweet": "59b26050-cf1f-4ae6-a017-c95aa7108bc9",
"description": "Olá Retweets"
}

```

```json
{
False
} status : 404

```

> Method PUT

```json
{
"id": "ef5da2dc-3b46-4d30-92f2-154f6f75f1ad"
}

```

```json
{
False
} status : 404

```