Sha256: 5fb43cb6f39f441d91d0d587b0c3ece619442460e7115e2da24d28212026475b
Contents?: true
Size: 533 Bytes
Versions: 1
Compression:
Stored size: 533 Bytes
Contents
module HungryVegan class Api API_HOST = "https://api.yelp.com" SEARCH_PATH = "/v3/businesses/search" BUSINESS_PATH = "/v3/businesses/" SEARCH_LIMIT = 15 def self.search(term, location) url = "#{API_HOST}#{SEARCH_PATH}" params = { term: term, location: location, limit: SEARCH_LIMIT, sort_by: "rating" } response = HTTP.auth("Bearer #{ENV['YELP_API_KEY']}").get(url, params: params) response.parse end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hungry_vegan-0.1.0 | lib/hungry_vegan/api.rb |