1

I am currently stuck on a task in which I have to use jQuery ajax to retrieve messages from PARSE HERE API to create something like this:

http://chatbuilder.hackreactor.com/?example=1&username=aa

I was wondering if anyone could explain to me how to use REST api to retrieve messages.

I have looked at other people's coding examples:

https://github.com/stevernator/Chatbuilder/blob/master/draft11

and

https://gist.github.com/guymorita/5726564

They seem to use ajax code like below:

        $.ajax({
          url: "https://api.parse.com/1/classes/chats",
          dataType: "json",
          success: function(data) {
            var stuff = [];
            for(i=0; i < 10; i++) {
              stuff[i] = data.results[i].text 
            }

My question is: from where are the messages being generated from in this app? Do I have to create an account at Parse or would I just use ajax to retrieve this url link:"https://api.parse.com/1/classes/chats"?

Also, where would I find info on this specific class (chats)? Any input would be greatly appreciated. Thanks!

2
  • I don't think you understand what Parse does. The chat message objects are both created and retrieved through the Parse API, and they're specific to your particular account and project. Parse is a way of storing objects for your application: you're not using it to retrieve other people's chats or anything like that. Commented Jul 4, 2013 at 19:25
  • Ah I see. That clarifies things a lot. So this requires me to learn Parse to create an object containing the messages then I would have to link this API to my application, correct? Do you recommend the Quick Start Guide for JavaScript or Windows? Or how can I learn this API quickly? Commented Jul 4, 2013 at 20:00

1 Answer 1

3

The parse quick start guide is a very good place to start. The documentation is really good but the tutorials for the JS API are far more complex (backbone) than the documentation. I would download the Todos tutorial as there is some good stuff in it but if you dont know how backbone works its harder to read. I would have made this a comment but I don't have enough rep :(.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.