22 lines
878 B
Python
22 lines
878 B
Python
from django.urls import path, re_path
|
|
from .views import (
|
|
MosquitoPostListAPIView,
|
|
DeviceTempLogListAPIView,
|
|
WeatherLogListAPIView,
|
|
DeviceInfoAPIView,
|
|
WeatherStationInfoAPIView,
|
|
DeviceRemoteViewSet,
|
|
)
|
|
|
|
|
|
app_name = 'mosq-api'
|
|
urlpatterns = [
|
|
path('post/', MosquitoPostListAPIView.as_view(), name='post'),
|
|
path('temp/', DeviceTempLogListAPIView.as_view(), name='temp-hum'),
|
|
path('weather/', WeatherLogListAPIView.as_view(), name='weather-log'),
|
|
path('deviceinfo/', DeviceInfoAPIView.as_view(), name='device-info'),
|
|
path('weatherstationinfo/', WeatherStationInfoAPIView.as_view(), name='weather-station-info'),
|
|
path('device/<device_id>/mqtt/pub/', DeviceRemoteViewSet.as_view({'post': 'pub'}), name='device-mqtt-pub'),
|
|
path('device/<device_id>/mqtt/sub/', DeviceRemoteViewSet.as_view({'get': 'sub'}), name='device-mqtt-sub'),
|
|
]
|