YelpAPI

To run the example project, clone the repo, and run pod install from the Example directory first.

This is a Cocoapod for the Yelp API. It’ll simplify the process of consuming data
from the Yelp API for developers using Objective-C or Swift. The library encompasses Search
, Business, and Phone Search API functions.

Please remember to read and follow the Terms of Use and display requirements
before creating your applications.

Installation

YelpAPI is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "YelpAPI"

Usage

Basic Usage

Before you can make any requests to the API, you must create a YLPClient
by authorizing with the API using your app’s ID and secret:

Each interface provides a different way to query the Search API depending on the
type of information that you have on hand. There are two different methods of
querying the Search API, each of which accepts a different format for location input.
Consequentially, there are two sets of functions in the clientlib to support
calls into each version of the Search API. Each set of functions contains a
version to call the API with only the required parameters, while another which
accepts arguments for all optional parameters.

YLPSearchCompletionHandler is a block which takes a YLPSearch* andNSError* object as arguments. Upon successful completion of an API call the
result will be returned in the YLPSearch* object, alternatively errors
will be returned in the NSError* object.

YLPBusinessCompletionHandler is a block which takes a YLPBusiness* and anNSError* object as arguments. Upon successful completion of an API call the
result will be returned in the YLPBusiness* object, alternatively errors will
be returned in the NSError* object.

YLPPhoneSearchCompletionHandler is a block which takes a YLPSearch* and an NSError*
object as arguments. Upon successful completion of an API call the result will be returned
in the YLPSearch* object, alternatively errors will be
returned in the NSError* object.

Example Reviews Usage

Responses

A Response object is a data structure returned after each successful API call. The objects are
readily available to be used. They will contain all available response fields as
documented in our API documentation.

Response objects returned by an API call may contain other Response objects.
For example, the YLPSearch object contains an array of YLPBusiness objects as well.
All Response objects can be found here