Class: Nugz::Reviews

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

Class Method Summary collapse

Class Method Details

.allObject



3
4
5
6
# File 'lib/nugz/reviews.rb', line 3

def self.all
  response = Faraday.get('http://www.milehighbuzz.co/api/v1/reviews')
  JSON.parse(response.body)
end

.for_store(slug) ⇒ Object



8
9
10
11
# File 'lib/nugz/reviews.rb', line 8

def self.for_store(slug)
  response = Faraday.get("http://www.milehighbuzz.co/api/v1/reviews/store/#{slug}")
  JSON.parse(response.body)
end