2011-04-02 21:34:40 -04:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
2011-04-04 12:01:29 -04:00
|
|
|
{% block bodyclass %}NB-static NB-static-api{% endblock %}
|
2011-04-02 21:34:40 -04:00
|
|
|
|
2011-04-23 18:22:52 -04:00
|
|
|
{% block title %}The NewsBlur API{% endblock %}
|
|
|
|
|
2011-04-02 21:34:40 -04:00
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<div class="NB-static-title">
|
|
|
|
The NewsBlur API
|
|
|
|
</div>
|
|
|
|
|
2011-04-05 10:50:39 -04:00
|
|
|
|
2011-04-23 18:22:52 -04:00
|
|
|
<div class="NB-module">
|
|
|
|
<h5 class="NB-module-title">Introduction to the API</h5>
|
|
|
|
<div class="NB-module-content">
|
|
|
|
<p><a href="/">NewsBlur</a> is an RSS feed reader with intelligence.</p>
|
|
|
|
<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>It is a very nice thing to note that this entire API is open-source, including
|
|
|
|
the implementation of the endpoints. You can find the source of the
|
|
|
|
<a href="http://github.com/samuelclay/NewsBlur/tree/master/apps/reader/views.py">/reader/ views</a>,
|
|
|
|
<a href="http://github.com/samuelclay/NewsBlur/tree/master/apps/rss_feeds/views.py">/rss_feeds/ views</a>,
|
|
|
|
as well as
|
2011-04-23 23:15:44 -04:00
|
|
|
<a href="http://github.com/samuelclay/NewsBlur/tree/master/templates/static/api.yml">the API definitions in YML</a>.</p>
|
2011-04-23 18:22:52 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2011-04-05 10:50:39 -04:00
|
|
|
{# ========= #}
|
|
|
|
{# = Feeds = #}
|
|
|
|
{# ========= #}
|
|
|
|
|
2011-04-02 21:34:40 -04:00
|
|
|
<div class="NB-module">
|
2011-04-21 22:36:26 -04:00
|
|
|
<h5 class="NB-module-title">API Table of Contents</h5>
|
2011-04-23 18:22:52 -04:00
|
|
|
|
2011-04-02 21:34:40 -04:00
|
|
|
<div class="NB-module-content">
|
2011-04-22 10:05:22 -04:00
|
|
|
<div class="NB-api-endpoint">
|
2011-04-23 23:15:44 -04:00
|
|
|
{% for group in data %}{% for group_name, endpoints in group.items %}
|
|
|
|
<div class="NB-api-toc-header">{{ group_name }}</div>
|
|
|
|
<ul class="NB-api-toc">
|
|
|
|
{% for endpoint in endpoints %}
|
|
|
|
<li>
|
|
|
|
<div class="NB-api-link-desc">{{ endpoint.short_desc }}</div>
|
|
|
|
<a href="#{{ endpoint.url }}">{{ endpoint.method }} <code>{{ endpoint.url }}</code></a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endfor %}{% endfor %}
|
2011-04-22 10:05:22 -04:00
|
|
|
</div>
|
2011-04-02 21:34:40 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2011-04-21 22:36:26 -04:00
|
|
|
|
|
|
|
|
2011-04-23 23:15:44 -04:00
|
|
|
{% for group in data %}{% for group_name, endpoints in group.items %}
|
|
|
|
<div class="NB-module">
|
|
|
|
<h5 class="NB-module-title">{{ group_name }}</h5>
|
|
|
|
<div class="NB-module-content">
|
|
|
|
|
|
|
|
{% for endpoint in endpoints %}
|
|
|
|
<div class="NB-api-endpoint">
|
|
|
|
<h3><tt>{{ endpoint.method }} {{ endpoint.url }}</tt></h3>
|
|
|
|
<a class="NB-anchor" name="{{ endpoint.url }}"></a>
|
|
|
|
|
|
|
|
{% if endpoint.long_desc %}
|
|
|
|
<ul>
|
|
|
|
{% for desc in endpoint.long_desc %}
|
|
|
|
<li>{{ desc|safe }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if endpoint.params %}
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Parameter</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Default</th>
|
|
|
|
<th>Example</th>
|
|
|
|
</tr>
|
|
|
|
{% for param in endpoint.params %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ param.key }}</td>
|
|
|
|
<td class="NB-api-endpoint-param-desc">
|
|
|
|
{% if param.optional %}
|
|
|
|
<span class="optional">Optional</span>
|
|
|
|
{% else %}{% if param.required %}
|
|
|
|
<span class="required">Required</span>
|
|
|
|
{% endif %}{% endif %}
|
|
|
|
{{ param.desc|safe }}
|
|
|
|
</td>
|
|
|
|
<td>{% if param.default %}<code>{{ param.default }}</code>{% endif %}</td>
|
2011-04-24 00:05:39 -04:00
|
|
|
<td><code>{{ param.example|safe }}</code></td>
|
2011-04-23 23:15:44 -04:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{# <h4>Example Response</h4> #}
|
|
|
|
{# <pre><code> #}
|
|
|
|
{# { #}
|
|
|
|
{# 'feeds': [] #}
|
|
|
|
{# } #}
|
|
|
|
{# </code></pre> #}
|
|
|
|
|
|
|
|
{% if endpoint.tips %}
|
|
|
|
<h4>Tips</h4>
|
|
|
|
<ul>
|
|
|
|
{% for tip in endpoint.tips %}
|
|
|
|
<li>{{ tip|safe }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2011-04-22 10:05:22 -04:00
|
|
|
</div>
|
2011-04-05 10:50:39 -04:00
|
|
|
</div>
|
2011-04-23 23:15:44 -04:00
|
|
|
{% endfor %}{% endfor %}
|
2011-04-21 22:36:26 -04:00
|
|
|
|
|
|
|
{# ===================== #}
|
|
|
|
{# = Terms of Services = #}
|
|
|
|
{# ===================== #}
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
2011-04-02 21:34:40 -04:00
|
|
|
{% endblock content %}
|