Skip to content

Like API

alexbali edited this page Apr 1, 2021 · 3 revisions

service/author/{author_id}/post/{post_id}/likes - GET a list of likes from other authors on author_id’s post post_id

  • Request Method: GET
  • Example Response
{
    "likes": [
        {
            "@context": "www.google.com",
            "summary": "goatjames likes your post",
            "type": "Like",
            "author": {
                "type": "author",
                "id": "21c18158-5fa3-45c4-b12b-bd0f5dd071d5",
                "host": "http://localhost:8000/",
                "displayName": "goatjames",
                "url": "somerandomUrl for now",
                "github": ""
            },
            "object": "www.google.com"
        }
    ]
}

service/author/{author_id}/post/{post_id}/comments/{comment_id}/likes - GET a list of likes from other authors on author_id’s post post_id comment comment_id

  • Request Method: GET
  • Example Response
{
    "likes": [
        {
            "@context": "www.google.com",
            "summary": "goatjames likes your comment",
            "type": "Like",
            "author": {
                "type": "author",
                "id": "21c18158-5fa3-45c4-b12b-bd0f5dd071d5",
                "host": "http://localhost:8000/",
                "displayName": "goatjames",
                "url": "somerandomUrl for now",
                "github": ""
            },
            "object": "www.google.com"
        }
    ]
}

service/author/{author_id}/liked - GET list what public things author_id liked.

  • Request Method: GET
  • Example Response
{
    "type": "liked",
    "items": [
        {
            "@context": "www.google.com",
            "summary": "goatjames likes your post",
            "type": "Like",
            "author": {
                "type": "author",
                "id": "21c18158-5fa3-45c4-b12b-bd0f5dd071d5",
                "host": "http://localhost:8000/",
                "displayName": "goatjames",
                "url": "somerandomUrl for now",
                "github": ""
            },
            "object": "www.google.com"
        },
        {
            "@context": "www.google.com",
            "summary": "goatjames likes your comment",
            "type": "Like",
            "author": {
                "type": "author",
                "id": "21c18158-5fa3-45c4-b12b-bd0f5dd071d5",
                "host": "http://localhost:8000/",
                "displayName": "goatjames",
                "url": "somerandomUrl for now",
                "github": ""
            },
            "object": "www.google.com"
        }
    ]
}

Clone this wiki locally