Class: Jammed::RandomJam
Overview
Provides method for calling API endpoint /random.json?
Class Method Summary collapse
-
.jam(api_key, https = false) ⇒ Object
Calls API for a random jam.
Methods inherited from API
Class Method Details
.jam(api_key, https = false) ⇒ Object
11 12 13 14 15 |
# File 'lib/jammed/random.rb', line 11 def self.jam(api_key, https=false) response = request(:get, "/random.json", {:https => https, :query => {:key => api_key}}) JSON.parse(response.body) end |