NewsBlur/templates/static/api.xhtml

188 lines
4.8 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% block bodyclass %}NB-static NB-static-api{% endblock %}
{% block content %}
<div class="NB-static-title">
The NewsBlur API
</div>
{# ========= #}
{# = Feeds = #}
{# ========= #}
<div class="NB-module">
<h5 class="NB-module-title">API Guidelines and Terms of Service</h5>
<div class="NB-module-content">
<p>NewsBlur's API allows users to retrieve their feeds, feed counts, feed icons, feed
statistics, and individual feed stories. No API key is required, but you are required
to authenticate before using any of the API endpoints. Please be considerate, and don't
hammer our servers.</p>
<p>If your project or application allows users to interact with data from NewsBlur,
you must cite NewsBlur as the source of your data.</p>
<p>You may use the API commercially, by which we mean you may charge people money to
use your project which itself uses the API. You may not, however, sell advertising
against any data retrieved from NewsBlur's API. Essentially, you can charge money for
your application or service, but not wrap NewsBlur in advertisements.</p>
<p><i>We reserve the right to revise these guidelines. If you violate the spirit of
these terms, expect to be blocked without advance warning.</i></p>
</div>
</div>
<div class="NB-module">
<h5 class="NB-module-title">Feeds</h5>
<div class="NB-module-content">
2011-04-20 09:35:59 -04:00
<h3><tt>GET /reader/feeds</tt></h3>
2011-04-13 09:42:03 -04:00
<ul>
<li>Retrieve a user's list of feeds. Includes the 3 unread counts (positive, neutral,
negative), as well as optional favicons.</li>
</ul>
<table>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
<th>Example</th>
</tr>
<tr>
2011-04-13 09:42:03 -04:00
<td>include_favicons</td> <td><span class="optional">Optional</span> Include
favicons inline. Since they can be time consuming to download, you can optionally
turn them off. Use <tt>/api/v1/feeds/favicons/</tt> to retrieve the favicons in a
separate request.</td>
<td><code>true</code></td>
<td><code>true/false</code></td>
</tr>
</table>
<h4>Example Response</h4>
<pre><code>
{
'feeds': []
}
</code></pre>
<h4>Tips</h4>
<ul>
2011-04-13 09:42:03 -04:00
<li>Use <code>/api/v1/reader/refresh_feeds</code> to get updated unread counts.</li>
<li>Turn off <code>include_favicons</code> if you can either cache favicons or can
wait to fetch them.</li>
</ul>
2011-04-13 09:42:03 -04:00
<h3><tt>GET /api/v1/feeds/favicons</tt></h3>
2011-04-13 09:42:03 -04:00
<ul>
<li>Retrieve a list of favicons for a list of feeds. Used when combined with
<tt>/api/v1/reader/feed_list</tt> and <tt>include_favicons=false</tt>, so the
feed_list request contains far less data. Useful for mobile devices, but requires a
second request.</li>
</ul>
<table>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
<th>Example</th>
</tr>
<tr>
<td>feeds</td>
<td><span class="required">REQUIRED</span> Array of feed ids</td>
<td></td>
<td><code>[1, 2, 3]</code></td>
</tr>
</table>
<h4>Example Response</h4>
<pre><code>
{
'feeds': []
}
</code></pre>
<h4>Tips</h4>
<ul>
<li>To use inline data images, you can use this syntax:
<pre><code>
&lt;img src="data:image/png;base64,[IMAGE_DATA_STRING]" /&gt;
</code></pre>
</li>
</ul>
2011-04-13 09:42:03 -04:00
<h3><tt>GET /api/v1/reader/feed/:id</tt></h3>
2011-04-13 09:42:03 -04:00
<ul>
<li>Retrieve stories from a single feed.</li>
</ul>
<table>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
<th>Example</th>
</tr>
<tr>
<td>page</td>
<td><span class="optional">optional</span> Page of stories, starting from 1.</td>
<td><code>1</code></td>
<td><code>12</code></td>
</tr>
</table>
<h4>Example Response</h4>
<pre><code>
{
'feeds': []
}
</code></pre>
</div>
</div>
{# =========== #}
{# = Stories = #}
{# =========== #}
<div class="NB-module">
<h5 class="NB-module-title">Stories</h5>
<div class="NB-module-content">
</div>
</div>
{# ================ #}
{# = Intelligence = #}
{# ================ #}
<div class="NB-module">
<h5 class="NB-module-title">Intelligence</h5>
<div class="NB-module-content">
</div>
</div>
{% endblock content %}