Skip to content

API Documentation

Fraser Redford edited this page Mar 29, 2021 · 43 revisions

The following API endpoints can be used to access the Konnect server.

Register

  1. POST will handle creating a user: api/auth/register

Login

  1. POST will handle a user login: api/auth/login

Author

author/<str:id>/

  1. GET an author's profile by ID
  2. POST update an author's profile

authors

  1. GET all author's on the server

Post

author/<str:author_id>/posts/

  1. GET will return all posts by a given author
  2. POST will create a new post for the given author

author/<str:author_id>/posts/<str:id>/

  1. GET will return a specific post by a given author
  2. POST will update a specific post by a given author
  3. DELETE will delete a specific post by a given author
  4. PUT will create a post for a specific post ID by a given author

author/<str:author_id>/inbox

  1. POST will create a post to a specific author

Comments

author/<str:author_id>/posts/<str:post_id>/comments

  1. GET will return all of the comments for a given post
  2. POST will create a comment for a given post

`author/str:author_id/inbox

  1. POST will send a comment to the inbox of the post author

Likes

author/<str:author_id>/post/<str:post_id>/likes

  1. GET will return all of the likes for a given post

author/<str:author_id>/post/<str:post_id>/comments/<str:comment_id>/likes

  1. GET will return all of the likes for a given comment

author/<str:author_id>/inbox

  1. POST will create a like on a given post/comment

author/<str:author_id>/liked

  1. GET will return all objects that an author liked

Follows

author/<str:author_id>/followers

  1. GET will return a list of followers for a given author

author/<str:author_id>/followers/<str:foreign_id>

  1. GET will check if the foreign author is following the given author

  2. PUT will create set the foreign author to follow the given author

  3. DELETE will delete the follow of a foreign author to the given author

Friends

author/<str:author_id>/followers/<str:foreign_id>

  1. GET will return a list of friends for a given author

Inbox

author/<str:author_id>/inbox

  1. GET will return all of the inbox items for a given author

Clone this wiki locally