Class: Jammed::PopularJams

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

Overview

Provides method for calling API endpoint /popular.json?

Class Method Summary (collapse)

Methods inherited from API

request

Class Method Details

Calls API for popular jams

Examples

Jammed::PopularJams.popular_jams('08972935872035') #returns a sample of popular jams


9
10
11
12
# File 'lib/jammed/popular_jams.rb', line 9

def self.popular_jams(api_key)
  response = request(:get, "/popular.json", :query => {:key => api_key})
  JSON.parse(response.body)['jams']
end