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/[email protected]/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
