@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. > >> > > >> > > >
