This project involves creating a simple REST API for a social network, accompanied by an automated bot that demonstrates the system's functionalities based on predefined rules.
docker-compose -f docker/docker-compose.yml up --build
docker exec -it django_container bash
python manage.py createsuperuser
{
"number_of_users": 15,
"max_posts_per_user": 3,
"max_likes_per_user": 10
}
docker run --rm bot_container bash
python bot.py
- POST
/api/token/: Log in and receive a JWT token. - POST
/api/token/refresh/: Refresh the JWT token.
- POST
/api/auth/users/: Create a new user. - GET
/api/auth/users/me/: . - GET
/api/user_activity/: Retrieve information about the user's activity, including the last login time and the timestamp of the last request made to the service
- GET
/api/posts/: Retrieve a list of all posts. - POST
/api/posts/: Create a new post. - POST
/api/posts/{{last_post}}/like/: Like a specific post. - POST
/api/posts/{{last_post}}/unlike/: Unlike a previously liked post. - GET
/api/analytics/?date_from=2022-01-01&date_to=2024-12-31: Retrieve analytics data for the number of likes aggregated by day within the specified date range.