Add LibAnswers FAQ results to Bento
In the right sidebar, below the LibGuides search, add a box for LibAnswers FAQ results.
API
LibAnswers can be queried using their v 1.1 API with search/:query
. https://ask.springshare.com/libanswers/faq/1669#v1-1 (auth may not be required)
Check out the work UMD has done, https://github.com/umd-lib/faq-searcher especially here https://github.com/umd-lib/faq-searcher/blob/main/src/app.py where they've spelled out the JSON fields they expect and their error handling. Theirs is in production, so we could benefit from the testing they've already done.
Display
-
Return up to 3 linked article titles. -
If there are more than 3 results, link to continue your search with text "See all FAQs" and url syntax (using fair use
as a keyword example):https://psu.libanswers.com/search/?t=0&q=fair+use
-
If no results, does it make more sense not to display the box? If that's not easy, then no-results text would be: Got a question? [Check out our FAQs.](https://psu.libanswers.com/)
(using markdown syntax for ease of representation but make it an actual link)