Page 1 of 2

Parse REST integration

Posted: Fri Dec 14, 2012 4:29 pm
by Nathan Kahl

Three Questions:
1) To use parse.com push notifications, I need to have an array in my REST post request...It doesn't work currently in the HTML5 editor any work arounds?
2) On all my POST requests to parse, the result contains an array--this isn't supported by the HTML5 editor "response" section--will this be fixed?
3) Is there a time widget we can use that acts like the date one?


Parse REST integration

Posted: Fri Dec 14, 2012 4:43 pm
by Kateryna Grynko

Hello,

1) Please clarify what exactly doesn't work
2) This will be fixed in the end of next month
3) We don't have special widgets for time


Parse REST integration

Posted: Fri Dec 14, 2012 4:50 pm
by Nathan Kahl

1) Within the post request, I include my Application ID, REST API Key, and then i need to include an array Data: {"alert":"This is a test","badge":"increment"}....but arrays are not supported within the tiggzi request UI....does that help?

2) End of December or January?

Thanks for your great support!
Nate


Parse REST integration

Posted: Sat Dec 15, 2012 4:25 pm
by maxkatz

If you create the array in JavaScript (in mapping), it should work.


Parse REST integration

Posted: Sun Dec 16, 2012 12:23 am
by Nathan Kahl

That doesn't work. The response from parse is invalid json. Have you been able to implement push with parse.com?


Parse REST integration

Posted: Sun Dec 16, 2012 12:49 am
by maxkatz

Check the JSON you are sending. Do a console.log(...) just before you return it and also view what's being sent with Chrome Dev. Tools. If the JSON format is correct, it should work.


Parse REST integration

Posted: Sun Dec 16, 2012 1:08 am
by Nathan Kahl

This is the response i get " DEBUG INFO: testConnection[uri=https://api.parse.com/1/push,method=p...] any ideas?


Parse REST integration

Posted: Sun Dec 16, 2012 1:48 am
by maxkatz

That doesn't seem right.. where exactly did you put the log statement?

Just to answer your question above, I haven't tried Push with Parse but I did try sending a JSON array as request parameter created in JavaScript.


Parse REST integration

Posted: Sun Dec 16, 2012 2:16 am
by Nathan Kahl

I cannot get it to work using the rest service, so I am trying Javascript. When I try to execute the parse.js code for push notifications--it does not work. I've tried to add it in on a button click, as well as on project load--and it wont work. When I create a project in dreamweaver, using the same code, it works without a problem.. Here is the code:

Code: Select all

 Parse.initialize("KEY", "KEY"); 

 Parse.Push.send({ 

channels: [ "Giants", "Mets" ],
data: {
alert: "The Giants won against the Mets 2-3."
}
}, {
success: function() {
// Push was successful
},
error: function(error) {
// Handle error
}
});

Any ideas why that doesn't work in Tiggzi?


Parse REST integration

Posted: Sun Dec 16, 2012 2:19 am
by maxkatz

I'm not sure, I have never tried Parse's Push feature. Did you include all the required libraries?

Tiggzi is the app builder, the app runs in the browser.