Created
March 28, 2022 20:39
-
-
Save MrazTevin/9dd809f84bdbfbaae79dafd55df49908 to your computer and use it in GitHub Desktop.
Documentation for custom created API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMENT API is a custom made API, that enables you to add comments to the MYSQL Database. It displays the IP Address of | |
your client machine, together with your timezone in 'UTC' | |
BASE URL | |
Your Base URL is the unique address that enables you to access the provided endpoints. | |
https://blooming-mesa-56911.herokuapp.com/ | |
The Available Endpoints for the API are as follows : | |
Get all comments - GET /api/v1/comments | |
Get one comment - GET /api/v1/comments/2 | |
Create a comment - POST /api/comments | |
GET '/api/v1/comments' | |
Get comment data. | |
Sample Response: | |
{ | |
"id": 14, | |
"bookid": "90", | |
"comment": "People often claim to hunger for truth, but seldom like the taste when it's served up.", | |
"date_added": "Monday, 28-Mar-22 14:27:12 UTC", | |
"visitor": "10.1.89.58" | |
} | |
POST '/api/v1/comments' | |
Post a Comment. | |
Sample Response: | |
{ | |
"bookid": "90", | |
"comment": "People often claim to hunger for truth, but seldom like the taste when it's served up.", | |
"date_added": "Monday, 28-Mar-22 14:27:12 UTC", | |
"visitor": "10.1.89.58" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment