Available on LucidChart
Responses are formatted as JSON objects.
Returns a list of ordered posts that match the query parameters
Returns all posts by default and a blank JSON object if no posts meet the query
METHOD
ACTION
PARAMETERS
GET
Return search results
username, content, order
username is strict and requires exact data
content returns all posts which contain the query string
List is ordered chronically showing old posts first by default, pass order=1 to reverse the order
METHOD
ACTION
PARAMETERS
POST
Creates a new post
user, title, content
RUD functionalities for a singular post
METHOD
ACTION
PARAMETERS
GET
Returns a single post
id
PATCH
Partially updates an existing post
id, user, title, content, likes
PUT
Edits an existing post
id, user, title, content, likes
DELETE
Deletes an existing post
id
post/comments/<integer:post_id>
Returns all corresponding comments under a singular post
METHOD
ACTION
PARAMETERS
GET
Return all comments
post
post is passed via the URL
comment/create
METHOD
ACTION
PARAMETERS
POST
Creates a new comment
user, post, content
comment/<integer:comment_id>
RUD functionalities for a singular comment
METHOD
ACTION
PARAMETERS
GET
Returns a single comment
id
PATCH
Partially edits an existing comment
id, user, post, content, likes
PUT
Edits an existing comment
id, user, post, content, likes
DELETE
Deletes an existing comment
id
GET call from Post table to display title, userid, datetime via /results?c=content&u=userid
Sort as a function in javascript.
Authentication ( By Djoser Token Based)
NOTE: If Authetication by simple jwt , use their documentation
In the Format : auth/< JWT URL >
User Sign-up (Addition to database)
METHOD
ACTION
PARAMETERS
POST
Adds the username and password
username , password
Creates a token for the user
METHOD
ACTION
PARAMETERS
POST
Sends username for authentication
username , password.
METHOD
ACTION
PARAMETERS
POST
Sends username and password
username , password.