All Projects → Yelp → yelp-ios

Yelp / yelp-ios

Licence: MIT license
No description or website provided.

Programming Languages

objective c
16641 projects - #2 most used programming language
swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to yelp-ios

dynamic-cli
A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI
Stars: ✭ 151 (+147.54%)
Mutual labels:  api-client
insomnia-workspace
An Insomnia Workspace for Alpaca API
Stars: ✭ 34 (-44.26%)
Mutual labels:  api-client
YuiAPI
一个浏览器API测试客户端,API文档生成器,支持chrome/firefox/新版edge
Stars: ✭ 25 (-59.02%)
Mutual labels:  api-client
rcites
📦 R package to access the CITES Speciesplus database
Stars: ✭ 12 (-80.33%)
Mutual labels:  api-client
bionode-ncbi
Node.js module for working with the NCBI API (aka e-utils).
Stars: ✭ 66 (+8.2%)
Mutual labels:  api-client
rippled-php
A PHP library for rippled (XRP Ledger) communication.
Stars: ✭ 33 (-45.9%)
Mutual labels:  api-client
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+86870.49%)
Mutual labels:  api-client
sia-cog
Various cognitive api for machine learning, vision, language intent alalysis. Covers traditional as well as deep learning model design and training.
Stars: ✭ 34 (-44.26%)
Mutual labels:  api-client
crates io api
API client for crates.io, the Rust crate registry.
Stars: ✭ 51 (-16.39%)
Mutual labels:  api-client
rdfp
This R package connects the DoubleClick for Publishers API from R
Stars: ✭ 16 (-73.77%)
Mutual labels:  api-client
cv4pve-api-php
Proxmox VE Client API for PHP
Stars: ✭ 45 (-26.23%)
Mutual labels:  api-client
go-json-spec-handler
Simple JSON API Spec Compatibility in Golang
Stars: ✭ 41 (-32.79%)
Mutual labels:  api-client
binance-client-websocket
🛠️ C# client for Binance websocket API
Stars: ✭ 41 (-32.79%)
Mutual labels:  api-client
alpha-vantage-api
Alpha Vantage PHP Client
Stars: ✭ 57 (-6.56%)
Mutual labels:  api-client
golio
League of Legends API client written in Golang
Stars: ✭ 45 (-26.23%)
Mutual labels:  api-client
samp-client
GTA SA-MP API client library for Python
Stars: ✭ 21 (-65.57%)
Mutual labels:  api-client
monzo-php
PHP Library for use with https://monzo.com
Stars: ✭ 20 (-67.21%)
Mutual labels:  api-client
WikidataR
An R package for the Wikidata API
Stars: ✭ 49 (-19.67%)
Mutual labels:  api-client
noire-server
Hapi Boilerplate
Stars: ✭ 20 (-67.21%)
Mutual labels:  api-client
drowsy
😪 Lazy integrations tool for RESTful interfaces to aid POC development and streamline integrations
Stars: ✭ 19 (-68.85%)
Mutual labels:  api-client

Build Status

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:

[YLPClient authorizeWithAppId:<id> secret:<secret> completionHandler:^
    (YLPClient *client, NSError *error) {
    // Save your newly authorized client
    self.client = client;
}];

Search API

Once you have a YLPClient object you can use the various search related function:

Search With Location
- (void)searchWithLocation:(NSString *)location
                      term:(nullable NSString *)term
                     limit:(NSUInteger)limit
                    offset:(NSUInteger)offset
                      sort:(YLPSortType)sort
         completionHandler:(YLPSearchCompletionHandler)completionHandler;

- (void)searchWithLocation:(NSString *)location
         completionHandler:(YLPSearchCompletionHandler)completionHandler;

Search With Coordinate
- (void)searchWithCoordinate:(YLPCoordinate *)coordinate
                        term:(nullable NSString *)term
                       limit:(NSUInteger)limit
                      offset:(NSUInteger)offset
                        sort:(YLPSortType)sort
           completionHandler:(YLPSearchCompletionHandler)completionHandler;

- (void)searchWithCoordinate:(YLPCoordinate *)coordinate
           completionHandler:(YLPSearchCompletionHandler)completionHandler;

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* and 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 Search Usage

[self.client searchWithLocation:@"San Francisco, CA" completionHandler:^
    (YLPSearch *search, NSError *error) {
    // Perform any tasks you need to here
}];

Business API

The YLPClient object will also provide access to the Business API, the relevant functions are:

- (void)businessWithId:(NSString *)businessId
     completionHandler:(YLPBusinessCompletionHandler)completionHandler;

YLPBusinessCompletionHandler is a block which takes a YLPBusiness* and an NSError* 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.

Example Business Usage

[self.client businessWithId:@"yelp-san-francisco" completionHandler:^
    (YLPBusiness *search, NSError *error) {
    // Perform any tasks you need to here
}];

Phone Search API

The YLPClient object will also provide access to the Phone Search API, the relevant functions are:

- (void)businessWithPhoneNumber:(NSString *)phoneNumber
              completionHandler:(YLPPhoneSearchCompletionHandler)completionHandler;

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 Phone Search Usage

[self.client businessWithPhoneNumber:@"+14159083801" completionHandler:^
    (YLPSearch *search, NSError *error) {
    // Perform any tasks you need to here
}];

Reviews API

The YLPClient object also provides access to the Reviews API. The relevant methods are:

- (void)reviewsForBusinessWithId:(NSString *)businessId
               completionHandler:(YLPReviewsCompletionHandler)completionHandler;

- (void)reviewsForBusinessWithId:(NSString *)businessId
                          locale:(nullable NSString *)locale
               completionHandler:(YLPReviewsCompletionHandler)completionHandler;

Upon completion, the YLPReviewsCompletionHandler will be passed either a YLPBusinessReviews* object on success, or an NSError* object if there was an error.

Example Reviews Usage

[self.client reviewsForBusinessWithId:@"yelp-san-francisco" completionHandler:^
    (YLPBusinessReviews *reviews, NSError *error) {
    // Perform any tasks you need to here
}];

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

Contributing

  1. Fork it (http://github.com/yelp/yelp-ios/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].