Andhromede / toktik_team_a

Evaluation toktik project (python API + front)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tiktok_team_a

Basic Tiktok clone

  • Visitors can only view Post
  • User can login or signup
  • User can create Posts and Comments
  • Post has Comments



Documentation



API

Dependencies


Install

conda create --name toktik
conda activate toktik
conda install python=3.10 pip
pip install uvicorn fastapi==0.100.0 SQLAlchemy pyjwt passlib psycopg2 hashlib

conda activate toktik
uvicorn api.src.main:app --reload

Endpoints


Post

GET /post/:id (get 1 Post)
Parameters
name type data type description
id required int post_id
Responses
http code content-type response
200 application/json Post
404 application/json Post does not exist
GET /post/random (get a random Post)
Responses
http code content-type response
200 application/json Post
GET /post/list (get all Posts)
Responses
http code content-type response
200 application/json Post
POST /post/create (create a new Post)
Parameters
name type data type description
title required str Title of Post
description optional str Description of Post
video_url required str URL of embedded video
user_id required int ID of author
Responses
http code content-type response
200 application/json Post
DELETE /post/delete/:id (Delete a Post)
Responses
http code content-type response
200 application/json Post
404 application/json Post does not exist
PATCH /post/update/:id (Partially update an existing Post)
Parameters
name type data type description
title optional str Title of Post
description optional str Description of Post
Responses
http code content-type response
200 application/json Post
404 application/json Post does not exist

Comment

GET /comment/:id (get 1 Comment)
Parameters
name type data type description
id required int comment_id
Responses
http code content-type response
200 application/json Comment
404 application/json Comment does not exist
GET /comment/list (get all Comments)
Responses
http code content-type response
200 application/json Comment
COMMENT /comment/create (create a new Comment)
Parameters
name type data type description
content required str Actual comment
author_id required str Author of comment
post_id required str Post the comment was made on
Responses
http code content-type response
200 application/json Comment
DELETE /comment/delete/:id (Delete a Comment)
Responses
http code content-type response
200 application/json Comment
404 application/json Comment does not exist
PATCH /comment/update/:id (Partially update an existing Comment)
Parameters
name type data type description
content optional str Actual comment
Responses
http code content-type response
200 application/json Comment
404 application/json Comment does not exist



Client

Dependencies

  • a
  • b

Install

[commands]

Run

[commands]

About

Evaluation toktik project (python API + front)


Languages

Language:Python 44.2%Language:HTML 28.7%Language:JavaScript 15.5%Language:CSS 11.6%