Likes¶
Add new like¶
-
POST/api/likes/(string: post_type)/(int: post_id)/add¶ Parameters: - post_type (string) – topic | comment
- post_id (integer) – the post_id
- role (string) – participant | user
- participant_id (integer) – the participant Id
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8
[
{
"response_code": 1000,
"data": {
"likes": {
"id": "368",
"user_id": "1",
"post_id": "138",
"type": "topic",
"role": "participant"
}
},
"system": {
"created_at": "2017-01-23 10:28:30",
"signature": "22a017e845d5ac693009f434cd88190317b59255",
"message": "Success"
}
}
]
Get Like by User / Participant¶
-
GET/api/likes/(string: post_type)/(int: post_id)/(int: participant_id)/(string: role)¶ Parameters: - post_type (string) – topic | comment
- post_id (integer) – the post_id
- participant_id (integer) – participant_id
- role (string) – participant | user
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8
[
{
"response_code": 2000,
"data": {
"likes": 1
},
"system": {
"created_at": "2017-01-23 12:38:49",
"signature": "b2be8ffc9fab6d7085aa3b0e71bb3e8f7cbe647a",
"redirect_url": 1002,
"message": "Redirected"
}
}
]
Delete Like¶
-
DELETE/api/likes/(string: post_type)/(int: post_id)/delete¶ Parameters: - post_type (string) – topic | comment
- post_id (integer) – the post_id
- role (string) – participant | user
- participant_id (integer) – the participant Id
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=UTF-8
[
{
"response_code": 2000,
"data": {
"message": "Like Deleted"
},
"system": {
"created_at": "2017-01-23 12:09:26",
"signature": "5b937648f71121b543a461002bb03c41a91d5850",
"redirect_url": 1002,
"message": "Redirected"
}
}
]