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 API

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

Login API

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

Author API

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 API

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

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

Clone this wiki locally