User Likes
NOTE: For module_for path parameter, currently only "news" is supported.
NOTE: Action can be either 1 (like) or 2 (unlike) . Action path parameter can be one of the supported Reaction types, that can be found in the enum table at the bottom of the section.
Like or Unlike Item
POST
/v1/like_system/{module_for}/{module_uuid}/{action}
💡
This request requires “PB-API-TOKEN” from the platforms.
Note: Action can be either 1 (like) or 2 (unlike).
Request
Empty
Response
Response will be 200 OK if the item was successfuly liked/unliked
List Module Total Likes
GET
/v1/data/like_system/{module_for}/{module_uuid}
💡
This request requires “PB-API-TOKEN” from the platforms.
Query Parameters
Name | Description |
---|---|
reaction_type | Lists total likes based on reaction type (reaction types can be found in the user likes enum section) |
Request
Empty
Response
{
"total_records": "5",
"results": [
{
"user_uuid": "00005470-ccfc-4945-bb98-5feaecba47dd",
"module_uuid": "01dc8636-1d6f-477c-be07-d9ca27f9f756",
"module_for": "news",
"date_liked": "2023-12-11T23:00:00Z",
"reaction_type_id": "FIRE_REACTION_TYPE",
"user_first_name": "John",
"user_last_name": "Doe",
"user_suffix": ""
},
{
"user_uuid": "0000C9BD-80E2-4CDA-B08D-5A4972EB4220",
"module_uuid": "01dc8636-1d6f-477c-be07-d9ca27f9f756",
"module_for": "news",
"date_liked": "2023-12-11T23:00:00Z",
"reaction_type_id": "FIRE_REACTION_TYPE",
"user_first_name": "Jackie",
"user_last_name": "Doe",
"user_suffix": ""
},
{
"user_uuid": "0002c0da-b451-4f26-9858-475b6f5cd002",
"module_uuid": "01dc8636-1d6f-477c-be07-d9ca27f9f756",
"module_for": "news",
"date_liked": "2023-12-11T23:00:00Z",
"reaction_type_id": "FIRE_REACTION_TYPE",
"user_first_name": "Jimmy",
"user_last_name": "Doe",
"user_suffix": ""
},
{
"user_uuid": "0000e047-ed97-47e3-9cdc-55eb504767ea",
"module_uuid": "01dc8636-1d6f-477c-be07-d9ca27f9f756",
"module_for": "news",
"date_liked": "2023-12-11T23:00:00Z",
"reaction_type_id": "WOW_REACTION_TYPE",
"user_first_name": "Daniel",
"user_last_name": "Doe",
"user_suffix": ""
},
{
"user_uuid": "BD49B56C-EAC9-4653-8A71-59BD961BABBE",
"module_uuid": "01dc8636-1d6f-477c-be07-d9ca27f9f756",
"module_for": "news",
"date_liked": "2024-01-25T13:04:05Z",
"reaction_type_id": "CONFUSED_REACTION_TYPE",
"user_first_name": "James",
"user_last_name": "Doe",
"user_suffix": ""
}
],
"reactions": {
"like_reactions": 0,
"interesting_reactions": 0,
"funny_reactions": 0,
"fire_reactions": 3,
"wow_reactions": 1,
"dislike_reactions": 0,
"sad_reactions": 0,
"angry_reactions": 0,
"confused_reactions": 1,
"heart_reactions": 0,
"celebrate_reactions": 0
}
}
Check if Current User Liked Item
GET
/v1/users/{uuid}/like_system/{module_for}/{module_uuid}
💡
This request requires “PB-API-TOKEN” from the platforms.
Request
Empty
Response
{
"did_user_like_module": true,
"reaction_type_id": "LIKE_REACTION_TYPE"
}
Table of Enums
enum LikeReaction
{
UNDEFINED_REACTION_TYPE = 0;
LIKE_REACTION_TYPE = 1;
INTERESTING_REACTION_TYPE = 2;
FUNNY_REACTION_TYPE = 3;
FIRE_REACTION_TYPE = 4;
WOW_REACTION_TYPE = 5;
HEART_REACTION_TYPE = 6;
CELEBRATE_REACTION_TYPE = 7;
UNLIKE_REACTION_TYPE = 99;
DISLIKE_REACTION_TYPE = 100;
SAD_REACTION_TYPE = 101;
ANGRY_REACTION_TYPE = 102;
CONFUSED_REACTION_TYPE = 103;
}
enum LikeType
{
UNDEFINED_LIKE_TYPE = 0;
NEWS_LIKE_TYPE = 1;
}