Improve feed explenation; add link to templates

This commit is contained in:
Joakim Hellsén 2026-03-17 05:36:31 +01:00
commit 768e6f2111
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
19 changed files with 200 additions and 279 deletions

View file

@ -48,6 +48,7 @@
title="Atom feed for Twitch campaigns">[atom]</a>
<a href="{% url 'core:campaign_feed_discord' %}"
title="Discord feed for Twitch campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
</header>
{% if campaigns_by_game %}
@ -223,6 +224,7 @@
title="Atom feed for all Kick campaigns">[atom]</a>
<a href="{% url 'kick:campaign_feed_discord' %}"
title="Discord feed for all Kick campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
</header>
{% if kick_campaigns_by_game %}

View file

@ -59,6 +59,7 @@
title="Atom feed for {{ campaign.category.name }} campaigns">[atom]</a>
<a href="{% url 'kick:game_campaign_feed_discord' campaign.category.kick_id %}"
title="Discord feed for {{ campaign.category.name }} campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
{% endif %}
<p style="margin: 0.25rem 0; color: #666;">

View file

@ -26,6 +26,7 @@
title="Atom feed for all campaigns">[atom]</a>
<a href="{% url 'kick:campaign_feed_discord' %}"
title="Discord feed for all campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
<form method="get" action="{% url 'kick:campaign_list' %}">
<div style="display: flex;

View file

@ -56,6 +56,7 @@
title="Atom feed for {{ category.name }} campaigns">[atom]</a>
<a href="{% url 'kick:game_campaign_feed_discord' category.kick_id %}"
title="Discord feed for {{ category.name }} campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
{% if category.kick_url %}
<p style="margin: 0.25rem 0;">

View file

@ -25,6 +25,7 @@
title="Atom feed for all games">[atom]</a>
<a href="{% url 'kick:game_feed_discord' %}"
title="Discord feed for all games">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
{% if categories %}
<ul>

View file

@ -27,6 +27,7 @@
title="Atom feed for all campaigns">[atom]</a>
<a href="{% url 'kick:campaign_feed_discord' %}"
title="Discord feed for all campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
<hr />
{% if active_campaigns %}

View file

@ -26,6 +26,7 @@
title="Atom feed for all organizations">[atom]</a>
<a href="{% url 'kick:organization_feed_discord' %}"
title="Discord feed for all organizations">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
{% if orgs %}
<ul>

View file

@ -104,6 +104,7 @@
title="Atom feed for {{ campaign.game.display_name }} campaigns">[atom]</a>
<a href="{% url 'core:game_campaign_feed_discord' campaign.game.twitch_id %}"
title="Discord feed for {{ campaign.game.display_name }} campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
{% endif %}
</div>
</div>

View file

@ -30,6 +30,7 @@
title="Atom feed for all campaigns">[atom]</a>
<a href="{% url 'core:campaign_feed_discord' %}"
title="Discord feed for all campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
<a href="{% url 'twitch:export_campaigns_csv' %}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}"
title="Export campaigns as CSV">[csv]</a>
<a href="{% url 'twitch:export_campaigns_json' %}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}"

View file

@ -39,6 +39,7 @@
title="Atom feed for campaigns">[atom]</a>
<a href="{% url 'core:campaign_feed_discord' %}"
title="Discord feed for campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
<hr />
{% if campaigns_by_game %}

View file

