Advertisement
IzaacJ

Fail! Parse Cloud Code to update local WP8 appstore listings

Feb 11th, 2014
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // New source code available here: http://pastebin.com/pa6H37LQ
  2.  
  3. Parse.Cloud.job("getWP8Apps", function(request, response) {
  4.   Parse.Cloud.useMasterKey();
  5.   var counter = 0;
  6.   var query = new Parse.Query(Parse.developer);
  7.   query.each(function(developer) {
  8.     Parse.Cloud.httpRequest({
  9.       url: 'http://http://zunderstorehost.azurewebsites.net/api/WP8AppStoreAppList/Publisher/' . developer.publisherName,
  10.       success: function(httpResponse) {
  11.         var apps = httpResponse.data;
  12.         for(var app in apps) {
  13.           var newapp = Parse.Object.extend("application");
  14.           var newApp = new newapp();
  15.           newApp = app;
  16.           newApp.save();
  17.         }
  18.       }
  19.     });
  20.   });
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement