Class: Yelpify::Business

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

Instance Method Summary collapse

Instance Method Details

#build_url(biz_id, search_data = nil) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/yelpify/business.rb', line 5

def build_url(biz_id, search_data=nil)
  base = "http://api.yelp.com/v2/business/#{biz_id}?"
  if search_data
    custom = URI.encode_www_form(search_data)
    path = base + custom
  else
    path = base
  end
end