Got pretty far - converted the XML stream from the API2 method to JSON and tried to use the existing script to display the messages. No luck, because the message format is different between that returned by the API2 call and that used by the comet-based streams :-<
On Sun, Apr 4, 2010 at 1:45 AM, Ethan Jewett <[email protected]> wrote: > Cool. Sorry I never got to helping out with this. I just never got set > up to try it. Glad you were able to make some good progress anyway! > > Ethan > > On Sat, Apr 3, 2010 at 12:36 AM, Richard Hirsch <[email protected]> > wrote: > > Made some progress with the client. > > > > Made the correct calls with the API2 + JQuery and now I'm trying to > convert > > a XMLHTTPRequest into JSON. > > > > D. > > > > On Fri, Mar 26, 2010 at 2:12 PM, Ethan Jewett <[email protected]> > wrote: > > > >> No, I haven't gotten around to it yet. I'll see how it goes today and > >> this weekend. Have you been able to try it again? Would be interested > >> to see what type of response codes you get. > >> > >> Ethan > >> > >> On Thu, Mar 25, 2010 at 11:22 PM, Richard Hirsch <[email protected] > > > >> wrote: > >> > @Ethan - did you ever get chance to start this ? > >> > > >> > D,. > >> > > >> > On Wed, Mar 17, 2010 at 4:06 PM, Ethan Jewett <[email protected]> > >> wrote: > >> > > >> >> Interesting. I'll have to look at the old client and see if I can > >> >> figure out the basic steps to get started. May not be until this > >> >> weekend, but hopefully I'll be able to look at it tonight. > >> >> > >> >> Ethan > >> >> > >> >> On Wed, Mar 17, 2010 at 11:02 AM, Richard Hirsch < > [email protected] > >> > > >> >> wrote: > >> >> > @Ethan: Ideally, it would be code that runs in a browser. First > step > >> is > >> >> > hard-code the token. It could later be take from a session cookie > and > >> set > >> >> > via other means. > >> >> > > >> >> > I'd like to have a small component that I'd could place in various > >> >> > environments (Visual Composer, 12sprints, etc.) and set the context > >> via > >> >> > request parameters. Like what Sig did with Thingamy but in a format > >> that > >> >> > could be used everywhere. > >> >> > > >> >> > We have an old javascript-based client but I wanted to use JQuery > to > >> be > >> >> able > >> >> > to re-use all our existing code. > >> >> > > >> >> > Posting messages could come later. > >> >> > > >> >> > If you could help that would be great. > >> >> > > >> >> > D. > >> >> > > >> >> > On Wed, Mar 17, 2010 at 3:55 PM, Ethan Jewett <[email protected]> > >> >> wrote: > >> >> > > >> >> >> Hi Dick, > >> >> >> > >> >> >> Would love to help. API2 is my favorite topic :-) > >> >> >> > >> >> >> Are you trying to do this from within the web interface? Within a > >> >> >> browser? If so, then I think your requests will already have a > >> session > >> >> >> attached. If not, then you should take the contents of the > response > >> >> >> from your post to api2/session and include the value in the header > of > >> >> >> your subsequent requests. I don't think this is native JQuery > >> >> >> functionality, but we can work through it. > >> >> >> > >> >> >> Also, the API2 returns XML, not JSON, so you should probably use > the > >> >> >> generic get/post methods and specify the content type as "xml". > >> >> >> > >> >> >> Did the code you have below work for you or were you having an > issue > >> >> with > >> >> >> it? > >> >> >> > >> >> >> Ethan > >> >> >> > >> >> >> On Wed, Mar 17, 2010 at 8:00 AM, Richard Hirsch < > >> [email protected]> > >> >> >> wrote: > >> >> >> > I have some cool ideas about using a JQuery based client > >> application > >> >> in a > >> >> >> > few integration scenarios. I'd like to use the API2 to login and > >> >> return > >> >> >> > messages that are filtered by terms passed in Query params. I'dl > >> ike > >> >> to > >> >> >> use > >> >> >> > the existing jquery scripts / HTML code to display the > information. > >> >> >> > > >> >> >> > I've tried to do this on my own but haven't gotten very far. > >> >> >> > > >> >> >> > $.postJSON("http://localhost:8080.com > >> >> >> > /api2/session?token=33UD2J50T5APTWOWXGZFME3VYFBCPVYA") > >> >> >> > > >> >> >> > $.getJSON("http://localhost:8080.com/api2/user/&callback=?", > >> >> >> > function(data){ > >> >> >> > > >> >> >> > $.each(data, function(i,item){ > >> >> >> > > >> >> >> > $("#tweets").append(item.text + "<BR/>"); > >> >> >> > > >> >> >> > }); > >> >> >> > }); > >> >> >> > > >> >> >> > Could somebody give me hand? > >> >> >> > > >> >> >> > D. > >> >> >> > > >> >> >> > >> >> > > >> >> > >> > > >> > > >
