Yelp/yelp-api — pull request #28 by thibaudrobelain (2014-07-02 18:33:52+00:00)
Title: Updated the objective-c code sample for v2

Pull request: Updating the objective-c code to v2

What I did: Removed the old project and created a new command-line tool project.
Created a YPAPISample class that takes care of the API logic. I made the choice of using synchronous calls to the API in order to avoid a lot of callbacks for such a small API sample.
It has a private method to make a call to the api given a host path and query parameters.
This method takes care of adding the user credentials to the request in order for the server to accept the request.
The search and 'get more info about a business' methods use this aforementioned method to make their api calls to the server.

The public method exposed is the one responsible for performing a series of API calls that were meant to be given as examples:

1. It builds a search request with a term and location given by the user (or default values) and limits the result to 3.
2. If there are results, it queries the top result business for more info
3. Displays the business info in the console

Also added a few gitignore lines to remove useless files from xcode / mac.

Tested and it works perfectly, it just needs to have the api v2 keys entered by the user and it's ready to go.