Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 858 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 858 Bytes

achan.cordova.yelp

Angular provider to query the Yelp API

Configuration

angular.module('myApp', ['achan.cordova.yelp'])
  .config(function (yelpProvider) {
    yelpProvider.identify({
      consumerKey: '<consumer key>',
      consumerSecret: '<consumer secret>',
      token: '<token>',
      tokenSecret: '<token secret>'
    });
  });

Usage

angular.module('myapp').controller('MyController', function (yelp) {
  yelp.search({ category_filter: 'restaurants', radius_filter: 4000 })
      .then(function (data) {
        // data returned from Yelp
        console.log(JSON.stringify(data));
      });
});

Supported yelp#search parameters can be found in the Yelp Search API documentation.