API
Documentation
Huffduffer is filled with lists of huffduffed items.
- https://huffduffer.com/new
- https://huffduffer.com/username
- https://huffduffer.com/tags/tag
- https://huffduffer.com/username/tags/tag
- https://huffduffer.com/username/collective
- https://huffduffer.com/username/collective/tags/tag
- https://huffduffer.com/search?q=query
- https://huffduffer.com/popular?dtstart=YYYY-MM-DD&dtend=YYYY-MM-DD
These lists are available in a number of formats. Specify a file format by appending it to the end of a URL.
All responses are encoded in UTF-8.
Older lists can be requested by passing a page
value in the query string e.g. ?page=2
RSS
An RSS feed of 20 items.
- Mime-type:
- application/xml+rss
- Structure:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>string</title>
<description>string</description>
<language>en</language>
<link>Huffduffer URL</link>
<atom:link href="Huffduffer RSS URL" rel="self" type="application/rss+xml"/>
<item>
<title>string</title>
<description>string</description>
<guid>Huffduffer URL</guid>
<link>Huffduffer URL</link>
<enclosure url="audio URL" type="audio/mpeg" length="integer"/>
<pubDate>date</pubDate>
<category>string</category>
</item>
</channel>
</rss>- Endpoints:
-
- https://huffduffer.com/new/rss
- https://huffduffer.com/username/rss
- https://huffduffer.com/tags/tag/rss
- https://huffduffer.com/username/tags/tag/rss
- https://huffduffer.com/username/collective/rss
- https://huffduffer.com/username/collective/tags/tag/rss
- https://huffduffer.com/search/rss?q=query
- https://huffduffer.com/popular/rss?dtstart=YYYY-MM-DD&dtend=YYYY-MM-DD
Atom
An Atom feed of 20 entries.
- Mime-type:
- application/xml+atom
- Structure:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>string</title>
<subtitle type="html">string</subtitle>
<link rel="alternate" type="text/html" hreflang="en" href="Huffduffer URL"/>
<link rel="self" type="application/atom+xml" href="Huffduffer Atom URL"/>
<updated>YYYY-MM-DDThh:mm:ssZ</updated>
<id>uuid</id>
<entry>
<title>string</title>
<link rel="alternate" type="text/html" href="Huffduffer URL"/>
<link rel="enclosure" type="audio/mpeg" href="audio URL" length="integer"/>
<updated>YYYY-MM-DDThh:mm:ssZ</updated>
<published>YYYY-MM-DDThh:mm:ssZ</published>
<id>uuid</id>
<content>string</content>
<category term="string"/>
<author>
<name>username</name>
<uri>Huffduffer username URL</uri>
</author>
</entry>
</feed>- Endpoints:
-
- https://huffduffer.com/new/atom
- https://huffduffer.com/username/atom
- https://huffduffer.com/tags/tag/atom
- https://huffduffer.com/username/tags/tag/atom
- https://huffduffer.com/username/collective/atom
- https://huffduffer.com/username/collective/tags/tag/atom
- https://huffduffer.com/search/atom?q=query
- https://huffduffer.com/popular/atom?dtstart=YYYY-MM-DD&dtend=YYYY-MM-DD
JSON
A JavaScript object containing 20 items.
- Mime-type:
- application/json
- Structure:
{
"title": "string",
"link": "Huffduffer URL",
"items": [
{
"title": "string",
"description": "string",
"link": "Huffduffer URL",
"url": "audio URL",
"date": "YYYY-MM-DDThh:mm:ss",
"tags": "comma-separated list",
"author": {
"fn": "formatted name",
"nickname": "username",
"url": "Huffduffer username URL"
}
}
]
}- Endpoints:
-
- https://huffduffer.com/new/json
- https://huffduffer.com/username/json
- https://huffduffer.com/tags/tag/json
- https://huffduffer.com/username/tags/tag/json
- https://huffduffer.com/username/collective/json
- https://huffduffer.com/username/collective/tags/tag/json
- https://huffduffer.com/search/json?q=query
- https://huffduffer.com/popular/json?dtstart=YYYY-MM-DD&dtend=YYYY-MM-DD
JSONP
To wrap a JSON response in a callback function, specify the function using the argument callback
in the query string.
- Mime-type:
- text/javascript
- Structure:
foo({
"title": "string",
"link": "Huffduffer URL",
"items": [
{
"title": "string",
"description": "string",
"link": "Huffduffer URL",
"url": "audio URL",
"date": "YYYY-MM-DDThh:mm:ss",
"tags": "comma-separated list",
"author": {
"fn": "formatted name",
"nickname": "username",
"url": "Huffduffer username URL"
}
}
]
})- Endpoints:
-
- https://huffduffer.com/new/json?callback=foo
- https://huffduffer.com/username/json?callback=foo
- https://huffduffer.com/tags/tag/json?callback=foo
- https://huffduffer.com/username/tags/tag/json?callback=foo
- https://huffduffer.com/username/collective/json?callback=foo
- https://huffduffer.com/username/collective/tags/tag/json?callback=foo
- https://huffduffer.com/search/json?q=query&callback=foo
- https://huffduffer.com/popular?dtstart=YYYY-MM-DD&dtend=YYYY-MM-DD&callback=foo
XSPF
An XML file of 20 tracks.
- Mime-type:
- application/xml+xspf
- Structure:
<?xml version="1.0" encoding="utf-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<title>string</title>
<trackList>
<track>
<location>audio URL</location>
<title>string</title>
<annotation>string</annotation>
<info>Huffduffer URL</info>
</track>
</trackList>
</playlist>- Endpoints:
-
- https://huffduffer.com/new/xspf
- https://huffduffer.com/username/xspf
- https://huffduffer.com/tags/tag/xspf
- https://huffduffer.com/username/tags/tag/xspf
- https://huffduffer.com/username/collective/xspf
- https://huffduffer.com/username/collective/tags/tag/xspf
- https://huffduffer.com/search/xspf?q=query
- https://huffduffer.com/popular/xspf?dtstart=YYYY-MM-DD&dtend=YYYY-MM-DD
Microformats
If you don't append a file format to the end of a URL, pages are returned as HTML5. These pages are marked up using compound microformats so you can parse the HTML directly.
hAtom, xFolk
An HTML fragment of 10 items.
- Mime-type:
- text/html
- Structure:
<ol class="hfeed">
<li class="hentry">
<h3 class="entry-title">
<a rel="bookmark" href="Huffduffer URL">string</a>
</h3>
<div class="entry-content">
HTML
</div>
<div class="xfolkentry">
<p>
<a rel="enclosure" class="taggedlink" href="audio URL" type="audio/mpeg" title="string">download</a>
</p>
<p class="tagged">
Tagged with
<a rel="tag" href="Huffduffer URL">string</a>
</p>
</div>
<p class="author vcard">
—Huffduffed by
<a class="fn nickname url" href="Huffduffer username URL">username</a>
<abbr class="published" title="YYYY-MM-DDThh:mm:ss">string</abbr>
</p>
</li>
</ol>- Endpoints:
-
- https://huffduffer.com/new
- https://huffduffer.com/username
- https://huffduffer.com/tags/tag
- https://huffduffer.com/username/tags/tag
- https://huffduffer.com/username/collective
- https://huffduffer.com/username/collective/tags/tag
- https://huffduffer.com/search?q=query
- https://huffduffer.com/popular?dtstart=YYYY-MM-DD&dtend=YYYY-MM-DD