@ -6,99 +6,148 @@
{% block content %}
<main>
<h1>RSS Feeds Documentation</h1>
<p>This page lists all available RSS feeds for TTVDrops.</p>
<p>
Atom feeds are also available for the same resources under the
<code>/atom/</code> endpoints.
You have three types of feeds available for Twitch drops data: RSS, Atom, and Discord.
RSS and Atom feeds are similar and can be used in any RSS reader application.
The main difference is that Atom feeds include additional metadata and support for more complex content, while RSS feeds are more widely supported by older applications.
</p>
<p>
Discord feeds are available under the <code>/discord/</code> endpoints. These are Atom feeds
that include Discord relative timestamps (e.g., <code>&lt;t:1773450272:R&gt;</code>) for dates,
making them ideal for Discord bots and integrations.
making them ideal for Discord bots and integrations. Future enhancements may include Discord-specific formatting or content.
</p>
<section>
<h2>Global RSS Feeds</h2>
<p>These feeds contain all items across the entire site:</p>
<ul>
{% for feed in feeds %}
<li>
<h3>{{ feed.title }}</h3>
<p>{{ feed.description }}</p>
<p>
<a href="{{ feed.url }}">Subscribe to {{ feed.title }} RSS Feed</a>
{% if feed.atom_url %}
&nbsp;|&nbsp;
<a href="{{ feed.atom_url }}">Subscribe to {{ feed.title }} Atom Feed</a>
{% endif %}
{% if feed.discord_url %}
&nbsp;|&nbsp;
<a href="{{ feed.discord_url }}">Subscribe to {{ feed.title }} Discord Feed</a>
{% endif %}
</p>
<pre><code class="language-xml">{% if feed.example_xml %}{{ feed.example_xml|escape }}{% else %}No example XML available yet.{% endif %}</code></pre>
{% if feed.example_xml_atom %}
<h4>Atom example</h4>
<pre><code class="language-xml">{{ feed.example_xml_atom|escape }}</code></pre>
{% endif %}
{% if feed.example_xml_discord %}
<h4>Discord example</h4>
<pre><code class="language-xml">{{ feed.example_xml_discord|escape }}</code></pre>
{% endif %}
</li>
{% endfor %}
</ul>
<table>
<thead>
<tr>
<th>Description</th>
<th>RSS</th>
<th>Atom</th>
<th>Discord</th>
</tr>
</thead>
<tbody>
<tr>
<td>New Twitch games</td>
<td>
<a href="https://ttvdrops.lovinator.space/rss/games/">https://ttvdrops.lovinator.space/rss/games/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/atom/games/">https://ttvdrops.lovinator.space/atom/games/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/discord/games/">https://ttvdrops.lovinator.space/discord/games/</a>
</td>
</tr>
<tr>
<td>Latest Twitch drop campaigns</td>
<td>
<a href="https://ttvdrops.lovinator.space/rss/campaigns/">https://ttvdrops.lovinator.space/rss/campaigns/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/atom/campaigns/">https://ttvdrops.lovinator.space/atom/campaigns/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/discord/campaigns/">https://ttvdrops.lovinator.space/discord/campaigns/</a>
</td>
</tr>
<tr>
<td>Latest Twitch organizations</td>
<td>
<a href="https://ttvdrops.lovinator.space/rss/organizations/">https://ttvdrops.lovinator.space/rss/organizations/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/atom/organizations/">https://ttvdrops.lovinator.space/atom/organizations/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/discord/organizations/">https://ttvdrops.lovinator.space/discord/organizations/</a>
</td>
</tr>
<tr>
<td>Latest Twitch reward campaigns</td>
<td>
<a href="https://ttvdrops.lovinator.space/rss/reward-campaigns/">https://ttvdrops.lovinator.space/rss/reward-campaigns/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/atom/reward-campaigns/">https://ttvdrops.lovinator.space/atom/reward-campaigns/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/discord/reward-campaigns/">https://ttvdrops.lovinator.space/discord/reward-campaigns/</a>
</td>
</tr>
<tr>
<td>Latest Kick campaigns</td>
<td>
<a href="https://ttvdrops.lovinator.space/kick/rss/campaigns/">https://ttvdrops.lovinator.space/kick/rss/campaigns/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/kick/atom/campaigns/">https://ttvdrops.lovinator.space/kick/atom/campaigns/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/discord/campaigns/">https://ttvdrops.lovinator.space/discord/campaigns/</a>
</td>
</tr>
<tr>
<td>Latest Kick games</td>
<td>
<a href="https://ttvdrops.lovinator.space/kick/rss/games/">https://ttvdrops.lovinator.space/kick/rss/games/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/kick/atom/games/">https://ttvdrops.lovinator.space/kick/atom/games/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/discord/games/">https://ttvdrops.lovinator.space/discord/games/</a>
</td>
</tr>
<tr>
<td>Latest Kick organizations</td>
<td>
<a href="https://ttvdrops.lovinator.space/kick/rss/organizations/">https://ttvdrops.lovinator.space/kick/rss/organizations/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/kick/atom/organizations/">https://ttvdrops.lovinator.space/kick/atom/organizations/</a>
</td>
<td>
<a href="https://ttvdrops.lovinator.space/discord/organizations/">https://ttvdrops.lovinator.space/discord/organizations/</a>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2>Filtered RSS Feeds</h2>
<p>
You can subscribe to RSS feeds scoped to a specific game or organization. When available, links below point to live examples; otherwise use the endpoint template.
</p>
<ul>
{% for feed in filtered_feeds %}
<li>
<h3>{{ feed.title }}</h3>
<p>{{ feed.description }}</p>
<p>
Endpoint: <code>{{ feed.url }}</code>
{% if feed.atom_url %}&nbsp;|&nbsp; Atom: <code>{{ feed.atom_url }}</code>{% endif %}
{% if feed.discord_url %}&nbsp;|&nbsp; Discord: <code>{{ feed.discord_url }}</code>{% endif %}
</p>
{% if feed.has_sample %}
<p>
<a href="{{ feed.url }}">View a live example</a>
{% if feed.atom_url %}
&nbsp;|&nbsp;
<a href="{{ feed.atom_url }}">View Atom example</a>
{% endif %}
{% if feed.discord_url %}
&nbsp;|&nbsp;
<a href="{{ feed.discord_url }}">View Discord example</a>
{% endif %}
</p>
{% endif %}
<pre><code class="language-xml">{% if feed.example_xml %}{{ feed.example_xml|escape }}{% else %}No example XML available yet.{% endif %}</code></pre>
{% if feed.example_xml_atom %}
<h4>Atom example</h4>
<pre><code class="language-xml">{{ feed.example_xml_atom|escape }}</code></pre>
{% endif %}
{% if feed.example_xml_discord %}
<h4>Discord example</h4>
<pre><code class="language-xml">{{ feed.example_xml_discord|escape }}</code></pre>
{% endif %}
</li>
{% endfor %}
</ul>
</section>
<section>
<h2>How to Use RSS Feeds</h2>
<p>
RSS feeds allow you to stay updated with new content. You can use any RSS reader application to subscribe to these feeds.
</p>
<ul>
<li>Copy the feed URL</li>
<li>Paste it into your favorite RSS reader (Feedly, Inoreader, NetNewsWire, etc.)</li>
<li>Get automatic updates when new content is added</li>
</ul>
<p>You can subscribe to RSS feeds scoped to a specific game.</p>
<table>
<thead>
<tr>
<th>Game</th>
<th>RSS</th>
<th>Atom</th>
<th>Discord</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ game.display_name }}</td>
<td>
<a href="{% url 'core:game_campaign_feed' game.twitch_id %}">
https://ttvdrops.lovinator.space/rss/games/{{ game.twitch_id }}/
</a>
</td>
<td>
<a href="{% url 'core:game_campaign_feed_atom' game.twitch_id %}">
https://ttvdrops.lovinator.space/atom/games/{{ game.twitch_id }}/
</a>
</td>
<td>
<a href="{% url 'core:game_campaign_feed_discord' game.twitch_id %}">
https://ttvdrops.lovinator.space/discord/games/{{ game.twitch_id }}/
</a>
</td>
</tr>
</tbody>
</table>
</section>
</main>
{% endblock content %}

View file

@ -63,6 +63,7 @@
title="Atom feed for {{ game.display_name }} campaigns">[atom]</a>
<a href="{% url 'core:game_campaign_feed_discord' game.twitch_id %}"
title="Discord feed for {{ game.display_name }} campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
</div>
</div>

View file

@ -28,6 +28,7 @@
title="Atom feed for all games">[atom]</a>
<a href="{% url 'core:game_feed_discord' %}"
title="Discord feed for all games">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
<a href="{% url 'twitch:export_games_csv' %}"
title="Export all games as CSV">[csv]</a>
<a href="{% url 'twitch:export_games_json' %}"

View file

@ -26,6 +26,7 @@
title="Atom feed for all games">[atom]</a>
<a href="{% url 'core:game_feed_discord' %}"
title="Discord feed for all games">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
<a href="{% url 'twitch:export_games_csv' %}"
title="Export all games as CSV">[csv]</a>
<a href="{% url 'twitch:export_games_json' %}"

View file

@ -11,6 +11,7 @@
title="Atom feed for all organizations">[atom]</a>
<a href="{% url 'core:organization_feed_discord' %}"
title="Discord feed for all organizations">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
<a href="{% url 'twitch:export_organizations_csv' %}"
title="Export all organizations as CSV">[csv]</a>
<a href="{% url 'twitch:export_organizations_json' %}"

View file

@ -37,11 +37,12 @@
<div style="margin-bottom: 1rem;">
<a href="{% url 'core:reward_campaign_feed' %}"
style="margin-right: 1rem"
title="RSS feed for all reward campaigns">RSS feed for all reward campaigns</a>
title="RSS feed for all reward campaigns">[rss]</a>
<a href="{% url 'core:reward_campaign_feed_atom' %}"
title="Atom feed for all reward campaigns">[atom]</a>
<a href="{% url 'core:reward_campaign_feed_discord' %}"
title="Discord feed for all reward campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
<!-- Campaign Summary -->
{% if reward_campaign.summary %}<p id="campaign-summary">{{ reward_campaign.summary|linebreaksbr }}</p>{% endif %}

View file

@ -27,6 +27,7 @@
title="Atom feed for all reward campaigns">[atom]</a>
<a href="{% url 'core:reward_campaign_feed_discord' %}"
title="Discord feed for all reward campaigns">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
</div>
<p>This is an archive of old Twitch reward campaigns because we do not monitor them.</p>
<p>