incubator-esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ethan Jewett <esjew...@gmail.com>
Subject ESME API via YQL
Date Mon, 07 Sep 2009 22:06:24 GMT
Hi all,

This is a heads up that the YQL (http://developer.yahoo.com/yql/)
wrapper for the ESME API is starting to take shape. The structure of
the YQL abstraction mirrors the conceptual API design on the cwiki
wherever possible
(http://cwiki.apache.org/confluence/display/ESME/API+2.0+-+Design).

The Open data tables definitions are available at
http://github.com/esjewett/yql-tables/tree/master under the "esme"
folder.

To quickly get it working, take the following steps:

1. Set up a token on the Stax deployment at
http://esmecloudserverapache.dickhirsch.staxapps.net/
2. Go to the YQL console at http://developer.yahoo.com/yql/console/
3. Paste the following into the console to set up a session where
"token_value" is your token:

use "http://github.com/esjewett/yql-tables/raw/9a9071d92ad6d7b6908703c05acbf3cb3e5ea45b/esme/esme.sessions.xml";
insert into esme.sessions (esme_api_endpoint,token) VALUES
("http://esmecloudserverapache.dickhirsch.staxapps.net/api/","token_value")

4. Copy the session cookie out of the result. It looks something like
the following and is between XML tags "<set-cookie>" and
"</set-cookie>".

JSESSIONID=BF04121669016B36B6FD9; Path=/

5. Paste the following into the console to grab a list of all
messages, replacing "cookie_value" with the session cookie you copied
in step 4:

use "http://github.com/esjewett/yql-tables/raw/9a9071d92ad6d7b6908703c05acbf3cb3e5ea45b/esme/esme.messages.xml";
select * from esme.messages WHERE
esme_api_endpoint="http://esmecloudserverapache.dickhirsch.staxapps.net/api"
AND cookie="cookie_value"



Some notes:

1. This will work with any API endpoint.
2. The open data table files contain examples of all functions. It
supports setting and destroying sessions, listing and sending message,
listing all users, listing followers, listing followed, and following.
3. Unfollowing is mysteriously not working (it is timing out after
30000 ms). I'd love it if someone knew why this was happening, but
otherwise I'll investigate further myself.
4. I'll be adding other API functions as I am able.
5. This is more of a conceptual exercise than anything else. I don't
anticipate that it will significantly increase the usability of the
API for developers, but it does expose a sort of command-line access
to the API to more casual developers.



Enjoy!

Ethan

Mime
View raw message