This is a nodejs Twitter bot that uses the New York Public Library Digital Collections API.
To see it in action, check out @picturesofNY. Send a tweet @picturesofNY [word or phrase]
and the bot will attempt to reply with a public domain photograph from the NYPL collection, or failing that, a random result based on a list of alternative search terms.
- Twitter account and app keys
- nodejs
- fs
- random-js
- request
- twit
Fixed bug where bot fell over if NYPL API returns an empty result.
Now uses the Twitter streaming API, with REST API to catch anything sent whilst the bot is disconnected for any reason.
MIT (Hugh Rundle 2016)