The Digital Public Library of America (DPLA) provides a powerful API, which gives developers a number of ways to query and access the 2.5 million items in the DPLA collections. However, the API has no means of calling up totally random items. This bot is an attempt to infuse what we all love about libraries--serendipitous discovery--into the DPLA, by retrieving random items at regular intervals.
###Method DPLAbot works by first coming up with a random noun and next searching the DPLA using that noun as a keyword. The result is a kind of "Surprise Me!" search function for the DPLA.
The avatar for DPLAbot comes from an early test of the bot, in which the DPLA item "Cat and kitten" was the random result.
DPLAbot relies on two APIs to work:
- Obviously, the DPLA API, which is free and open;
- And the Wordnik API, which provides the "secret sauce"--the randomness--that powers DPLAbot.
To run or modify your own version of DPLAbot, you'll need keys to these two APIs. Insert them in the code in the appropriate places.
npm install restler npm install twit npm install inflection
Execute the bot with: