Class: YelpClient

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeYelpClient

Returns a new instance of YelpClient.



4
5
6
7
8
9
10
11
12
# File 'lib/yelp_client.rb', line 4

def initialize
  @client = Yelp::Client.new
  client.configure do |config|
    config.consumer_key = "iet5BTns6urx8_MPMSN9lg"
    config.consumer_secret = "LUwtv6MjjikYbt7BrHUxJV6oJ0E"
    config.token = "K3EIm60p2YqhX5H5DOyZoqfFJua3TGCS"
    config.token_secret = "oVvc-K6pQR31nGvujojMjty07hY"
  end
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



2
3
4
# File 'lib/yelp_client.rb', line 2

def client
  @client
end

Instance Method Details

#search(location, params = {}, locale = {}) ⇒ Object



14
15
16
# File 'lib/yelp_client.rb', line 14

def search(location, params = {}, locale = {})
  client.search(location, params, locale).businesses
end