To install simply clone this repo and run pip install -r requirements.txt
. Then apply the migrations.
Start server and run python bot.py
script for short showcase of the api routes.
POST api/jwtauth/register/
- register new user. Params:username
,email
,password
,password_repeat
.POST api/jwtauth/login/
- obtainaccess
andrefresh
tokens. Params:username
,password
.POST api/jwtauth/refresh/
- get refreshedaccess
token. Params:refresh
token.POST api/posts/
- create new post. Params:title
,content
.GET api/posts/
- list all posts.GET api/posts/<int:post_id>/like/
- like or unlike post.GET api/analytics/user/<int:pk>/
- show time of user's last login and request to the api.GET api/analytics/likes/
- show amount of likes aggregated by day. Optionaly?date_from=&date_to=
can be passed via url to specify range of days.