esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ethan Jewett <esjew...@gmail.com>
Subject Re: JQuery based client: Help needed
Date Fri, 26 Mar 2010 13:12:46 GMT
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 <hirsch.dick@gmail.com> wrote:
> @Ethan - did you ever get chance to start this ?
>
> D,.
>
> On Wed, Mar 17, 2010 at 4:06 PM, Ethan Jewett <esjewett@gmail.com> 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 <hirsch.dick@gmail.com>
>> 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 <esjewett@gmail.com>
>> 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 <hirsch.dick@gmail.com>
>> >> 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.
>> >> >
>> >>
>> >
>>
>

Mime
View raw message