Files
thrillwiki_django_no_react/apps/api/v1/history/urls.py
pacnpal 75cc618c2b update
2025-09-21 20:04:42 -04:00

46 lines
1.2 KiB
Python

"""
History API URLs
URL patterns for history-related API endpoints.
"""
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
ParkHistoryViewSet,
RideHistoryViewSet,
UnifiedHistoryViewSet,
)
# Create router for history ViewSets
router = DefaultRouter()
router.register(r"timeline", UnifiedHistoryViewSet, basename="unified-history")
urlpatterns = [
# Park history endpoints
path(
"parks/<str:park_slug>/",
ParkHistoryViewSet.as_view({"get": "list"}),
name="park-history-list",
),
path(
"parks/<str:park_slug>/detail/",
ParkHistoryViewSet.as_view({"get": "retrieve"}),
name="park-history-detail",
),
# Ride history endpoints
path(
"parks/<str:park_slug>/rides/<str:ride_slug>/",
RideHistoryViewSet.as_view({"get": "list"}),
name="ride-history-list",
),
path(
"parks/<str:park_slug>/rides/<str:ride_slug>/detail/",
RideHistoryViewSet.as_view({"get": "retrieve"}),
name="ride-history-detail",
),
# Include router URLs for unified timeline
path("", include(router.urls)),
]