Skip to content

A pet project where I use Django, Django Rest Framework and Celery+Flower+Redis.

Notifications You must be signed in to change notification settings

Konark-Web/django-rest-api-social-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object of this task is to create a simple REST API use DRF. The project also uses Celery+Flower and Redis to send messages.

Basic models:

  • User
  • Post (always made by a user)

Basic Features:

  • user signup
  • user login
  • post creation
  • post like
  • post unlike
  • analytics about how many likes was made. Example url /api/analitics/?date_from=2020-02-02&date_to=2020-02-15 . API should return analytics aggregated by day.
  • user activity an endpoint which will show when user was login last time and when he mades a last request to the service.

Requirements:

  • Implement token authentication (JWT is prefered)

Endpoints:

  • /api/posts (GET) - get all posts
  • /api/posts/ (GET) - get single post by id
  • /api/posts//like (POST) - like or unlike post by id
  • /api/post-create/ (POST) - create new post
  • /api/create-user/ (POST) - registration endpoint
  • /api/authenticate/ (POST) - authentication for get token by email and password
  • /api/analytics/?date_from=2021-02-02&date_to=2021-11-10 (GET) - analytics about how many likes was made. API return analytics aggregated by day. date_from is required parameter.

Response examples:

https://gist.github.com/Konark-Web/e9961fea2709b0b58a31b6d89358f0c2

About

A pet project where I use Django, Django Rest Framework and Celery+Flower+Redis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published