Move Twitch stuff to /twitch/
This commit is contained in:
parent
8f43fd612c
commit
6f6116c3c7
31 changed files with 1150 additions and 984 deletions
104
twitch/urls.py
104
twitch/urls.py
|
|
@ -3,21 +3,6 @@ from typing import TYPE_CHECKING
|
|||
from django.urls import path
|
||||
|
||||
from twitch import views
|
||||
from twitch.feeds import DropCampaignAtomFeed
|
||||
from twitch.feeds import DropCampaignDiscordFeed
|
||||
from twitch.feeds import DropCampaignFeed
|
||||
from twitch.feeds import GameAtomFeed
|
||||
from twitch.feeds import GameCampaignAtomFeed
|
||||
from twitch.feeds import GameCampaignDiscordFeed
|
||||
from twitch.feeds import GameCampaignFeed
|
||||
from twitch.feeds import GameDiscordFeed
|
||||
from twitch.feeds import GameFeed
|
||||
from twitch.feeds import OrganizationAtomFeed
|
||||
from twitch.feeds import OrganizationDiscordFeed
|
||||
from twitch.feeds import OrganizationRSSFeed
|
||||
from twitch.feeds import RewardCampaignAtomFeed
|
||||
from twitch.feeds import RewardCampaignDiscordFeed
|
||||
from twitch.feeds import RewardCampaignFeed
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.urls.resolvers import URLPattern
|
||||
|
|
@ -27,129 +12,82 @@ app_name = "twitch"
|
|||
|
||||
|
||||
urlpatterns: list[URLPattern | URLResolver] = [
|
||||
# /twitch/
|
||||
path("", views.dashboard, name="dashboard"),
|
||||
# /twitch/badges/
|
||||
path("badges/", views.badge_list_view, name="badge_list"),
|
||||
# /twitch/badges/<set_id>/
|
||||
path("badges/<str:set_id>/", views.badge_set_detail_view, name="badge_set_detail"),
|
||||
# /twitch/campaigns/
|
||||
path("campaigns/", views.drop_campaign_list_view, name="campaign_list"),
|
||||
# /twitch/campaigns/<twitch_id>/
|
||||
path(
|
||||
"campaigns/<str:twitch_id>/",
|
||||
views.drop_campaign_detail_view,
|
||||
name="campaign_detail",
|
||||
),
|
||||
# /twitch/channels/
|
||||
path("channels/", views.ChannelListView.as_view(), name="channel_list"),
|
||||
# /twitch/channels/<twitch_id>/
|
||||
path(
|
||||
"channels/<str:twitch_id>/",
|
||||
views.ChannelDetailView.as_view(),
|
||||
name="channel_detail",
|
||||
),
|
||||
path("debug/", views.debug_view, name="debug"),
|
||||
path("datasets/", views.dataset_backups_view, name="dataset_backups"),
|
||||
path(
|
||||
"datasets/download/<path:relative_path>/",
|
||||
views.dataset_backup_download_view,
|
||||
name="dataset_backup_download",
|
||||
),
|
||||
path("docs/rss/", views.docs_rss_view, name="docs_rss"),
|
||||
# /twitch/emotes/
|
||||
path("emotes/", views.emote_gallery_view, name="emote_gallery"),
|
||||
# /twitch/games/
|
||||
path("games/", views.GamesGridView.as_view(), name="games_grid"),
|
||||
# /twitch/games/list/
|
||||
path("games/list/", views.GamesListView.as_view(), name="games_list"),
|
||||
# /twitch/games/<twitch_id>/
|
||||
path("games/<str:twitch_id>/", views.GameDetailView.as_view(), name="game_detail"),
|
||||
# /twitch/organizations/
|
||||
path("organizations/", views.org_list_view, name="org_list"),
|
||||
# /twitch/organizations/<twitch_id>/
|
||||
path(
|
||||
"organizations/<str:twitch_id>/",
|
||||
views.organization_detail_view,
|
||||
name="organization_detail",
|
||||
),
|
||||
# /twitch/reward-campaigns/
|
||||
path(
|
||||
"reward-campaigns/",
|
||||
views.reward_campaign_list_view,
|
||||
name="reward_campaign_list",
|
||||
),
|
||||
# /twitch/reward-campaigns/<twitch_id>/
|
||||
path(
|
||||
"reward-campaigns/<str:twitch_id>/",
|
||||
views.reward_campaign_detail_view,
|
||||
name="reward_campaign_detail",
|
||||
),
|
||||
path("search/", views.search_view, name="search"),
|
||||
# /twitch/export/campaigns/csv/
|
||||
path(
|
||||
"export/campaigns/csv/",
|
||||
views.export_campaigns_csv,
|
||||
name="export_campaigns_csv",
|
||||
),
|
||||
# /twitch/export/campaigns/json/
|
||||
path(
|
||||
"export/campaigns/json/",
|
||||
views.export_campaigns_json,
|
||||
name="export_campaigns_json",
|
||||
),
|
||||
# /twitch/export/games/csv/
|
||||
path("export/games/csv/", views.export_games_csv, name="export_games_csv"),
|
||||
# /twitch/export/games/json/
|
||||
path("export/games/json/", views.export_games_json, name="export_games_json"),
|
||||
# /twitch/export/organizations/csv/
|
||||
path(
|
||||
"export/organizations/csv/",
|
||||
views.export_organizations_csv,
|
||||
name="export_organizations_csv",
|
||||
),
|
||||
# /twitch/export/organizations/json/
|
||||
path(
|
||||
"export/organizations/json/",
|
||||
views.export_organizations_json,
|
||||
name="export_organizations_json",
|
||||
),
|
||||
# RSS feeds
|
||||
# /rss/campaigns/ - all active campaigns
|
||||
path("rss/campaigns/", DropCampaignFeed(), name="campaign_feed"),
|
||||
# /rss/games/ - newly added games
|
||||
path("rss/games/", GameFeed(), name="game_feed"),
|
||||
# /rss/games/<twitch_id>/campaigns/ - active campaigns for a specific game
|
||||
path(
|
||||
"rss/games/<str:twitch_id>/campaigns/",
|
||||
GameCampaignFeed(),
|
||||
name="game_campaign_feed",
|
||||
),
|
||||
# /rss/organizations/ - newly added organizations
|
||||
path(
|
||||
"rss/organizations/",
|
||||
OrganizationRSSFeed(),
|
||||
name="organization_feed",
|
||||
),
|
||||
# /rss/reward-campaigns/ - all active reward campaigns
|
||||
path(
|
||||
"rss/reward-campaigns/",
|
||||
RewardCampaignFeed(),
|
||||
name="reward_campaign_feed",
|
||||
),
|
||||
# Atom feeds (added alongside RSS to preserve backward compatibility)
|
||||
path("atom/campaigns/", DropCampaignAtomFeed(), name="campaign_feed_atom"),
|
||||
path("atom/games/", GameAtomFeed(), name="game_feed_atom"),
|
||||
path(
|
||||
"atom/games/<str:twitch_id>/campaigns/",
|
||||
GameCampaignAtomFeed(),
|
||||
name="game_campaign_feed_atom",
|
||||
),
|
||||
path(
|
||||
"atom/organizations/",
|
||||
OrganizationAtomFeed(),
|
||||
name="organization_feed_atom",
|
||||
),
|
||||
path(
|
||||
"atom/reward-campaigns/",
|
||||
RewardCampaignAtomFeed(),
|
||||
name="reward_campaign_feed_atom",
|
||||
),
|
||||
# Discord feeds (Atom feeds with Discord relative timestamps)
|
||||
path("discord/campaigns/", DropCampaignDiscordFeed(), name="campaign_feed_discord"),
|
||||
path("discord/games/", GameDiscordFeed(), name="game_feed_discord"),
|
||||
path(
|
||||
"discord/games/<str:twitch_id>/campaigns/",
|
||||
GameCampaignDiscordFeed(),
|
||||
name="game_campaign_feed_discord",
|
||||
),
|
||||
path(
|
||||
"discord/organizations/",
|
||||
OrganizationDiscordFeed(),
|
||||
name="organization_feed_discord",
|
||||
),
|
||||
path(
|
||||
"discord/reward-campaigns/",
|
||||
RewardCampaignDiscordFeed(),
|
||||
name="reward_campaign_feed_discord",
|
||||
),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue