Permalink
Browse files

added stdicon.com mimetype webservice

  • Loading branch information...
1 parent a84bcd9 commit 2d52cb90124ebfdc4ac34ad40b924dae292c3ab3 @ptarjan ptarjan committed Aug 28, 2009
Showing with 148 additions and 0 deletions.
  1. +23 −0 mimetype/extension.xml
  2. +89 −0 mimetype/icon.xml
  3. +36 −0 mimetype/mimetype.xml
View
23 mimetype/extension.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Paul Tarjan</author>
+ <description>Mimetype translations</description>
+ <sampleQuery>SELECT * FROM {table} WHERE mimetype = "application/pdf"</sampleQuery>
+ <documentationURL>http://stdicon.com/</documentationURL>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/mimetype/{mimetype}</url>
+ </urls>
+ <inputs>
+ <key id="mimetype" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.get().response;
+]]>
+ </execute>
+ </select>
+ </bindings>
+</table>
View
89 mimetype/icon.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Paul Tarjan</author>
+ <description>Mimetype translations</description>
+ <sampleQuery>SELECT * FROM {table} WHERE mimetype = "application/pdf"</sampleQuery>
+ <sampleQuery>SELECT * FROM {table} WHERE file = "monkey.mp3"</sampleQuery>
+ <sampleQuery>SELECT * FROM {table} WHERE extension = "txt"</sampleQuery>
+ <sampleQuery>SELECT * FROM {table} WHERE extension = "html" AND iconset="apache"</sampleQuery>
+ <documentationURL>http://stdicon.com/</documentationURL>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/{iconset}/{mimetype}</url>
+ </urls>
+ <inputs>
+ <key id="mimetype" type="xs:string" paramType="path" required="true" />
+ <key id="iconset" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.url.toString();
+]]>
+ </execute>
+ </select>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/{iconset}/{file}</url>
+ </urls>
+ <inputs>
+ <key id="file" type="xs:string" paramType="path" required="true" />
+ <key id="iconset" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.url.toString();
+]]>
+ </execute>
+ </select>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/{iconset}/{extension}</url>
+ </urls>
+ <inputs>
+ <key id="extension" type="xs:string" paramType="path" required="true" />
+ <key id="iconset" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.url.toString();
+]]>
+ </execute>
+ </select>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/{mimetype}</url>
+ </urls>
+ <inputs>
+ <key id="mimetype" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.url.toString();
+]]>
+ </execute>
+ </select>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/{file}</url>
+ </urls>
+ <inputs>
+ <key id="file" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.url.toString();
+]]>
+ </execute>
+ </select>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/{extension}</url>
+ </urls>
+ <inputs>
+ <key id="extension" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.url.toString();
+]]>
+ </execute>
+ </select>
+ </bindings>
+</table>
View
36 mimetype/mimetype.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Paul Tarjan</author>
+ <description>Mimetype translations</description>
+ <sampleQuery>SELECT * FROM {table} WHERE extension = "mp3"</sampleQuery>
+ <sampleQuery>SELECT * FROM {table} WHERE file = "file.mp3"</sampleQuery>
+ <documentationURL>http://stdicon.com/</documentationURL>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/extension/{extension}</url>
+ </urls>
+ <inputs>
+ <key id="extension" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.get().response;
+]]>
+ </execute>
+ </select>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://stdicon.com/extension/{file}</url>
+ </urls>
+ <inputs>
+ <key id="file" type="xs:string" paramType="path" required="true" />
+ </inputs>
+ <execute><![CDATA[
+response.object = request.get().response;
+]]>
+ </execute>
+ </select>
+ </bindings>
+</table>

0 comments on commit 2d52cb9

Please sign in to comment.