API for Social Network is a social network API project with opportunities of posting, commenting and following.
- Python,
- Django,
- DRF,
- JWT (Djoser)
- Git Clone
- Python 3.7+ is necessary
- installing requirements.txt list is necessary
pip install -r requirements.txt
- Project run:
python manage.py runserver
It is necessary to be authorized to make changes
GET api/v1/posts/ - Get posts list
GET api/v1/posts/{id}/ - Get ID only post
GET api/v1/groups/ - Get list of communities
GET api/v1/groups/{id}/ - Get ID only communities
GET api/v1/{post_id}/comments/ - Get post comments
GET api/v1/{post_id}/comments/{id}/ - Get ID only comments
- Create post:
POST /api/v1/posts/
{
"text": "string",
"image": "string",
"group": 0
}
- Update post:
PUT /api/v1/posts/{id}/
{
"text": "string",
"image": "string",
"group": 0
}
- Partial post update:
PATCH /api/v1/posts/{id}/
{
"text": "string",
"image": "string",
"group": 0
}
- Delete post:
DEL /api/v1/posts/{id}/
- Follow:
GET /api/v1/follow/
- Pagination:
GET /api/v1/posts/?limit=10&offset=0
Vladimir Zakharov // [email protected]