GET /api/v1/books/author/<string:author>
Description
This endpoint allows users to retrieve a list of books based on a specified author.
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(int).sort_order: Sorting order of the results.1for ascending and-1for descending. Default is1(str).
Request
Response
The response will show books that match the specified author, with pagination details. For example, if the author is "Yehuda Katz" there will be 2 matching that have the author specified (and can also have others).
{
"books": [
{
"_id": "6123d2c4a3490d001f2cf0db",
"title": "jQuery in Action",
"authors": [
"Bear Bibeault",
"Yehuda Katz"
],
// More book information
},
{
"_id": "6123d2c4a3490d001f2cf0dc",
"title": "jQuery in Action, Second Edition",
"authors": [
"Bear Bibeault",
"Yehuda Katz"
],
// More book information
}
],
"pageCurrent": 1,
"pagePrevious": null,
"pageNext": null,
"pageLast": 1,
"items": 2
}