Return-Path: Delivered-To: apmail-incubator-esme-dev-archive@minotaur.apache.org Received: (qmail 69023 invoked from network); 17 Mar 2010 14:56:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Mar 2010 14:56:14 -0000 Received: (qmail 79849 invoked by uid 500); 17 Mar 2010 14:56:14 -0000 Delivered-To: apmail-incubator-esme-dev-archive@incubator.apache.org Received: (qmail 79808 invoked by uid 500); 17 Mar 2010 14:56:14 -0000 Mailing-List: contact esme-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: esme-dev@incubator.apache.org Delivered-To: mailing list esme-dev@incubator.apache.org Received: (qmail 79797 invoked by uid 99); 17 Mar 2010 14:56:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Mar 2010 14:56:13 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of esjewett@gmail.com designates 74.125.83.175 as permitted sender) Received: from [74.125.83.175] (HELO mail-pv0-f175.google.com) (74.125.83.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Mar 2010 14:56:08 +0000 Received: by pvc21 with SMTP id 21so516196pvc.6 for ; Wed, 17 Mar 2010 07:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=DeKOSRMREvIbzyfbncNzzWUQSYE0iYsi4CNgH2oTl2Q=; b=PYM/wc455qDhhVrlWydDuRUizcKSMG5yhKddc1SEgcFOQIUNa44o8QFefZrzyLL5j+ b67E3F4k7rd6KFa6CCOqtgwTO6HudAYMIwll3LHzgXGu5Pw25/qyyxDof2cmfrYqfXlZ Gl2ILORqbLkWjJHdNBuN10WMEtC3ZnRr1yhYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=bMfPgB3sgulrVuEfAeffuk8BAoyG6G4zl1IO91RDm8qB4WfYQPoEVeR6OSSXcYDzEg 0BX6EIb+bS32A0nPqlrW1Q46spfXInxKgT8Oqjy2cQRJVcYGCC68JpJU/8MQ41HqT4Ne JP8wX3kQ1R2HZj8kv/igvU4QRIQ2GOXg3BMcs= MIME-Version: 1.0 Received: by 10.141.124.9 with SMTP id b9mr835392rvn.276.1268837747541; Wed, 17 Mar 2010 07:55:47 -0700 (PDT) In-Reply-To: References: Date: Wed, 17 Mar 2010 10:55:47 -0400 Message-ID: <68f4a0e81003170755l1bf7a6c8ob0ac2da6c81d3517@mail.gmail.com> Subject: Re: JQuery based client: Help needed From: Ethan Jewett To: esme-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 i= t? Ethan On Wed, Mar 17, 2010 at 8:00 AM, Richard Hirsch wro= te: > 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 u= se > 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. > > =A0$.postJSON("http://localhost:8080.com > /api2/session?token=3D33UD2J50T5APTWOWXGZFME3VYFBCPVYA") > > $.getJSON("http://localhost:8080.com/api2/user/&callback=3D?", > =A0 =A0 =A0 function(data){ > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 $.each(data, function(i,item){ > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $("#tweets").append(item.text= + "
"); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 }); > =A0 =A0 =A0 }); > > Could somebody give me hand? > > D. >