Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <!-- This is a bootleg WADL file for the del.icio.us API. -->
- <application xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://research.sun.com/wadl/2006/07">
- <resources base="https://api.del.icio.us/">
- <doc xml:lang="en" title="The del.icio.us API v1">
- Post or retrieve your bookmarks from the social networking website.
- Limit requests to one per second.
- </doc>
- <resource path="v1">
- <param name="Authorization" style="header" required="true">
- <doc xml:lang="en">All del.icio.us API calls must be authenticated
- using Basic HTTP auth.</doc>
- </param>
- <resource path="update"><method href="#getLastUpdateTime" /></resource>
- <resource path="tags">
- <resource path="get"><method href="#getTags" /></resource>
- <resource path="rename"><method href="#renameTag" /></resource>
- </resource>
- <resource path="posts">
- <resource path="get"><method href="#getPosts" /></resource>
- <resource path="recent"><method href="#getRecentPosts" /></resource>
- <resource path="all"><method href="#getAllPosts" /></resource>
- <resource path="dates"><method href="#getDates" /></resource>
- <resource path="add"><method href="#addPost" /></resource>
- <resource path="delete"><method href="#deletePost" /></resource>
- </resource>
- <resource path="bundles">
- <resource path="all"><method href="#getBundles" /></resource>
- <resource path="set"><method href="#makeBundle" /></resource>
- <resource path="delete"><method href="#deleteBundle" /></resource>
- </resource>
- </resource>
- </resources>
- <!-- Methods -->
- <!-- "update" method -->
- <method id="getLastUpdateTime" name="GET">
- <response>
- <representation mediaType="application/xml" element="update">
- <doc xml:lang="en" title="A note on structure">
- The "time" attribute contains the last update time for the
- authenticated user, in ISO8661 format.
- </doc>
- </representation>
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <!-- "tags" methods -->
- <method id="getTags" name="GET">
- <response>
- <representation mediaType="application/xml" element="tags">
- <doc xml:lang="en" title="Schema description">
- Contains "tag" tags, each with "count" and "tag" attributes.
- </doc>
- </representation>
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <method id="renameTag" name="POST">
- <request>
- <param name="old" required="true" style="form">
- <doc xml:lang="en" title="Tag to rename." />
- </param>
- <param name="new" required="true" style="form">
- <doc xml:lang="en" title="New name." />
- </param>
- </request>
- <response>
- <representation href="#resultCodeDone" />
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <!-- "posts" methods part I: ways of getting posts -->
- <method id="getPosts" name="GET">
- <doc xml:lang="en" title="Returns posts matching the arguments.">
- If no date or url is given, most recent date will be used.
- </doc>
- <request>
- <param name="tag" style="form">
- <doc xml:lang="en" title="Filter by this tag." />
- </param>
- <param name="dt" style="form">
- <doc xml:lang="en" title="Filter by this date (CCYY-MM-DDThh:mm:ssZ)." />
- </param>
- <param name="url" style="form">
- <doc xml:lang="en" title="Filter by this URL." />
- </param>
- </request>
- <response>
- <representation mediaType="application/xml" element="posts">
- <doc xml:lang="en" title="Sample response">
- <posts dt="2005-11-28" tag="webdev" user="user">
- <post href="http://www.howtocreate.co.uk/tutorials/texterise.php?dom=1"
- description="JavaScript DOM reference"
- extended="dom reference"
- hash="c0238dc0c44f07daedd9a1fd9bbdeebd"
- others="55" tag="dom javascript webdev" time="2005-11-28T05:26:09Z" />
- </posts>
- </doc>
- </representation>
- </response>
- </method>
- <method id="getRecentPosts" name="GET">
- <doc xml:lang="en" title="Returns a list of the most recent posts.">
- Filtered by argument. Maximum 100.
- </doc>
- <request>
- <param name="tag" style="form">
- <doc xml:lang="en" title="Filter by this tag." />
- </param>
- <param name="count" style="form" default="15">
- <doc xml:lang="en" title="Number of items to retrieve.">Maximum: 100</doc>
- </param>
- </request>
- <response>
- <representation href="#postList" />
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <method id="getAllPosts" name="GET">
- <doc xml:lang="en" title="Returns all posts">
- Please use sparingly. Call the update function to see if you need
- to fetch this at all.
- </doc>
- <request>
- <param name="tag" style="form">
- <doc xml:lang="en" title="Filter by this tag." />
- </param>
- </request>
- <response>
- <representation href="#postList" />
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <method id="getDates" name="GET">
- <doc xml:lang="en"
- title="Returns a list of dates with the number of posts at each date." />
- <request>
- <param name="tag" style="form">
- <doc xml:lang="en" title="Filter by this tag." />
- </param>
- </request>
- <response>
- <representation mediaType="application/xml">
- <doc xml:lang="en" title="Sample">
- <dates tag="" user="user">
- <date count="5" date="2005-11-29" />
- <date count="15" date="2005-11-28" />
- <date count="2" date="2005-11-26" />
- <date count="2" date="2005-11-25" />
- <date count="7" date="2005-11-23" />
- <date count="20" date="2005-11-22" />
- <date count="16" date="2005-11-21" />
- <date count="4" date="2005-11-19" />
- </dates>
- </doc>
- </representation>
- </response>
- </method>
- <!-- "posts" methods part II: ways of manipulating posts -->
- <method id="addPost" name="GET">
- <doc xml:lang="en" title="Add a post to del.icio.us" />
- <request>
- <param name="url" required="true" style="form">
- <doc xml:lang="en" title="The URL of the item." />
- </param>
- <param name="description" required="true" style="form">
- <doc xml:lang="en" title="The description of the item." />
- </param>
- <param name="extended" style="form">
- <doc xml:lang="en" title="Notes for the item." />
- </param>
- <param name="tags" style="form">
- <doc xml:lang="en" title="Tags for the item.">Space delimited</doc>
- </param>
- <param name="dt" style="form">
- <doc xml:lang="en" title="Datestamp of the item.">
- Format: "CCYY-MM-DDThh:mm:ssZ". Requires a LITERAL "T" and "Z"
- like in
- <html:a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">ISO8601</html:a>.
- For example: "1984-09-01T14:21:31Z"
- </doc>
- </param>
- <param name="replace" default="" style="form">
- <doc xml:lang="en"
- title="Unless set to "no", a post will overwrite an
- earlier post with the same URL." />
- <option value="" />
- <option value="no" />
- </param>
- <param name="shared" style="form">
- <doc xml:lang="en" title="Set to "no" to make the item private." />
- <option value="" />
- <option value="no" />
- </param>
- </request>
- <response>
- <representation href="#resultCode" />
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <method id="deletePost" name="GET">
- <doc xml:lang="en" title="Delete a post from del.icio.us" />
- <request>
- <param name="url" required="true" style="form">
- <doc xml:lang="en" title="The URL of the item." />
- </param>
- </request>
- <response>
- <representation href="#resultCodeDone" />
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <!-- "bundles" methods -->
- <method id="getBundles" name="GET">
- <doc xml:lang="en" title="Retrieve all of a user's bundles." />
- <response>
- <representation mediaType="application/xml" element="bundles">
- <doc xml:lang="en" title="Sample">
- <bundles>
- <bundle name="music" tags="ipod mp3 music" />
- </bundles>
- </doc>
- </representation>
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <method id="makeBundle" name="GET">
- <doc xml:lang="en" title="Assign a set of tags to a single bundle.">
- Wipes away previous settings for bundle.
- </doc>
- <request>
- <param name="bundle" style="form">
- <doc xml:lang="en" title="The bundle name." />
- </param>
- <param name="tags" required="true" style="form">
- <doc xml:lang="en" title="List of tags.">Space-separated.</doc>
- </param>
- </request>
- <response>
- <representation mediaType="application/xml" element="result">
- <doc xml:lang="en" title="A note on structure">
- On success, contents are "done" On failure,
- contents are "you must supply a bundle name and at least one
- tag"
- </doc>
- </representation>
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <method id="deleteBundle" name="GET">
- <doc xml:lang="en" title="Deletes a bundle." />
- <request>
- <param name="bundle" style="form">
- <doc xml:lang="en" title="The bundle name." />
- </param>
- </request>
- <response>
- <representation href="#resultCodeDone" />
- <fault href="#AuthorizationRequired" />
- </response>
- </method>
- <!-- Commonly used representations -->
- <representation id="postList" mediaType="text/xml" element="posts">
- <doc xml:lang="en" title="Sample">
- <posts tag="" user="user">
- <post href="http://www.weather.com/" description="weather.com"
- hash="6cfedbe75f413c56b6ce79e6fa102aba" tag="weather reference"
- time="2005-11-29T20:30:47Z" />
- <post href="http://www.nytimes.com/"
- description="The New York Times - Breaking News, World News & Multimedia"
- extended="requires login" hash="ca1e6357399774951eed4628d69eb84b"
- tag="news media" time="2005-11-29T20:30:05Z" />
- </posts>
- </doc>
- </representation>
- <representation id="resultCode" mediaType="application/xml" element="result">
- <doc xml:lang="en" title="A note on structure">
- This representation has the same structure whether or not the
- operation succeeded. If it succeeded, the value of the 'code'
- attribute is "done". Otherwise, it's "something went wrong".
- </doc>
- </representation>
- <representation id="resultCodeDone" mediaType="application/xml" element="result">
- <doc xml:lang="en" title="A note on structure">
- Allegedly, this representation has a "code" attribute whose value
- is always "done". I think it might actually be the same as the
- resultCode representation.
- </doc>
- </representation>
- <fault id="AuthorizationRequired" status="401" />
- </application>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement