This project API Final Yatube created for publish, update, delete and read of information in the posts and comments. As well there implemented groups section and followers application posibilities. Applied features like Django and API, REST Django Framework as permissions, mixins, serializers, filters, viewsets, pagination, routers, serializers, relations, validators, as well applied JWT-token for authentication.
http://127.0.0.1:8000/api/v1/posts/ GET-request
[ { "id": 1, "author": "smart2004", "text": "qwerty", "pub_date": "2023-03-18T21:20:28.930072Z", "image": null, "group": 1 }, { "id": 2, "author": "admin", "text": "wertyu", "pub_date": "2023-03-18T21:53:43.820866Z", "image": null, "group": null } ]
http://127.0.0.1:8000/api/v1/posts/ POST-request
{ "text": "qwerty", "group": "1" }
{ "id": 3, "author": "smart2004", "text": "qwerty", "pub_date": "2023-03-20T22:02:03.986440Z", "image": null, "group": 1 }
http://127.0.0.1:8000/api/v1/posts/{id}/ GET-request
{ "id": 1, "author": "smart2004", "text": "qwerty", "pub_date": "2023-03-18T21:20:28.930072Z", "image": null, "group": 1 }
http://127.0.0.1:8000/api/v1/posts/{id}/ PUT-request
{ "text": "qwerty ytrewq", "group": "1" }
{ "id": 1, "author": "smart2004", "text": "qwerty ytrewq", "pub_date": "2023-03-18T21:20:28.930072Z", "image": null, "group": 1 }
http://127.0.0.1:8000/api/v1/posts/{id}/ PATCH-request
{ "text": "qwerty" }
{ "id": 1, "author": "smart2004", "text": "qwerty", "pub_date": "2023-03-18T21:20:28.930072Z", "image": null, "group": 1 }
http://127.0.0.1:8000/api/v1/posts/{id}/ DELETE-request
[]
For further details please refer: http://127.0.0.1:8000/redoc/
git clone [email protected]:smart2004/api_final_yatube.git
cd yatube_api
py -3.9 -m venv venv
source venv/scripts/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver