Skip to content
Fraser Redford edited this page Mar 28, 2021 · 8 revisions

Welcome to the CMPUT404-project-socialdistribution wiki!

This is the Distributed Social Networking Project for CMPUT 404.

The following API urls are accepted, do with this as you need to.

Register

  • POST api/auth/register will create a user (author_register)

Login

  • POST api/auth/login will handle a user login request (author_login)

Author

  • GET author/<str:id>/ will retrieve an author given an author ID (author_object)
  • POST author/<str:id>/ will update an author given an author ID (author_object)
  • GET api/authors will return a list of all authors registered with the server (author_list)

Posts

  • GET author/<str:author_id>/posts/ will return all posts by a given author ID (posts_object)
  • POST author/<str:author_id>/posts/ will create a new post (posts_object)
  • GET author/<str:author_id>/posts/<str:id>/ will retrieve a post given an author ID and post ID (post_object)
  • POST author/<str:author_id>/posts/<str:id>/ will allow an update to be performed on post data (post_object)
  • DELETE author/<str:author_id>/posts/<str:id>/ will delete allow the author of the post to delete their post (post_object)
  • PUT author/<str:author_id>/posts/<str:id>/ will create a post given an author ID and a post ID (post_object)

Comments

  • GET author/<str:author_id>/posts/<str:post_id>/comments will return all of the comments for a given post ID (comments_object)
  • POST author/<str:author_id>/posts/<str:post_id>/comments will create a comment on a given post ID (comments_object)

Likes

  • GET author/<str:author_id>/post/<str:post_id>/likes will return all likes for a given post ID (likes_post)
  • GET author/<str:author_id>/post/<str:post_id>/comments/<str:comment_id>/likes will return all likes for a given comment ID (likes_comment)

Liked

  • GET author/<str:author_id>/liked will return all objects that an author liked (liked_list)

Clone this wiki locally