Giter Site home page Giter Site logo

motion-backend's Introduction

The Motion Project

Project Description

Content of a Social Post

  • Title
  • Text content
  • Like count
  • Datetime when posted
  • User who posted

Endpoints

Auth & Registration

  • /api/auth/token/ POST: Get a new JWT by passing username and password
  • /api/auth/token/refresh/ POST: Get a new JWT by passing an old still valid refresh token.
  • /api/auth/token/verify/ POST: Verify a token by passing the access token in the body
  • /api/registration/ POST: Register a new user by asking for an email (send email validation code)
  • /api/registration/validation/ PATCH: Validate a new registered user with a validation code sent by email
  • /api/auth/password-reset/ POST: Reset users password by sending a validation code in an email
  • /api/auth/password-reset/validation/ PATCH: Validate password reset token and set new password for the user

Users

  • /api/users/?search=<str:search_string> GET: Get all the users or filter them by search string.
  • /api/users/<int:user_id>/ GET: Get specific user
  • /api/users/me/ GET, PATCH, DELETE: Get logged in user

Follow

  • /api/social/toggle-follow/<int:user_id>/ POST: Toggle following a user
  • /api/social/followers/followers/ GET: List of all the logged in user’s followers
  • /api/social/followers/following/ GET: List of all the users the user is following

Friends

  • /api/social/friends/request/<int:user_id>/ POST: Send friend request to another user
  • /api/social/friends/requests/<int:friend_request_id>/ GET,PATCH,DELETE: Get Update (Accept, Reject) or Delete an open friend request
  • /api/social/friends/requests/?status=<str:status> GET: List of all friend requests logged in user is in filtered by status
  • /api/social/friends/ GET: List all accepted friends¨

Posts

  • /api/social/posts/ GET,POST: user can make a new post by sending post data, or get all posts.
  • /api/social/posts/<int:post_id>/ GET, PATCH, DELETE: get a specific post by ID and display all the information about that post. Update or delete it if logged in user is the original poster
  • /api/social/posts/<int:user_id>/?search=<str:search_string> GET: lists all the posts of a specific user in chronological order
  • /api/social/posts/me/?search=<str:search_string> GET: lists all the posts of logged in user.
  • /api/social/posts/following/?search=<str:search_string> GET: lists all the posts of of users the logged in user is following.
  • /api/social/posts/friends/?search=<str:search_string> GET: lists all the posts of of users the logged in user is following.
  • /api/social/posts/toggle-like/<int:post_id>/ POST: toggle like a post
  • /api/social/posts/likes/ GET: the list of the posts the user likes

Comments

  • api/social/comments/<int:post_id>/ GET, POST: Create new post or get all comments of a post.

motion-backend's People

Contributors

amir-ag avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.