SHARE
TWEET

Sam Joseph

a guest Sep 14th, 2010 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0"?>
  2. <!-- This is a bootleg WADL file for the del.icio.us API. -->
  3.  
  4. <application xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  5.  xmlns:html="http://www.w3.org/1999/xhtml"
  6.  xmlns="http://research.sun.com/wadl/2006/07">
  7.  
  8.  <resources base="https://api.del.icio.us/">
  9.   <doc xml:lang="en" title="The del.icio.us API v1">
  10.    Post or retrieve your bookmarks from the social networking website.
  11.    Limit requests to one per second.
  12.   </doc>
  13.  
  14.   <resource path="v1">
  15.    <param name="Authorization" style="header" required="true">
  16.     <doc xml:lang="en">All del.icio.us API calls must be authenticated
  17.     using Basic HTTP auth.</doc>
  18.    </param>
  19.  
  20.    <resource path="update"><method href="#getLastUpdateTime" /></resource>
  21.  
  22.    <resource path="tags">
  23.     <resource path="get"><method href="#getTags" /></resource>
  24.     <resource path="rename"><method href="#renameTag" /></resource>
  25.    </resource>
  26.  
  27.    <resource path="posts">
  28.     <resource path="get"><method href="#getPosts" /></resource>
  29.     <resource path="recent"><method href="#getRecentPosts" /></resource>
  30.     <resource path="all"><method href="#getAllPosts" /></resource>
  31.     <resource path="dates"><method href="#getDates" /></resource>
  32.  
  33.     <resource path="add"><method href="#addPost" /></resource>
  34.     <resource path="delete"><method href="#deletePost" /></resource>
  35.    </resource>
  36.  
  37.    <resource path="bundles">
  38.     <resource path="all"><method href="#getBundles" /></resource>
  39.     <resource path="set"><method href="#makeBundle" /></resource>
  40.     <resource path="delete"><method href="#deleteBundle" /></resource>
  41.    </resource>
  42.   </resource>
  43.  </resources>
  44.  
  45.  <!-- Methods -->
  46.  
  47.  <!-- "update" method -->
  48.  
  49.  <method id="getLastUpdateTime" name="GET">
  50.   <response>
  51.    <representation mediaType="application/xml" element="update">
  52.     <doc xml:lang="en" title="A note on structure">
  53.      The "time" attribute contains the last update time for the
  54.      authenticated user, in ISO8661 format.
  55.     </doc>  
  56.    </representation>
  57.    <fault href="#AuthorizationRequired" />
  58.   </response>
  59.  </method>
  60.  
  61.  <!-- "tags" methods -->
  62.  
  63.  <method id="getTags" name="GET">
  64.   <response>
  65.    <representation mediaType="application/xml" element="tags">
  66.     <doc xml:lang="en" title="Schema description">
  67.      Contains "tag" tags, each with "count" and "tag" attributes.
  68.     </doc>
  69.    </representation>
  70.    <fault href="#AuthorizationRequired" />
  71.   </response>
  72.  </method>
  73.  
  74.  <method id="renameTag" name="POST">
  75.   <request>
  76.    <param name="old" required="true" style="form">
  77.     <doc xml:lang="en" title="Tag to rename." />
  78.    </param>
  79.    <param name="new" required="true" style="form">
  80.     <doc xml:lang="en" title="New name." />
  81.    </param>
  82.   </request>
  83.  
  84.   <response>
  85.    <representation href="#resultCodeDone" />
  86.    <fault href="#AuthorizationRequired" />
  87.   </response>
  88.  </method>
  89.  
  90.  <!-- "posts" methods part I: ways of getting posts -->
  91.  
  92.  <method id="getPosts" name="GET">
  93.   <doc xml:lang="en" title="Returns posts matching the arguments.">
  94.    If no date or url is given, most recent date will be used.
  95.   </doc>
  96.  
  97.   <request>
  98.    <param name="tag" style="form">
  99.     <doc xml:lang="en" title="Filter by this tag." />
  100.    </param>
  101.    <param name="dt" style="form">
  102.     <doc xml:lang="en" title="Filter by this date (CCYY-MM-DDThh:mm:ssZ)." />
  103.    </param>
  104.    <param name="url" style="form">
  105.     <doc xml:lang="en" title="Filter by this URL." />
  106.    </param>
  107.   </request>
  108.   <response>
  109.    <representation mediaType="application/xml" element="posts">
  110.     <doc xml:lang="en" title="Sample response">
  111.      &lt;posts dt=&quot;2005-11-28&quot; tag=&quot;webdev&quot; user=&quot;user&quot;&gt;
  112.       &lt;post href=&quot;http://www.howtocreate.co.uk/tutorials/texterise.php?dom=1&quot;
  113.        description=&quot;JavaScript DOM reference&quot;
  114.        extended=&quot;dom reference&quot;
  115.        hash=&quot;c0238dc0c44f07daedd9a1fd9bbdeebd&quot;
  116.        others=&quot;55&quot; tag=&quot;dom javascript webdev&quot; time=&quot;2005-11-28T05:26:09Z&quot; /&gt;
  117.      &lt;/posts&gt;
  118.     </doc>
  119.    </representation>
  120.   </response>
  121.  </method>
  122.  
  123.  <method id="getRecentPosts" name="GET">
  124.  
  125.   <doc xml:lang="en" title="Returns a list of the most recent posts.">
  126.    Filtered by argument. Maximum 100.
  127.   </doc>
  128.  
  129.   <request>
  130.    <param name="tag" style="form">
  131.     <doc xml:lang="en" title="Filter by this tag." />
  132.    </param>
  133.    <param name="count" style="form" default="15">
  134.     <doc xml:lang="en" title="Number of items to retrieve.">Maximum: 100</doc>
  135.    </param>
  136.   </request>
  137.  
  138.   <response>
  139.    <representation href="#postList" />
  140.    <fault href="#AuthorizationRequired" />
  141.   </response>
  142.  </method>
  143.  
  144.  <method id="getAllPosts" name="GET">
  145.   <doc xml:lang="en" title="Returns all posts">
  146.    Please use sparingly. Call the update function to see if you need
  147.    to fetch this at all.
  148.   </doc>
  149.  
  150.   <request>
  151.    <param name="tag" style="form">
  152.     <doc xml:lang="en" title="Filter by this tag." />
  153.    </param>
  154.   </request>
  155.  
  156.   <response>
  157.    <representation href="#postList" />
  158.    <fault href="#AuthorizationRequired" />
  159.   </response>
  160.  </method>
  161.  
  162.  <method id="getDates" name="GET">
  163.   <doc xml:lang="en"
  164.   title="Returns a list of dates with the number of posts at each date." />
  165.  
  166.   <request>
  167.    <param name="tag" style="form">
  168.     <doc xml:lang="en" title="Filter by this tag." />
  169.    </param>
  170.   </request>
  171.   <response>
  172.    <representation mediaType="application/xml">
  173.     <doc xml:lang="en" title="Sample">
  174.      &lt;dates tag=&quot;&quot; user=&quot;user&quot;&gt;
  175.        &lt;date count=&quot;5&quot; date=&quot;2005-11-29&quot; /&gt;
  176.        &lt;date count=&quot;15&quot; date=&quot;2005-11-28&quot; /&gt;
  177.        &lt;date count=&quot;2&quot; date=&quot;2005-11-26&quot; /&gt;
  178.        &lt;date count=&quot;2&quot; date=&quot;2005-11-25&quot; /&gt;
  179.        &lt;date count=&quot;7&quot; date=&quot;2005-11-23&quot; /&gt;
  180.        &lt;date count=&quot;20&quot; date=&quot;2005-11-22&quot; /&gt;
  181.        &lt;date count=&quot;16&quot; date=&quot;2005-11-21&quot; /&gt;
  182.        &lt;date count=&quot;4&quot; date=&quot;2005-11-19&quot; /&gt;
  183.      &lt;/dates&gt;
  184.     </doc>
  185.    </representation>
  186.   </response>
  187.  </method>
  188.  
  189.  <!-- "posts" methods part II: ways of manipulating posts -->
  190.  
  191.  <method id="addPost" name="GET">
  192.   <doc xml:lang="en" title="Add a post to del.icio.us" />
  193.   <request>
  194.    <param name="url" required="true" style="form">
  195.     <doc xml:lang="en" title="The URL of the item." />
  196.    </param>
  197.  
  198.    <param name="description" required="true" style="form">
  199.     <doc xml:lang="en" title="The description of the item." />
  200.    </param>
  201.  
  202.    <param name="extended" style="form">
  203.     <doc xml:lang="en" title="Notes for the item." />
  204.    </param>
  205.  
  206.    <param name="tags" style="form">
  207.     <doc xml:lang="en" title="Tags for the item.">Space delimited</doc>
  208.    </param>
  209.  
  210.    <param name="dt" style="form">
  211.    <doc xml:lang="en" title="Datestamp of the item.">
  212.      Format: "CCYY-MM-DDThh:mm:ssZ". Requires a LITERAL "T" and "Z"
  213.      like in
  214.      <html:a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">ISO8601</html:a>.
  215.      For example: "1984-09-01T14:21:31Z"
  216.     </doc>
  217.    </param>
  218.  
  219.    <param name="replace" default="" style="form">
  220.     <doc xml:lang="en"
  221.     title="Unless set to &quot;no&quot;, a post will overwrite an
  222.            earlier post with the same URL." />
  223.     <option value="" />
  224.     <option value="no" />
  225.    </param>
  226.  
  227.    <param name="shared" style="form">
  228.     <doc xml:lang="en" title="Set to &quot;no&quot; to make the item private." />
  229.     <option value="" />
  230.     <option value="no" />
  231.    </param>
  232.  
  233.   </request>
  234.  
  235.   <response>
  236.    <representation href="#resultCode" />
  237.    <fault href="#AuthorizationRequired" />
  238.   </response>
  239.  </method>
  240.  
  241.  <method id="deletePost" name="GET">
  242.   <doc xml:lang="en" title="Delete a post from del.icio.us" />
  243.  
  244.   <request>
  245.    <param name="url" required="true" style="form">
  246.     <doc xml:lang="en" title="The URL of the item." />
  247.    </param>
  248.   </request>
  249.  
  250.   <response>
  251.    <representation href="#resultCodeDone" />
  252.    <fault href="#AuthorizationRequired" />
  253.   </response>
  254.  </method>
  255.  
  256.  <!-- "bundles" methods -->
  257.  
  258.  <method id="getBundles" name="GET">
  259.   <doc xml:lang="en" title="Retrieve all of a user's bundles." />
  260.  
  261.   <response>
  262.    <representation mediaType="application/xml" element="bundles">
  263.     <doc xml:lang="en" title="Sample">
  264.      &lt;bundles&gt;
  265.        &lt;bundle name=&quot;music&quot; tags=&quot;ipod mp3 music&quot; /&gt;
  266.      &lt;/bundles&gt;
  267.     </doc>
  268.    </representation>
  269.    <fault href="#AuthorizationRequired" />
  270.   </response>
  271.  </method>
  272.  
  273.  <method id="makeBundle" name="GET">
  274.   <doc xml:lang="en" title="Assign a set of tags to a single bundle.">
  275.    Wipes away previous settings for bundle.
  276.   </doc>
  277.  
  278.   <request>
  279.    <param name="bundle" style="form">
  280.     <doc xml:lang="en" title="The bundle name." />
  281.    </param>
  282.    <param name="tags" required="true" style="form">
  283.     <doc xml:lang="en" title="List of tags.">Space-separated.</doc>
  284.    </param>
  285.   </request>
  286.  
  287.   <response>
  288.    <representation mediaType="application/xml" element="result">
  289.     <doc xml:lang="en" title="A note on structure">
  290.      On success, contents are &quot;done&quot; On failure,
  291.      contents are &quot;you must supply a bundle name and at least one
  292.      tag&quot;
  293.     </doc>
  294.    </representation>
  295.    <fault href="#AuthorizationRequired" />
  296.   </response>
  297.  </method>
  298.  
  299.  <method id="deleteBundle" name="GET">
  300.   <doc xml:lang="en" title="Deletes a bundle." />
  301.   <request>
  302.    <param name="bundle" style="form">
  303.     <doc xml:lang="en" title="The bundle name." />
  304.    </param>
  305.   </request>
  306.  
  307.   <response>
  308.    <representation href="#resultCodeDone" />
  309.    <fault href="#AuthorizationRequired" />
  310.   </response>
  311.  </method>
  312.  
  313.  <!-- Commonly used representations -->
  314.  
  315.  <representation id="postList" mediaType="text/xml" element="posts">
  316.   <doc xml:lang="en" title="Sample">
  317.     &lt;posts tag=&quot;&quot; user=&quot;user&quot;&gt;
  318.       &lt;post href=&quot;http://www.weather.com/&quot; description=&quot;weather.com&quot;
  319.       hash=&quot;6cfedbe75f413c56b6ce79e6fa102aba&quot; tag=&quot;weather reference&quot;
  320.       time=&quot;2005-11-29T20:30:47Z&quot; /&gt;
  321.       &lt;post href=&quot;http://www.nytimes.com/&quot;
  322.       description=&quot;The New York Times - Breaking News, World News &amp; Multimedia&quot;
  323.       extended=&quot;requires login&quot; hash=&quot;ca1e6357399774951eed4628d69eb84b&quot;
  324.       tag=&quot;news media&quot; time=&quot;2005-11-29T20:30:05Z&quot; /&gt;
  325.     &lt;/posts&gt;
  326.   </doc>
  327.  </representation>
  328.  
  329.  <representation id="resultCode" mediaType="application/xml" element="result">
  330.   <doc xml:lang="en" title="A note on structure">
  331.    This representation has the same structure whether or not the
  332.    operation succeeded. If it succeeded, the value of the 'code'
  333.    attribute is "done". Otherwise, it's "something went wrong".
  334.   </doc>
  335.  </representation>
  336.  
  337.  <representation id="resultCodeDone" mediaType="application/xml" element="result">
  338.   <doc xml:lang="en" title="A note on structure">
  339.    Allegedly, this representation has a "code" attribute whose value
  340.    is always "done". I think it might actually be the same as the
  341.    resultCode representation.
  342.   </doc>
  343.  </representation>
  344.  
  345.  <fault id="AuthorizationRequired" status="401" />
  346.  
  347.  
  348. </application>
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top