extjs - Yelp API key not working in Sencha Architect demo code -


i using tutorial here : http://docs.sencha.com/architect/3/tutorials/first_mobile_application.html#the_controller

getbusinesses: function(location, callback) {     // note: obtain yelp api key registering (for free)     // yelp @ http://www.yelp.com/developers/getting_started/api_overview     // (in app, use review search api v1.0)      var store = ext.data.storemanager.lookup('businessstore'),         yelpkey = '', // enter yelp api key here         url = 'http://api.yelp.com/business_review_search' +         '?ywsid=' + yelpkey +         '&term=bars' +         '&lat=' + location.coords.latitude +         '&long=' + location.coords.longitude;      store.getproxy().seturl(url);       store.load(function() {         callback(store);     }); } 

i applied api key on yelp , got following:

yelp api keys

i not sure 1 use. tutorial code has placeholder 1 single key in code above

the completed app shows error: uncaught typeerror: cannot read property 'setstore' of undefined at:

        me.getbusinesses(location, function (store) {              // bind data list , display             me.getdatalist().setstore(store); 

  1. you need api v1.0 key.
  2. getdatalist() returns undefined because view not exist. may have forgotten name list view in listcontainer, see "list view - step 4". also, function name derived whatever set reference in *"the controller - step 7". naming datalist make function getdatalist(), whereas naming datalist make getdatalist(). note capital "l".

hope helps others running problem.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -