Likes API

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

Creating likes

Creates a like on a post.

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

Parameters

Name

Type

Description

author_id

Integer

ID of the author who likes the post

Response

The response payload is an empty object.

{}

Deleting likes

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

Response

The response payload is an empty object.

{}

List likes

Fetches a list of all like information for a single post.

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

Response

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

Name

Type

Description

created_ts

Integer

Timestamp

author

Object

Information about authors who like the post

Note

author field has the same schema as 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": {}
        }
    },
    {
        ...
    }
]