Skip to content

A twitter bot that responds to mentions with an image from the Rijksmuseum.

License

Notifications You must be signed in to change notification settings

nynnejc/rijks-bot

Repository files navigation

vanitas

Vanitas stillife by N.L. Peschier, 1660.

Rijksbot

Rijksbot is a twitter bot that responds to mentions with an image from the Rijksmuseum, using the tweet as a serch term.

This project was started at a Rails Girls Berlin Code & Cake event in 2017.

Contributing

We gladly accept contributions to this project. Get in touch with thoughts and ideas.

Add your Rijksmuseum API key:

Add an account and ask for a Rijksmuseum API Key. You will recieve the key via email. It will only take you few minutes.

Add a .env file in the root file with your API key:

# .env

RIJKSMUSEUM_API_KEY=ZuSiGYl9 # without quotes, this is an example & fake key

Make all your tests green/passing:

  1. install gems
bundle
  1. Change :record => :none to :once to record new episodes. # test/support/vcr.rb
config.default_cassette_options = { allow_unused_http_interactions: false, :record => :once }
  1. run:
rake test
  1. change 'test/support/vcr.rb' again to
:record => :none

or rather:

git checkout test/support/vcr.rb
  1. check the failing test, and change the timestamp to the actual one. Example:

# failing test output:

--- expected
+++ actual
@@ -1 +1 @@
-"Wed, 02 May 2018 22:14:01 GMT"
+"Tue, 22 May 2018 10:27:02 GMT"

# rijksmus-api/client_test.rb:18

subject.images.headers["date"].must_equal "Tue, 22 May 2018 00:00:29 GMT"
  1. Git add and commit your changes. Example:
git add . # check your changes before with git diff and do the propper cleaning/commits.
git commit -m 'update timestamp client_test'
  1. Congratulations! All tests should be green/passing and you are start doing your first contribution!

License

MIT

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Nynne Just Christoffersen

💻 🖋 🎨 📖 🚇 🚧 ⚠️

Tonio Serna

💻 📖 🤔 🚇 🧑‍🏫 ⚠️

Sarah

💻 🚧 ⚠️

Daniel Senff

💻 🚧

Christian Buggle

🚧 ⚠️

Stephen Best

💬 🖋 🔣 🎨 📖 🤔 🧑‍🏫 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

All Contributors

About

A twitter bot that responds to mentions with an image from the Rijksmuseum.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages