Skip to content

Instantly share code, notes, and snippets.

@greatghoul
Created September 28, 2012 15:13
Show Gist options
  • Save greatghoul/3800441 to your computer and use it in GitHub Desktop.
Save greatghoul/3800441 to your computer and use it in GitHub Desktop.
Gist Gmail Gadget
<?xml version="1.0" encoding="UTF-8" ?>
<ApplicationManifest xmlns="http://schemas.google.com/ApplicationManifest/2009">
<!-- Support info to show in the marketplace & control panel -->
<Support>
<!-- URL for application setup as an optional redirect during the install -->
<Link rel="setup" href="http://_example.com_/google/setup.php?domain=${DOMAIN_NAME}" />
<!-- URL for application configuration, accessed from the app settings
page in the control panel -->
<Link rel="manage" href="http://_example.com_/google/admin.php?domain=${DOMAIN_NAME}" />
<!-- URL explaining how customers get support. -->
<Link rel="support" href="http://_example.com_/google/support.php" />
<!-- URL that is displayed to admins during the deletion process,
to specify policies such as data retention, how to claim accounts, etc. -->
<Link rel="deletion-policy" href="http://_example.com_/google/deletion-policy.php" />
</Support>
<!-- Name and description pulled from message bundles -->
<Name>HelloWorld</Name>
<Description>A simple Hello World application for testing
Gmail contextual gadgets</Description>
<!-- Show this link in Google's universal navigation for all users -->
<Extension id="navLink" type="link">
<Name>HelloWorld</Name>
<Url>http://_example.com_/home.php?from=google&domain=${DOMAIN_NAME}</Url>
</Extension>
<!-- Declare our OpenID realm so our app is white listed -->
<Extension id="realm" type="openIdRealm">
<Url>http://_example.com_</Url>
</Extension>
<!-- EXTRACTOR -->
<Extension id="HelloWorldExtractor" type="contextExtractor">
<Name>Hello World</Name>
<Url>google.com:HelloWorld</Url>
<!-- Uncomment this Param to apply a filter to the extractor's
default output. The example regexp below makes the match case sensitive.
<Param name="hello" value="H[a-z]* W[a-z]*"/> -->
<Triggers ref="HelloWorldGadget"/>
<Scope ref="emailSubject"/>
<Scope ref="emailBody"/>
<Container name="mail"/>
</Extension>
<!-- GADGET -->
<Extension id="HelloWorldGadget" type="gadget">
<Name>Hello World Gmail contextual gadget</Name>
<Url>_http://example.com/gadgets/hello_world_gadget.xml_</Url>
<Container name="mail"/>
<!-- Uncomment this to enable Caja. -->
<!-- <Param name="caja" value="enabled"/> -->
</Extension>
<!-- SCOPE -->
<Scope id="emailSubject">
<Url>tag:google.com,2010:auth/contextual/extractor/SUBJECT</Url>
<Reason>This application searches the Subject: line of each email
for the text "Hello World."</Reason>
</Scope>
<Scope id="emailBody">
<Url>tag:google.com,2010:auth/contextual/extractor/BODY</Url>
<Reason>This application searches the message body of each email
for the text "Hello World."</Reason>
</Scope>
</ApplicationManifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment