Resource Likes
Manage likes on marketplace resources.
Base Endpoint
Section titled “Base Endpoint”All resource likes endpoints are prefixed with /resources/:resourceId/likes
Like Resource
Section titled “Like Resource”POST /resources/:resourceId/likesLike a resource.
Authentication: Required
URL Parameters:
resourceId(string) - Resource ID to like
Response:
{ "message": "Resource liked successfully", "likeCount": 42}Unlike Resource
Section titled “Unlike Resource”DELETE /resources/:resourceId/likesRemove your like from a resource.
Authentication: Required
URL Parameters:
resourceId(string) - Resource ID to unlike
Response:
{ "message": "Resource unliked successfully", "likeCount": 41}Check if Liked
Section titled “Check if Liked”GET /resources/:resourceId/likes/meCheck if the current user has liked the resource.
Authentication: Required
URL Parameters:
resourceId(string) - Resource ID
Response:
{ "hasLiked": true}Get Resource Likes
Section titled “Get Resource Likes”GET /resources/:resourceId/likesGet all likes for a resource.
Authentication: Not required
URL Parameters:
resourceId(string) - Resource ID
Response:
{ "likes": [ { "id": "like-id", "userId": "user-id", "user": { "id": "user-id", "username": "username", "displayName": "Display Name", "image": "https://..." }, "createdAt": "2024-01-01T00:00:00Z" } ], "total": 42}