Git Product home page Git Product logo

twitter-clone's Introduction

Twitter Clone

Project Setup

The project backend has been implmented using Django-Rest-Framework and database used is RDBMS (MySQL). The code has been properly tested, and written in a generic manner. All the unit tests have been written in tests.py for each app[rest_auth and tweets]. Steps to setup the project on your machine-

  1. Create a virtual environment using command
    virtualenv venv -p python3
  1. Activate virtual environment using command
    source venv/bin/activate
  1. Install requirements using command
    pip install -r requirements.txt
  1. Create database in MySQL and save your database settings in local_settings.py(database, username and password)
  2. Now make migrations of project using command
    python manage.py makemigrations && python manage.py migrate
  1. Run Django server using command
    python manage.py runserver

All ready to go !

List of APIs and their functionalities (Note- Except login and signup, each request requires an authentication token[TWEET {token_value}])

API Request Body Method Description Response
[/rest_auth/signup/] (first_name, last_name, username, password, email, contact_number(in +91 format), country_code) POST User Sign up Authentication Token
[/rest_auth/login/] (username, password) POST User Login Authentication Token
[/rest_auth/logout/] No GET Logout User No
[/tweets/tweet/] (attachments[Multiple], description) POST Post tweet with attachments Tweet
[/tweets/tweet/[Tweet_id]/] No GET Retrieve Tweet Info Tweet
[/tweets/tweet/[Tweet_id]/] No DELETE Delete Tweet No
[/tweets/tweet/user/[User_id]/] No GET Get list of user's tweets [Tweets]
[/tweets/attachment/[Attachment_id]/] No GET Get attachment details Attachment
[/tweets/follow/[User_id]/] (is_follow) PUT Follow/Unfollow a User No
[/tweets/tweet/like/[Tweet_id]/] (is_like) PUT Like/Unlike a Tweet No
[/rest_auth/user/[User_id]/] No GET Get user's details User
[/tweets/tweet/retweet/post/[Tweet_id]/] (comment) POST Retweet a tweet No
[/tweets/tweet/retweet/user/[User_id]/] No GET Get user's retweets [Retweets]
[/tweets/tweet/retweet/read/[Retweet_id]/] No GET Read a retweet Retweet
[/tweets/tweet/retweet/delete/[Retweet_id]/] No DELETE Delete a retweet No

Postman Collection Link :)

https://www.getpostman.com/collections/0a1ef153f91b8b9663e3

twitter-clone's People

Contributors

codeit14 avatar dependabot[bot] 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.