Module: Yelp

Defined in:
lib/yelp.rb,
lib/yelp/error.rb,
lib/yelp/client.rb,
lib/yelp/version.rb,
lib/yelp/configuration.rb,
lib/yelp/endpoint/search.rb,
lib/yelp/endpoint/business.rb

Defined Under Namespace

Modules: Endpoint, Error Classes: Client, Configuration

Constant Summary collapse

VERSION =
"2.0.4"

Class Method Summary collapse

Class Method Details

.clientClient

Returns an initially-unconfigured instance of the client.

Examples:

Configuring and using the client

Yelp.client.configure do |config|
  config.consumer_key = 'abc'
  config.consumer_secret = 'def'
  config.token = 'ghi'
  config.token_secret = 'jkl'
end

Yelp.client.search('San Francisco', { term: 'food' })

Returns:

  • (Client)

    an instance of the client


18
19
20
# File 'lib/yelp.rb', line 18

def self.client
  @client ||= Yelp::Client.new
end