Available Endpoints:
/api/topics
Description:
Available Methods:
-
GET: /api/topics
Get a list of all topics
Example Response:
{ "topics": [ { "slug": "coding", "description": "Code is love, code is life" }, { "slug": "football", "description": "FOOTIE!" }, { "slug": "cooking", "description": "Hey good looking, what you got cooking?" } ] } -
POST: /api/topics
Add a new topic (coming soon)
/api/users
Description
Available Methods:
-
GET: /api/users
Get all users
/api/users/:username
Description:
Available Methods:
-
GET: /api/user/:username
Get the user information with given username
/api/articles
Description:
Available Methods:
-
GET: /api/articles
Get a list of all articles
Query Parameters:
Query Parameter Valid Arguments Description sort_by order "asc", "desc" topic -
POST: /api/articles
Post a new article (coming soon)
/api/articles/:article_id
Description:
Available Methods:
-
GET: /api/articles/:article_id
Get an article by its article ID
-
PATCH: /api/articles/:article_id
Update an article's vote count.
Accepting input in the format of { inc_votes: 1 }. Input must be an object that contains a property "inc_votes", with a number.
-
DELETE: /api/articles/:article_id
Delete an article with given article id (coming soon)
/api/articles/:article_id/comments
Description:
Available Methods:
-
GET: /api/articles/:article_id/comments
Get the comments of an article by its article ID
-
POST: /api/articles/:article_id/comments
Post a new comment under an article
/api/comments/:comment_id
Description:
Available Methods:
-
GET: /api/comments/:comment_id
Get a comment with given comment ID
-
PATCH: /api/comments/:comment_id
Update the votes on a comment with given comment ID
Accepting input in the format of { inc_votes: 1 }. Input must be an object that contains a property "inc_votes", with a number.
-
DELETE: /api/comments/:comment_id
Delete a comment