Return-Path: Delivered-To: apmail-incubator-esme-dev-archive@minotaur.apache.org Received: (qmail 52988 invoked from network); 14 Feb 2009 22:50:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Feb 2009 22:50:23 -0000 Received: (qmail 44096 invoked by uid 500); 14 Feb 2009 22:50:22 -0000 Delivered-To: apmail-incubator-esme-dev-archive@incubator.apache.org Received: (qmail 44068 invoked by uid 500); 14 Feb 2009 22:50:22 -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 44057 invoked by uid 99); 14 Feb 2009 22:50:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Feb 2009 14:50:22 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [194.138.12.133] (HELO mxs2.siemens.at) (194.138.12.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Feb 2009 22:50:12 +0000 Received: from vies1k7x.sie.siemens.at ([158.226.129.83]) by mxs2.siemens.at with ESMTP id n1EMnw8J004372 for ; Sat, 14 Feb 2009 23:49:58 +0100 Received: from nets138a.ww300.siemens.net ([192.168.217.3]) by vies1k7x.sie.siemens.at (8.12.11.20060308/8.12.1) with ESMTP id n1EMniTj026095 for ; Sat, 14 Feb 2009 23:49:50 +0100 Received: from nets13ja.ww300.siemens.net ([158.226.250.79]) by nets138a.ww300.siemens.net with Microsoft SMTPSVC(6.0.3790.3959); Sat, 14 Feb 2009 23:49:43 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C98EF6.86CC082E" Subject: AW: Twitter RESTful API Date: Sat, 14 Feb 2009 23:48:04 +0100 Message-ID: <30DB6ACF50A0A3439F39EFEB1C52E166078F22F8@nets13ja.ww300.siemens.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: <30DB6ACF50A0A3439F39EFEB1C52E166078F22F8@nets13ja.ww300.siemens.net> Thread-Topic: Twitter RESTful API Thread-Index: AcmOwsRrHEi8CiGxSe6vbdaU1R2o5gAMpx65AAA6tJo= References: <30DB6ACF50A0A3439F39EFEB1C52E166078F22F7@nets13ja.ww300.siemens.net> From: "Hirsch, Richard" To: X-OriginalArrivalTime: 14 Feb 2009 22:49:43.0392 (UTC) FILETIME=[86F2AE00:01C98EF6] X-purgate: clean X-purgate: This mail is considered clean X-purgate-type: clean X-purgate-Ad: Checked for Spam by eleven - eXpurgate www.eXpurgate.net X-purgate-ID: 149917::090214234958-04DC8BA0-46AB11D5/0-0/0-15 X-purgate-size: 14538/999999 X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C98EF6.86CC082E Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Just tried = http://esmecloudserverapache.dickhirsch.staxapps.net/twitter/statuses/pub= lic_timeline.xml it works. Twhirl is however asking for = /twitter/api/statuses/public_timeline.xml. "API" is missing.=20 =20 If you add api to the url, twhirl will work as well. # =20 D.=20 ________________________________ Von: Hirsch, Richard Gesendet: Sa 2/14/2009 23:41 An: esme-dev@incubator.apache.org Betreff: AW: Twitter RESTful API Just tried twhirl based on this blog from shoutem = (http://blog.shoutem.com/2009/02/14/how-to-setup-shoutem-desktop-app-twhi= rl/). Example: Use this as your user: = apachedick@esmecloudserverapache.dickhirsch.staxapps.net/twitter Here are the results from the call - all 404s. I don't know whether the = problem is the "api" in the URL 62.47.189.9 - apachedick [14/Feb/2009:22:39:06 +0000] "GET = /twitter/api/account/verify_credentials.xml? HTTP/1.1" 404 1081 = "app:/twhirl.swf" "twhirl/0.9 (Windows; U; Windows XP; de) = AdobeAIR/1.5.0.7220" 62.47.189.9 - apachedick [14/Feb/2009:22:39:07 +0000] "GET = /twitter/api/statuses/friends_timeline.xml?count=3D20 HTTP/1.1" 404 1078 = "app:/twhirl.swf" "twhirl/0.9 (Windows; U; Windows XP; de) = AdobeAIR/1.5.0.7220" 62.47.189.9 - apachedick [14/Feb/2009:22:39:08 +0000] "GET = /twitter/api/statuses/replies.xml? HTTP/1.1" 404 1051 "app:/twhirl.swf" = "twhirl/0.9 (Windows; U; Windows XP; de) AdobeAIR/1.5.0.7220" 62.47.189.9 - apachedick [14/Feb/2009:22:39:09 +0000] "GET = /twitter/api/direct_messages.xml? HTTP/1.1" 404 1048 "app:/twhirl.swf" = "twhirl/0.9 (Windows; U; Windows XP; de) AdobeAIR/1.5.0.7220" 62.47.189.9 - apachedick [14/Feb/2009:22:39:10 +0000] "GET = /twitter/api/statuses/public_timeline.xml? HTTP/1.1" 404 1075 = "app:/twhirl.swf" "twhirl/0.9 (Windows; U; Windows XP; de) = AdobeAIR/1.5.0.7220" D. ________________________________ Von: vdichev@gmail.com im Auftrag von Vassil Dichev Gesendet: Sa 2/14/2009 17:38 An: esme-dev@incubator.apache.org Betreff: Twitter RESTful API Hello everyone, There's now partial Twitter RESTful API support for ESME in trunk. Here's what should work at this point: - user_timeline - friends_timeline - public_timeline - replies: currently same as user_timeline, might redo it to show = conversations - direct_messages: always empty, because we don't have these in ESME - verify_credentials: necessary for some Twitter clients All of the methods should automatically support both XML and JSON. HTTP Basic authentication is used. The URL prefix used for the API is "twitter" (it might make sense to make this configurable later on). So, how do we test this? I've tried with two Twitter clients- one which uses JSON and one which relies on XML. Here's a short description: 1. TwitterFox is a lightweight client implemented as a Firefox extension and uses JSON. Configuration: find your Firefox profile directory, go to extensions/twitternotifier@naan.net/components/ and open nsTwitterNotifier.js for editing. Find the line starting with "const TWITTER_API_URL" and change the value "https://twitter.com/" to point to your ESME host and port, e.g. "http://localhost:8080/twitter/". Make sure ESME is started, (re)start Firefox. 2. Twhirl is an Adobe AIR client, which uses XML for communicating with = Twitter. Unfortunately I didn't find an easy way to reconfigure where twhirl should connect (and didn't even try much). To work around the problem here, two things are necessary: -modifying the /etc/hosts file to change what twitter.com resolves to -using an Apache instance with URL rewriting is the second necessary part in deceiving twhirl to think it's connecting to twitter.com. I won't go into details how to do this, since there's the exhaustive Apache URL Rewriting guide: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html Testing twhirl isn't as easy as I'd hoped, I'm open for suggestions how I can improve it. Where to next? I'm not an UI guy and I'll be happy if people could test as many clients as possible and provide feedback and instructions. I'll gladly help if there are problems. What are the plans for extending the API? There are still at least as many API calls we can easily implement: - update: this is definitely the first one which must be implemented next- sending a message completes the communication loop - getting information: show user info or single message, show = friends/followers - adding and removing friends - updating a profile Of course, some refactoring is also necessary since there are some things which could be implemented in a more elegant way. That's all, sorry for making you wait this long for this feature. Don't forget, I'm waiting for your comments! Have fun, Vassil ------_=_NextPart_001_01C98EF6.86CC082E--