Skip to content

harshit447/Social_Media_Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social_Media_Api

This repository contains a REST API built with Python Django and Django REST Framework. It allows users to create an account, log in, and perform CRUD (Create, Read, Update, Delete) operations on posts and comments.

Installation

Clone this repository to your local machine

Navigate to the project directory.

cd Social_Media_Api

Install the required dependencies.

pip install -r requirements.txt

Run the server.

python manage.py runserver

The server will be running at http://127.0.0.1:8000/.

API Endpoints

Authentication

api/auth/register/ -

Register a new user account

api/auth/login/ -

Obtain a JWT token by passing a valid username and password

Posts

api/posts/ -

List all posts or create a new post (requires authentication)

api/posts/{id}/ -

Retrieve, update or delete a specific post by ID (requires authentication)

api/posts/{id}/like/ -

Like or unlike a specific post by ID (requires authentication)

Comments

api/posts/{id}/comments/ -

List all comments for a specific post or create a new comment (requires authentication)

api/posts/{id}/comments/{id}/ -

Retrieve, update or delete a specific comment by ID (requires authentication)

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy