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 datacontent
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
- Creates a new post
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 |
id
is passed via the URL
- Returns all corresponding comments under a singular post
METHOD | ACTION | PARAMETERS |
---|---|---|
GET | Return all comments | post |
post
is passed via the URL
- Create a new comment
METHOD | ACTION | PARAMETERS |
---|---|---|
POST | Creates a new comment | user, post, content |
- 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 |
id
is passed via the URL
GET
call fromPost
table to display title, userid, datetime via/results?c=content&u=userid
- Sort as a function in javascript.
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. |
- User logs out
METHOD | ACTION | PARAMETERS |
---|---|---|
POST | Sends username and password | username , password. |