API service for working with the YaTube application
Clone the repository and change into it on the command line:
git clone https://github.com/VladBorisof/api_final_yatube.git
cd api_final_yatube
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
pip install -r requirements.txt
python3 manage.py migrate
python3 manage.py runserver
run to get posts:
GET http://127.0.0.1:8000/api/v1/posts/
run to create posts:
POST http://127.0.0.1:8000/api/v1/posts/
with body
{ "text": "post 1" }
run to get groups:
GET http://127.0.0.1:8000/api/v1/groups/
run to create comments for first post:
POST http://127.0.0.1:8000/api/v1/posts/1/comments/
with body
{ "text": "comment for post", "post": 1 }