incubator-esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hirsch, Richard" <richard.hir...@siemens.com>
Subject RE: Twitter RESTful API
Date Sat, 14 Feb 2009 17:55:03 GMT
Sounds great.
 
I'll try and get the new version of ESME with the Twitter API up on Stax so that everyone
can try it soon.
 
If you want to look at another twitter client "Twitterrific " which just runs on Apple. Here
is the description how to test this intearction taken from the Present.ly blog (https://www.presentlyapp.com/blog)
 

*	Browse to the Twitterrific application in your Applications folder and Ctrl+Click it, selecting
"Show Package Contents" 
*	Open the Contents and Resources directories, then open up the defaults.plist file. 
*	Modify the baseUrl property to be yoursubdomain.presentlyapp.com/api/twitter 
*	Modify the protocol property to be https:// instead of http:// 
*	Save the file and launch Twitterrific 
*	Login using your Present.ly credentials 
*	Voila! 

I'd try it but I just have PCs available.
 
D. 

________________________________

From: vdichev@gmail.com on behalf of Vassil Dichev
Sent: Sat 2/14/2009 17:38
To: esme-dev@incubator.apache.org
Subject: 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



Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message