Have you installed the Well-Read Service in your development system? Make sure you have all the prerequisites to run the service in your system before you continue.
With the extensive selection of fantasy novels along with well-defined reader personas, it’s easy and fun to get a book recommendation using the Well-Read Service.
Let’s start with a quick tutorial to get book recommendations based on specific properties of a reader persona.
The tutorial takes approximately 20 minutes to complete.
First, use the GET
method to retrieve a persona
resource in the service.
For this tutorial, you’ll need to retrieve the Morally Grey Malcontent reader persona.
Start the service by running this command in your preferred command-line tool.
cd <directory of the database file location>
json-server well-read-db.json
{base_url}/personas?name=Morally Grey Malcontent
N/A
N/A
The response body should return the resource for the Morally Grey Malcontent persona:
{
"name": "Morally Grey Malcontent",
"description": "Likes high-stakes, violent books that explore morality.",
"subgenres_explored": ["grimdark", "epic", "science-fiction"],
"typical_pace":["medium", "fast"],
"related_tags": ["violence","sad","dark","gore","gothic", "war"],
"id": 2
}
You’re halfway done with the tutorial. Keep the service running in your system and leave the Postman app open.
As a user looking for a book recommendation, use the GET
method to retrieve a book resource based on the following properties in the persona you retrieved in your previous API request: subgenres_explored: grimdark
, typical_pace: medium
.
The equivalent key-value pairs for the book
resource are: subgenre: grimdark
, pace: medium
.
{base_url}/books?subgenre=grimdark&pace=medium
N/A
N/A
The response body should return the book
resources that match the filters:
[
{
"title": "The Poppy War",
"author": "R F Kuang",
"page_count": 544,
"subgenre":"grimdark",
"pace": "medium",
"tags":["violence", "sad", "gore", "war", "world-building"],
"is_series":"true",
"id": 2
},
{
"title": "The Dragon Republic",
"author": "R F Kuang",
"page_count": 672,
"subgenre":"grimdark",
"pace": "medium",
"tags":["violence", "sad", "gore", "war", "world-building"],
"is_series":"true",
"id": 3
}
]
You now have some book recommendations based on specific properties taken from a reader persona.
After completing this tutorial, you can refine your search by narrowing down your filters or using different persona properties to get other book recommendations. You can also try out more tutorials for other things you can do in the Well-Read Service.