From 0bb6d64c929b237278abf2565b6eb9f5f85fcd37 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 29 Oct 2017 09:55:03 -0400 Subject: Created bot --- capital.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 capital.h (limited to 'capital.h') diff --git a/capital.h b/capital.h new file mode 100644 index 0000000..1f763db --- /dev/null +++ b/capital.h @@ -0,0 +1,45 @@ +#ifndef CAPITAL_H_09912EAE +#define CAPITAL_H_09912EAE + +#include +#include +#include +#include +#include +#include +#include + +class capital { +public: + + capital( + std::string configFile, + std::mt19937& rng); + + void run() const; + +private: + + verbly::word getPicturedNoun() const; + + Magick::Image getImageForNoun(verbly::word pictured) const; + + std::string generateTweetText(verbly::word pictured) const; + + void sendTweet(std::string text, Magick::Image image) const; + + class could_not_get_image : public std::runtime_error { + public: + + could_not_get_image() : std::runtime_error("Could not get image for noun") + { + } + }; + + std::mt19937& rng_; + std::unique_ptr database_; + std::unique_ptr client_; + +}; + +#endif /* end of include guard: CAPITAL_H_09912EAE */ -- cgit 1.4.1