23 lines
827 B
Python
23 lines
827 B
Python
from django.urls import path, re_path
|
|
from .views import (
|
|
MosquitoListAPIView,
|
|
MosquitoPostListAPIView,
|
|
DeviceTempLogListAPIView,
|
|
WeatherLogListAPIView,
|
|
DeviceInfoAPIView,
|
|
WeatherStationInfoAPIView,
|
|
remote_control,
|
|
)
|
|
|
|
|
|
app_name = 'mosq-api'
|
|
urlpatterns = [
|
|
path('', MosquitoListAPIView.as_view(), name='list'),
|
|
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('devicemqtt/remotecontrol/<str:device_id>/', remote_control, name='remote_control'),
|
|
|
|
] |