<?xml version="1.0" encoding="utf-8" ?>
<ignite version="1.0" source="enclout">

  <func name="content" endpoint="http://www.enclout.com/api/content/show.json?" method="GET" format="JSON"  >
    <description>
      This function returns content meta information related to a domain.
    </description>
    <example>
      =Ignite("enclout","content","meta_keywords","http://www.enclout.com")
    </example>
    <inputs>
      <input name="url" type ="input1"/>
      <input name="auth_token" type="config" value="JPbbCaVFYdnpm2xY9aq1"/>
    </inputs>
    <outputs>
      <output name="redirect_url" path="redirect_url"/>
      <output name="category" path="category"/>
      <output name="meta_description" path="meta_description"/>
      <output name="meta_keywords" path="meta_keywords"/>
      <output name="language" path="language"/>
      <output name="domain_words" path="domain_words"/>
      <output name="ALL" path="" />
    </outputs>
  </func>

  <func name="dmoz" endpoint="http://www.enclout.com/api/dmoz/show.json?" method="GET" format="JSON" jsonRootForXML="dmoz">
    <description>
      This function returns DMOZ category for a given domain.
    </description>
    <example>
      =Ignite("enclout","dmoz","English","http://www.google.com")
    </example>
    <inputs>
      <input name="url" type ="input1"/>
      <input name="auth_token" type="config" value="JPbbCaVFYdnpm2xY9aq1"/>
    </inputs>
    <outputs>
      <output name="English" path="//dmoz/dmoz_categories[Language='English']/Category" cloud_path="//dmoz_category[Language='English']/Category"/>
      <output name="Spanish" path="//dmoz/dmoz_categories[Language='Spanish']/Category" cloud_path="//dmoz_category[Language='Spanish']/Category"/>
      <output name="French" path="//dmoz/dmoz_categories[Language='French']/Category" cloud_path="//dmoz_category[Language='French']/Category"/>
      <output name="German" path="//dmoz/dmoz_categories[Language='German']/Category" cloud_path="//dmoz_category[Language='German']/Category"/>
    </outputs>
    <status ERROR_path="" OK_path="" />
  </func>

  <func name="dns" endpoint="http://www.enclout.com/api/dns/show.json?" method="GET" format="JSON" jsonRootForXML="dns">
    <description>
      This function returns DNS data for a given domain.
    </description>
    <example>
      =Ignite("enclout","dns","A","http://www.enclout.com")
    </example>
    <inputs>
      <input name="url" type ="input1"/>
      <input name="auth_token" type="config" value="JPbbCaVFYdnpm2xY9aq1"/>
    </inputs>
    <outputs>
      <output name="SOA" path="//dns/dns_entries[Type='SOA']/RData" cloud_path="//dns_entry[Type='SOA']/RData" />
      <output name="A" path="//dns/dns_entries[Type='A']/RData" cloud_path="//dns_entry[Type='A']/RData"/>
      <output name="AAAA" path="//dns/dns_entries[Type='AAAA']/RData" cloud_path="//dns_entry[Type='AAAA']/RData"/>
      <output name="NS" path="//dns/dns_entries[Type='NS']/RData" cloud_path="//dns_entry[Type='NS']/RData" />
      <output name="MX" path="//dns/dns_entries[Type='MX']/RData" cloud_path="//dns_entry[Type='MX']/RData"/>
    </outputs>
    <status ERROR_path="" OK_path="" />
  </func>

  <func name="urlparser" endpoint="http://www.enclout.com/api/urlparser/show.xml?" method="GET" format="XML">
    <description>
      This function parses a given URL and returns back any valid part.
    </description>
    <example>
      =Ignite("enclout","urlparser","root-domain-ascii","http://www.enclout.com")
    </example>
    <inputs>
      <input name="url" type ="input1"/>
      <input name="auth_token" type="config" value="JPbbCaVFYdnpm2xY9aq1"/>
    </inputs>
    <outputs>
      <output name="root-domain-ascii" path="//urlparser/root-domain-ascii"/>
      <output name="root-domain-unicode" path="//urlparser/root-domain-unicode"/>
      <output name="host-ascii" path="//urlparser/host-ascii"/>
      <output name="host-unicode" path="//urlparser/host-unicode"/>
      <output name="scheme" path="//urlparser/scheme"/>
      <output name="path" path="//urlparser/path"/>
      <output name="query" path="//urlparser/query"/>
      <output name="fragment" path="//urlparser/fragment"/>
      <output name="userinfo" path="//urlparser/userinfo"/>
      <output name="port" path="//urlparser/port"/>
    </outputs>
    <status ERROR_path="//status[. != 'OK']" OK_path="//status[. = 'OK']" />
  </func>

  <func name="whois" endpoint="http://www.enclout.com/api/whois/show.xml?" method="GET" format="XML">
    <description>
      This function returns whois data for a given domain.
    </description>
    <example>
      =Ignite("enclout","whois","technical-contact-name","http://www.enclout.com")
    </example>
    <inputs>
      <input name="url" type ="input1"/>
      <input name="auth_token" type="config" value="JPbbCaVFYdnpm2xY9aq1"/>
    </inputs>
    <outputs>
      <output name="admin-contact" path="//whois/admin-contact" />
      <output name="admin-contact-name" path="//whois/admin-contact/name" />
      <output name="admin-contact-organization" path="//whois/admin-contact/organization" />
      <output name="admin-contact-email" path="//whois/admin-contact/email" />
      <output name="admin-contact-phone" path="//whois/admin-contact/phone" />
      <output name="admin-contact-fax" path="//whois/admin-contact/fax" />

      <output name="technical-contact" path="//whois/technical-contact" />
      <output name="technical-contact-name" path="//whois/technical-contact/name" />
      <output name="technical-contact-organization" path="//whois/technical-contact/organization" />
      <output name="technical-contact-email" path="//whois/technical-contact/email" />
      <output name="technical-contact-phone" path="//whois/technical-contact/phone" />
      <output name="technical-contact-fax" path="//whois/technical-contact/fax" />

      <output name="registrant-contact" path="//whois/registrant-contact" />
      <output name="registrant-contact-name" path="//whois/registrant-contact/name" />
      <output name="registrant-contact-organization" path="//whois/registrant-contact/organization" />
      <output name="registrant-contact-email" path="//whois/registrant-contact/email" />
      <output name="registrant-contact-phone" path="//whois/registrant-contact/phone" />
      <output name="registrant-contact-fax" path="//whois/registrant-contact/fax" />

      <output name="domain-status" path="//whois/domain-status"/>
      <output name="ALL" />
    </outputs>
    <status ERROR_path="" OK_path="" />
  </func>

    <func name="phone" endpoint="http://www.enclout.com/api/phone/show.xml?" method="GET" format="XML">
    <description>
      This function returns parsed phone numbers
    </description>
    <example>
      =Ignite("enclout","phone","formatted","206 555 1212 x 1234")
    </example>
    <inputs>
      <input name="text" type ="input1"/>
      <input name="auth_token" type="config" value="JPbbCaVFYdnpm2xY9aq1"/>
    </inputs>
    <outputs>
      <output name="is-valid" path="//phone/is-valid" />
      <output name="is-possible" path="//phone/is-possible" />
      <output name="types" path="//phone/types" />
      <output name="countries" path="//phone/countries" />
      <output name="formatted" path="//phone/formatted" />
      <output name="sanitized" path="//phone/sanitized" />
      <output name="extension" path="//phone/extension" />
    </outputs>
    <status ERROR_path="" OK_path="" />
  </func>
  
  <func name="yahoo_stock" endpoint="http://www.enclout.com/api/yahoo_finance/show.xml?" method="GET" format="XML">
    <description>
      This function returns stock information from Yahoo Finance. 
    </description>
    <example>
      =Ignite("enclout","yahoo_stock","close","AAPL")
    </example>
    <inputs>
      <input name="text" type ="input1"/>
      <input name="auth_token" type="config" value="JPbbCaVFYdnpm2xY9aq1"/>
    </inputs>
    <outputs>
      <output name="symbol" path="//stock/symbol" />
      <output name="ask" path="//stock/ask" />
      <output name="bid" path="//stock/bid" />
      <output name="low" path="//stock/low" />
      <output name="high" path="//stock/high" />
      <output name="low_52_weeks" path="//stock/low_52_weeks" />
      <output name="high_52_weeks" path="//stock/high_52_weeks" />
      <output name="volume" path="//stock/volume" />
      <output name="open" path="//stock/open" />
      <output name="close" path="//stock/close" />
    </outputs>
    <status ERROR_path="" OK_path="" />
  </func>

  <examples>
    <![CDATA[

<table border='1' class='ExcelTable2007'>
<tr><th class='heading'>&nbsp;</th><th>A</th><th>B (Forumla)</th><th>C (Output) </th></tr>
<tr><td class='heading' >1</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","content","redirect_url",A1)</td>
<td>https://www.facebook.com/</td>
</tr>
<tr><td class='heading' >2</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","content","category",A2)</td>
<td>Recreation</td>
</tr>
<tr><td class='heading' >3</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","content","meta_description",A3)</td>
<td>Facebook is a social utility that connects people with friends and others who work, study and live around them. People use Facebook to keep up with friends, upload an unlimited number of photos, post links and videos, and learn more about the people they meet.</td>
</tr>
<tr><td class='heading' >4</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","content","language",A4)</td>
<td>English</td>
</tr>
<tr><td class='heading' >5</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","content","domain_words",A5)</td>
<td>["Face","Book"]</td>
</tr>
<tr><td class='heading' >6</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","dmoz","English",A6)</td>
<td>Computers: Internet: On the Web: Online Communities: Social Networking: Facebook</td>
</tr>
<tr><td class='heading' >7</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","dns","A",A7)</td>
<td>173.252.100.16</td>
</tr>
<tr><td class='heading' >8</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","dns","NS",A8)</td>
<td>a.ns.facebook.com.,b.ns.facebook.com.</td>
</tr>
<tr><td class='heading' >9</td>
<td>https://www.facebook.com/facebook/info</td>
<td>=Ignite("enclout","urlparser","root-domain-ascii",A9)</td>
<td>facebook.com</td>
</tr>
<tr><td class='heading' >10</td>
<td>https://www.facebook.com/facebook/info</td>
<td>=Ignite("enclout","urlparser","path",A10)</td>
<td>/facebook/info</td>
</tr>
<tr><td class='heading' >11</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","whois","admin-contact-name",A11)</td>
<td>Domain Administrator</td>
</tr>
<tr><td class='heading' >12</td>
<td>http://facebook.com</td>
<td>=Ignite("enclout","whois","domain-status",A12)</td>
<td><status>clientDeleteProhibited, clientTransferProhibited, clientUpdateProhibited, serverDeleteProhibited, serverTransferProhibited, serverUpdateProhibited</status>
</td>
</tr>
<tr><td class='heading' >13</td>
<td>202 555 1212 x   123</td>
<td>=Ignite("enclout","phone","formatted",A13)</td>
<td>+1 (202) 555-1212 ext. 123</td>
</tr>
<tr><td class='heading' >14</td>
<td>AAPL</td>
<td>=Ignite("enclout","yahoo_stock","close","AAPL")</td>
<td>115.47</td>
</tr>
</table>
      ]]>
  </examples>

</ignite>

