Class: Jammed::RandomJam
Overview
Provides method for calling API endpoint /random.json?
Class Method Summary (collapse)
-
+ (Object) jam(api_key)
Calls API for a random jam.
Methods inherited from API
Class Method Details
+ (Object) jam(api_key)
Calls API for a random jam
Examples
Jammed::RandomJam.jam('08972935872035') #returns a random jam + the profile of the user
9 10 11 12 |
# File 'lib/jammed/random.rb', line 9 def self.jam(api_key) response = request(:get, "/random.json", :query => {:key => api_key}) JSON.parse(response.body) end |