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 
{}
201
{
  "like": {
    "id": 1,
    "user": {
      "id": 56,
      "name": "J'øhn51 D'øe51",
      "url": "https://socialcast.socialcast.test/users/56-j%C3%B8hn51d%C3%B8e51"
    },
    "created_at": "2017-04-22T20:15:40-07:00",
    "unlikable": true,
    "parent_likes_count": 1
  }
}