Reaction APIs (1)
Download OpenAPI specification:Download
Patrick Sullivan: Patrick.Joseph.Sullivan@protonmail.com URL: https://sullivanpj.github.io/open-system/services/reactions License: BSD 2-Clause License Terms of Service
A collection of APIs used to get and set user reactions and comments for an article/page
Add Reaction
Add a new reaction to an article
path Parameters
contentId required | string The id of the article/comment |
Request Body schema: application/json
type required | string Enum: "like" "unlike" "cry" "laugh" |
Responses
Request samples
- Payload
Content type
application/json
{- "type": "like"
}
Response samples
- 200
- 401
- 404
- 500
- 503
Content type
application/json
{- "id": "123e4567-e89b-12d3-a456-426614174000"
}
Get Reactions
Return the reactions for a specific article, comment, etc.
path Parameters
contentId required | string The id of the article/comment |
query Parameters
pageNumber required | integer >= 1 Default: 1 The current page number of the selected data |
pageSize required | integer >= 1 Default: 200 The maximum amount of data to return in one request |
orderBy required | string Default: "id" The field to order the request by |
type | string Enum: "like" "dislike" "laugh" "cry" Example: type=like The type of reaction the user had |
Responses
Response samples
- 200
- 401
- 404
- 500
- 503
Content type
application/json
{- "pageNumber": 1,
- "pageSize": 0,
- "recordsTotal": 0,
- "recordsFiltered": 0,
- "data": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "createdOn": "2022-03-19 04:24:02.190",
- "createdBy": "PSUL",
- "updatedOn": "2022-10-12 14:01:13.000",
- "updatedBy": "PSUL",
- "userId": "string",
- "type": "string"
}
]
}
Get Reaction Counts
Return the reaction counts for a specific article, comment, etc.
path Parameters
contentId required | string The id of the article/comment |
query Parameters
type | string Enum: "like" "dislike" "laugh" "cry" Example: type=like The type of reaction the user had |
Responses
Response samples
- 200
- 401
- 404
- 500
- 503
Content type
application/json
{- "data": [
- {
- "type": "string",
- "count": 0
}
]
}