get interest by user
Interest
get interest by user
Get Interests by User
This endpoint retrieves the interests of a specific user with pagination.
Request
-
Method: GET
-
URL: /interests/user/:userId
-
Query Parameters:
-
page (number, required): The page number for pagination.
-
limit (number, required): The maximum number of interests to be returned per page.
-
Response
The response will be a JSON object with the following schema:
{
"data": {
"interests": {
"docs": [
{
"_id": "string",
"genre": {
"_id": "string",
"name": "string"
}
}
],
"totalDocs": 0,
"offset": 0,
"limit": 0,
"totalPages": 0,
"page": 0,
"pagingCounter": 0,
"hasPrevPage": true,
"hasNextPage": true,
"prevPage": null,
"nextPage": null
}
},
"error": null
}
The data object contains the interests array, which includes the user’s interests with their respective _id and genre details. The response also includes pagination information such as totalDocs, offset, limit, totalPages, page, pagingCounter, hasPrevPage, hasNextPage, prevPage, and nextPage.
GET
get interest by user