GET /api/v1/books/<string:categories>
Description
This endpoint allows users to retrieve a list of books based on a specified category.
Parameters
All parameters are optional, if there is no specific value provided, default will be used.
page: Page number for pagination. Default is1(int).limit: Number of books per page. Default is10(int).sort_type: Type of sorting based on a book characteristic. Default isid(str).sort_order: Sorting order of the results.1for ascending and-1for descending. Default is1(int).
Request
Response
The response will show books that match the specified category, with pagination details. For example, if the category is "Java" there will be 2 matching results of books that have that category (and can also have others).
{
"books": [
{
"_id": "6123d2c4a3490d001f2cf0db",
"title": "3D User Interfaces with Java 3D",
"categories": [
"Java"
],
// More book information
},
{
"_id": "6123d2c4a3490d001f2cf0dc",
"title": "Android in Action, Second Edition",
"categories": [
"Java"
],
// More book information
}
// 6 more results...
],
"pageCurrent": 1,
"pagePrevious": null,
"pageNext": null,
"pageLast": 1,
"items": 8
}