Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kartikayakulshrestha/blog-django-backend-api


https://github.com/kartikayakulshrestha/blog-django-backend-api

Last synced: 24 days ago
JSON representation

Awesome Lists containing this project

README

        

Blogging Restfull API

BASE API

```markdown
| METHODS | Routes |
| GET | http://127.0.0.1:8000/api/v1 |

```

USER CREATION / DELETION / UPDATION / READING

```markdown
| METHODS | Routes |
| GET | http://127.0.0.1:8000/api/v1/users | List of all users
| GET | http://127.0.0.1:8000/api/v1/users/{id} | Unique user which are registered
| DELETE | http://127.0.0.1:8000/api/v1/users | Delete User
| GET | http://127.0.0.1:8000/api/v1/users/{id}/blogs/ | Blogs which are related to userid
| POST | http://127.0.0.1:8000/api/v1/users/ | CREATION OF USER
| PUT | http://127.0.0.1:8000/api/v1/users/{id}/ | to change anything in users
| POST | http://127.0.0.1:8000/api/v1/users/login | cookies creation
| GET | http://127.0.0.1:8000/api/v1/users/logout | deletion of cookie
```

Blog (PAGINATION UNABLED)

```markdown
| METHODS | Routes |
| GET | http://127.0.0.1:8000/api/v1/blog/ | READ BLOGS (with pagination + like count + comment count )
| POST | http://127.0.0.1:8000/api/v1/blog/ | CREATE OF BLOG
| PUT | http://127.0.0.1:8000/api/v1/blog/{id} | MODIFICATION of Blog
| DELETE | http://127.0.0.1:8000/api/v1/blog/{id} | DELETION OF BLOG
| GET | http://127.0.0.1:8000/api/v1/blog/{id} | (5 latest comment)
| POST | http://127.0.0.1:8000/api/v1/blog/{id}/likes/ | like or unlike (you need to be logged in)
| GET | http://127.0.0.1:8000/api/v1/blog/{id}/likes/ | list of user ids (you need to be logged in)
| POST | http://127.0.0.1:8000/api/v1/blog/{id}/comments/ | comments creation to specific blog id (you need to be logged in)
| GET | http://127.0.0.1:8000/api/v1/blog/{id}/comments/ | comments lists to specific blog id (you need to be logged in)
```