Class: Jammed::RandomJam

Inherits:
API
  • Object
show all
Defined in:
lib/jammed/random.rb

Overview

Provides method for calling API endpoint /random.json?

Class Method Summary (collapse)

Methods inherited from API

request

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