The NYPL Tweetwall presents content from library collections that are currently being discussed on Twitter. See it in action here!
Credentials for several APIs are required to update the Tweetwall:
They're passed via environment variables to the application, so creating a .env
file for Foreman is recommended:
TWITTER_CONSUMER_KEY=foo
TWITTER_CONSUMER_SECRET=bar
TWITTER_OAUTH_TOKEN=baz
TWITTER_OAUTH_TOKEN_SECRET=qux
DIGITAL_COLLECTIONS_API_TOKEN=qux
There is one Rake task responsible for updating the Tweetwall:
foreman run rake tweetwall:update
It performs the following sub-tasks:
- Deletes expired content
- Deletes expired Tweets
- Checks for new Tweets
- Adds new content
- Expires and warms the cache
Bug reports, fixes, and new features are welcomed. If you'd like to contribute code, please:
-
Fork the project
-
Start a branch named for your new feature or bug
-
Run (and add to, if possible) the unit tests:
```bash
bundle exec rake test
```
- Create a Pull Request
Thank you!