Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulo-lopes-estevao/tochallengetwitter
https://github.com/paulo-lopes-estevao/tochallengetwitter
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulo-lopes-estevao/tochallengetwitter
- Owner: Paulo-Lopes-Estevao
- Created: 2021-11-25T21:11:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T20:28:32.000Z (9 months ago)
- Last Synced: 2024-04-05T21:30:02.835Z (9 months ago)
- Language: Python
- Size: 43.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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```