from django.urls import path

from . import views

urlpatterns = [
    path("", views.dashboard, name="dashboard"),
    path("device/<str:device_id>/", views.device_detail, name="device_detail"),
    path("api/v1/locations/", views.LocationIngestView.as_view(), name="api_location_ingest"),
    path("api/v1/devices/", views.DeviceListView.as_view(), name="api_device_list"),
    path("api/v1/devices/<str:device_id>/", views.DeviceDetailView.as_view(), name="api_device_detail"),
    path(
        "api/v1/devices/<str:device_id>/locations/",
        views.DeviceLocationHistoryView.as_view(),
        name="api_device_locations",
    ),
    path(
        "api/v1/devices/<str:device_id>/latest/",
        views.DeviceLatestLocationView.as_view(),
        name="api_device_latest",
    ),
]
