Created
December 20, 2008 09:37
-
-
Save Rajmohan/38275 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mashup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema ../src/schemas/EMMLSpec.xsd" | |
xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema" | |
name="GoogleReaderSubscriptionService"> | |
<emml-meta name="author">Raj Krishnamurthy(raj@jackbe.com)</emml-meta> | |
<input name="email" type="string" default="jackbe.team@gmail.com" /> | |
<input name="password" type="string" default="jackbejack" /> | |
<output name="result" type="document"/> | |
<!-- Google Client Authentication --> | |
<variables> | |
<variable name="reqheaders" type="document"> | |
<![CDATA[ | |
<headers> | |
<Content-type>application/x-www-form-urlencoded</Content-type> | |
</headers> | |
]]> | |
</variable> | |
</variables> | |
<directinvoke endpoint="https://www.google.com/accounts/ClientLogin" | |
method="post" | |
accountType="GOOGLE" | |
Email="$email" | |
Passwd= "$password" | |
service="reader" | |
source="jackbe-jems" | |
header="$reqheaders" | |
outputvariable="result"/> | |
<!-- Extract SID value from response --> | |
<variable name="sid" type="string"/> | |
<script type="text/javascript"> | |
<![CDATA[ | |
var r = new String(result) | |
var ar = r.split("="); | |
sid = ar[1].slice(0,-4) | |
]]> | |
</script> | |
<!-- Send SID as Cookie with Google Reader Subscription Query --> | |
<constructor outputvariable="cookiesdoc"> | |
<cookies> | |
<cookie path="/" name="SID" domain=".google.com">{$sid}</cookie> | |
</cookies> | |
</constructor> | |
<directinvoke endpoint="http://www.google.com/reader/atom/user/-/pref/com.google/subscriptions" | |
outputvariable="result" cookies="$cookiesdoc"/> | |
</mashup> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment