Likes API

The likes API supports creating and deleting likes, as well as fetching information of likes on posts from site.

Creating likes

Creates a like on a post.

POST /api/1.3/posts/<post_id>/likes


Name Type Description
author_id Integer ID of the author who likes the post


The response payload is just an empty object.


Deleting likes

DELETE /api/1.3/posts/<post_id>/likes/<author_id>


As same as for creating likes, the response payload is an empty object.


List likes

Fetches a list of likes information for a post.

GET /api/1.3/posts/<post_id>/likes


The response is an array of objects having the following fields:

Name Type Description
created_ts Integer Timestamp
author Object Information about authors who like the post


author field has the same schema encountered in Authors API.

        "created_ts": 1566228955,
        "author": {
            "id": <id>,
            "name": "andreabreanna",
            "displayname": "Andrea Breanna",
            "about_html": "This is me",
            "bio": "",
            "photo": "https://<domain>/res/avatars/default",
            "fb_id": null,
            "profile_url": "https://<domain>/u/andreabreanna/",
            "specific_data": {}