Sha256: 42453fdb5aa239bf307e4804e0d47f74e8acfd7c0f5250c3cdaef3ddd536f116
Contents?: true
Size: 397 Bytes
Versions: 4
Compression:
Stored size: 397 Bytes
Contents
module SlackMessaging class RandomMessage def self.acquire_random_quote random_quote = HTTParty.get('http://api.quotable.io/random', headers: { 'Content-Type': 'application/json' }).body quote_content = JSON.parse(random_quote)['content'] quote_author = JSON.parse(random_quote)['author'] return "\"#{quote_content}\"" + "\n" + "—#{quote_author}" end end end
Version data entries
4 entries across 4 versions & 1 rubygems