POST /api/messages/:message_id/likes/:comment_id/likes

like a message

POST /api/messages/:message_id/comments/:comment_id/likes/:comment_id/likes

like a comment

Success Response Code: 201

Params

Param name Description
message_id
required

id for message


Value: Must be a Integer
comment_id
optional

id for comment


Value: Must be a Integer

Response Fields

like like object Like
id id of the like Integer
user user who created the like User
created_at time when the like was created DateTime
unlikable whether or not the viewing user can unlike the object Boolean
parent_likes_count Number of likes the object has Integer

Example Curl Commands

curl -X POST -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/messages/39/likes.json
curl -X POST -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/messages/407/comments/66/likes.json

Examples

POST /api/messages/40/likes.json
{}
201
{
  "like": {
    "id": 1,
    "user": {
      "id": 68,
      "name": "J'øhn62 D'øe62",
      "url": "https://socialcast.socialcast.test/users/68-j%C3%B8hn62d%C3%B8e62"
    },
    "created_at": "2017-09-21T13:30:27-07:00",
    "unlikable": true,
    "parent_likes_count": 1
  }
}