Class: Rhymera::RhymeBrain
- Inherits:
-
Object
- Object
- Rhymera::RhymeBrain
- Defined in:
- lib/rhymera/rhymebrain.rb
Overview
calls Rhymebrain API via URL, gets JSON object
Class Method Summary collapse
Class Method Details
.query(function:, word:) ⇒ Object
7 8 9 10 |
# File 'lib/rhymera/rhymebrain.rb', line 7 def self.query(function:, word:) uri = URI.parse("https://rhymebrain.com/talk?function=#{function}&word=#{word}") JSON.parse(Net::HTTP.get(uri)) end |