Permalink
Browse files

adding examples and Readme

  • Loading branch information...
1 parent bc21ef5 commit 31b29a76e768844efd7bdd19a357621a8060f46a @spier committed Jul 17, 2012
Showing with 37 additions and 1 deletion.
  1. +23 −0 dictionaryapi/README.md
  2. +14 −1 dictionaryapi/dictionaryapi.xml
View
@@ -0,0 +1,23 @@
+# YQL tables for the Merriam-Webster Dictionary API
+
+The [Merriam-Webster Dictionary API](http://www.dictionaryapi.com) is made up of several API endpoints with almost identical syntax. Examples:
+- http://www.dictionaryapi.com/api/v1/references/sd4/xml/baseball?key=[YOUR KEY GOES HERE]
+- http://www.dictionaryapi.com/api/v1/references/collegiate/xml/hypocrite?key=[YOUR KEY GOES HERE]
+
+This YQL table makes accessing the different dictionaries more straight forward by moving them into one API, with different dictionaries. YQL calls look like this:
+
+ SELECT * FROM dictionaryapi WHERE dictionary='collegiate' AND word='hypocrite' AND api_key='[YOUR KEY GOES HERE]'
+ SELECT * FROM dictionaryapi WHERE dictionary='medical' AND word='doctor' AND api_key='[YOUR KEY GOES HERE]'
+
+The dictionaries that can be accessed via YQL are:
+
+- collegiate => Merriam-Webster's Collegiate® Dictionary with Audio
+- thesaurus => Merriam-Webster's Collegiate® Thesaurus
+- spanish => Merriam-Webster's Spanish-English Dictionary with Audio
+- medical => Merriam-Webster's Medical Dictionary with Audio
+- learners => Merriam-Webster's Learner's Dictionary with Audio
+- sd2 => Merriam-Webster's Elementary Dictionary with Audio (Grades 3-5)
+- sd3 => Merriam-Webster's Intermediate Dictionary with Audio (Grades 6-8)
+- sd4 => Merriam-Webster's School Dictionary with Audio (Grades 9-11)
+
+Please mind that the different dictionaries require different API keys!
@@ -4,7 +4,8 @@
<author>Sebastian Spier (http://twitter.com/#!/sebastianspier/)</author>
<description>Merriam-Webster's Dictionaries</description>
<documentationURL>http://www.dictionaryapi.com</documentationURL>
- <sampleQuery>SELECT * FROM {table} WHERE dictionary='collegiate' word='hypocrite' AND api_key='yourApiKey'</sampleQuery>
+ <sampleQuery>SELECT * FROM {table} WHERE dictionary='collegiate' AND word='hypocrite' AND api_key='yourApiKey'</sampleQuery>
+ <sampleQuery>SELECT * FROM {table} WHERE dictionary='medical' AND word='doctor' AND api_key='yourApiKey'</sampleQuery>
</meta>
<bindings>
<select itemPath="entry_list.entry" produces="XML">
@@ -14,6 +15,18 @@
<inputs>
<key id="word" type="xs:string" paramType="path" required="true"/>
<key id="key" as="api_key" type="xs:string" paramType="query" required="true"/>
+
+ <!--
+ one of:
+ collegiate => Merriam-Webster's Collegiate® Dictionary with Audio
+ thesaurus => Merriam-Webster's Collegiate® Thesaurus
+ spanish => Merriam-Webster's Spanish-English Dictionary with Audio
+ medical => Merriam-Webster's Medical Dictionary with Audio
+ learners => Merriam-Webster's Learner's Dictionary with Audio
+ sd2 => Merriam-Webster's Elementary Dictionary with Audio (Grades 3-5)
+ sd3 => Merriam-Webster's Intermediate Dictionary with Audio (Grades 6-8)
+ sd4 => Merriam-Webster's School Dictionary with Audio (Grades 9-11)
+ -->
<key id="dictionary" type="xs:string" paramType="path" required="true"/>
</inputs>
</select>

0 comments on commit 31b29a7

Please sign in to comment.