For tests to execute successfully you must have the YWSID (for v1) or YELP_CONSUMER_KEY, YELP_CONSUMER_SECRET, YELP_TOKEN and YELP_TOKEN_SECRET(for v2) set in your environment via (shell-dependent, bash example provided):

Installing

Usage

Instantiate a Yelp::Client and use its search method to make requests of
the Yelp server.

The available search request types are:

Yelp::V1::Review::Request::BoundingBox

Yelp::V1::Review::Request::GeoPoint

Yelp::V1::Review::Request::Location

Yelp::V1::Phone::Request::Number

Yelp::V1::Neighborhood::Request::GeoPoint

Yelp::V1::Neighborhood::Request::Location

Yelp::V2::Business::Request::Id

Yelp::V2::Search::Request::BoundingBox

Yelp::V2::Search::Request::GeoPoint

Yelp::V2::Search::Request::Location

You can include the overlying module to cut back on typing
or in case of conflicts between classes, use the fully qualified search request class name.

By default, response content is formatted as a Ruby hash converted from Yelp's
source JSON response content. Alternate response formats (including the
original pure JSON) can be specified on request record construction via the
Yelp::[V1/V2]::Request response_format parameter, available in all request record
types.

One Time Client Configuration (Recommended)

To configure token/keys, add the following in a pre-loader file (eg: in initializers dir for Rails).
Although currently available, support for specifying keys in request object will be deprecated in the future.

For example, you might have a 'yelp.rb' file in your 'config/initializers' directory that looks like the following: