Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial version of opencalais

  • Loading branch information...
commit b3d3d4c127f2a43f99d26d507f4998fce795430a 1 parent f0a77fd
Sam Pullara authored
Showing with 41 additions and 0 deletions.
  1. +41 −0 opencalais/opencalais.api.xml
41 opencalais/opencalais.api.xml
View
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" https="false">
+<meta>
+ <author>Sam Pullara (TableSaw)</author>
+ <description>OpenCalais will analyze content and return semantic information about the content.</description>
+ <documentationURL>http://www.opencalais.com/documentation/calais-web-service-api</documentationURL>
+ <sampleQuery>select * from {table} where licenseID='your key' and content='Madonna';</sampleQuery>
+</meta>
+<bindings>
+ <select produces="XML">
+ <urls>
+ <url>http://api.opencalais.com/enlighten/rest/</url>
+ </urls>
+ <inputs>
+ <key id="licenseID" type="xs:string" paramType="query" required="true"/>
+ <key id="content" type="xs:string" paramType="variable" required="true"/>
+ <key id="paramsXML" type="xs:string" paramType="query"/>
+ </inputs>
+ <execute><![CDATA[
+var request = request.contentType("application/x-www-form-urlencoded");
+var encoded = encodeURIComponent(content);
+response.object = request.post("content=" + encoded).response;
+ ]]></execute>
+ </select>
+ <select produces="XML">
+ <urls>
+ <url>http://api.opencalais.com/enlighten/rest/</url>
+ </urls>
+ <inputs>
+ <key id="licenseID" type="xs:string" paramType="query" required="true"/>
+ <key id="url" type="xs:string" paramType="variable" required="true"/>
+ <key id="paramsXML" type="xs:string" paramType="query"/>
+ </inputs>
+ <execute><![CDATA[
+var request = request.contentType("application/x-www-form-urlencoded");
+var encoded = encodeURIComponent(y.rest(url).get().response.toString());
+response.object = request.post("content=" + encoded).response;
+ ]]></execute>
+ </select>
+</bindings>
+</table>
Please sign in to comment.
Something went wrong with that request. Please try again.