Class: VinoChipper

Inherits:
Object
  • Object
show all
Defined in:
lib/vinochipper.rb

Constant Summary collapse

BASE_URL =
'https://vinoshipper.com/json-api/v2/'.freeze

Class Method Summary collapse

Class Method Details

.wine_list(id) ⇒ Object



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

def self.wine_list(id)
  response = Net::HTTP.get_response(URI.parse(BASE_URL + 'wine-list?id=' + id.to_s))
  VCWineList.new(JSON.parse(response.body))
end