Skip to content

Backend API Comment

fujishig2 edited this page Apr 1, 2021 · 6 revisions

Comment

/service/author/{AUTHOR_ID}/posts/{POST_ID}/comment/ returns a list of all comments from that post with post_id and post a comment to that post with post_id

  • Request Method: GET
  • Example Response
{
    "type": "comment", 
    "author": {
        "type": "author",
        "id": "d1df0f23-cd4f-4875-b79b-dca706093b89",
        "host": "http://localhost:8000/",
        "displayName": "goatjames",
        "url": "somerandomUrl for now",
        "github": ""
    },
    "comment": "goat post lebron",
    "contentType": "text/markdown",
            "published": comment.published,
            "id": comment.id,      
}

/service/author/{AUTHOR_ID}/posts/{POST_ID}/comment/ Post a comment to a specific post. AUTHOR_ID will be the author id of the comment.

  • Request Method: POST
  • Example Body
{
     "comment": "Hello World!"
}

Clone this wiki locally