Skip to content

Instantly share code, notes, and snippets.

@Rajmohan
Created December 20, 2008 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rajmohan/38275 to your computer and use it in GitHub Desktop.
Save Rajmohan/38275 to your computer and use it in GitHub Desktop.
<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