Skip to content

Commit

Permalink
Merge pull request #15 from prefeitura-rio/apis_monitoramento_turn_back
Browse files Browse the repository at this point in the history
testing old commit
  • Loading branch information
patriciacatandi authored Mar 2, 2024
2 parents 1b71ad2 + bb6f47d commit 0d2d3a7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
1 change: 1 addition & 0 deletions api_dados_rio/v2/clima_alagamento/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# flake8: noqa: E501
from os import getenv

from django.utils.decorators import method_decorator
Expand Down
4 changes: 2 additions & 2 deletions api_dados_rio/v2/clima_pluviometro/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# reverting
from rest_framework import routers

from api_dados_rio.v2.clima_pluviometro import views
# from api_dados_rio.v2.clima_pluviometro import views
from . import views

router = routers.DefaultRouter()
router.register(
Expand Down
17 changes: 9 additions & 8 deletions api_dados_rio/v2/clima_pluviometro/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# flake8: noqa: E501
from os import getenv

from django.utils.decorators import method_decorator
Expand All @@ -9,7 +10,7 @@
from rest_framework_tracking.mixins import LoggingMixin


## Views for last 15 min
# Views for last 15 min
@method_decorator(
name="list",
decorator=swagger_auto_schema(
Expand Down Expand Up @@ -179,7 +180,7 @@ def list(self, request):
)


# ###### Views for last 30 min
# Views for last 30 min
# @method_decorator(
# name="list",
# decorator=swagger_auto_schema(
Expand Down Expand Up @@ -264,7 +265,7 @@ def list(self, request):
# )


# ###### Views for last 60 min
# Views for last 60 min
# @method_decorator(
# name="list",
# decorator=swagger_auto_schema(
Expand Down Expand Up @@ -349,7 +350,7 @@ def list(self, request):
# )


# ###### Views for last 3h
# Views for last 3h
# @method_decorator(
# name="list",
# decorator=swagger_auto_schema(
Expand Down Expand Up @@ -434,7 +435,7 @@ def list(self, request):
# )


# ###### Views for last 6h
# Views for last 6h
# @method_decorator(
# name="list",
# decorator=swagger_auto_schema(
Expand Down Expand Up @@ -519,7 +520,7 @@ def list(self, request):
# )


# ###### Views for last 12h
# Views for last 12h
# @method_decorator(
# name="list",
# decorator=swagger_auto_schema(
Expand Down Expand Up @@ -604,7 +605,7 @@ def list(self, request):
# )


# ###### Views for last 24h
# Views for last 24h
# @method_decorator(
# name="list",
# decorator=swagger_auto_schema(
Expand Down Expand Up @@ -689,7 +690,7 @@ def list(self, request):
# )


# ###### Views for last 96h
# Views for last 96h
# @method_decorator(
# name="list",
# decorator=swagger_auto_schema(
Expand Down
11 changes: 6 additions & 5 deletions api_dados_rio/v2/clima_radar/urls.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# -*- coding: utf-8 -*-
from rest_framework import routers

from api_dados_rio.v2.clima_radar import views
# from api_dados_rio.v2.clima_radar import views
from . import views

router = routers.DefaultRouter()
router.register(
r"precipitacao_15min",
views.Last15MinRainViewRadar,
views.Last15MinRainView,
basename="precipitacao_15min",
)
router.register(
r"ultima_atualizacao_precipitacao_15min",
views.LastUpdateRainViewRadar,
views.LastUpdateRainView,
basename="ultima_atualizacao_precipitacao_15min",
)
router.register(
r"precipitacao_120min",
views.Last120MinRainViewRadar,
views.Last120MinRainView,
basename="precipitacao_120min",
)
router.register(
r"ultima_atualizacao_precipitacao_120min",
views.LastUpdate120MinRainViewRadar,
views.LastUpdate120MinRainView,
basename="ultima_atualizacao_precipitacao_120min",
)
9 changes: 5 additions & 4 deletions api_dados_rio/v2/clima_radar/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# flake8: noqa: E501
from os import getenv

from django.utils.decorators import method_decorator
Expand Down Expand Up @@ -36,7 +37,7 @@
""",
),
)
class Last15MinRainViewRadar(LoggingMixin, ViewSet):
class Last15MinRainView(LoggingMixin, ViewSet):
def list(self, request):
data_key = "data_chuva_recente_radar_inea"
try:
Expand Down Expand Up @@ -71,7 +72,7 @@ def list(self, request):
""",
),
)
class LastUpdateRainViewRadar(LoggingMixin, ViewSet):
class LastUpdateRainView(LoggingMixin, ViewSet):
def list(self, request):
last_update_key = "data_update_chuva_recente_radar_inea"
try:
Expand Down Expand Up @@ -121,7 +122,7 @@ def list(self, request):
""",
),
)
class Last120MinRainViewRadar(LoggingMixin, ViewSet):
class Last120MinRainView(LoggingMixin, ViewSet):
def list(self, request):
data_key = "data_chuva_passado_radar_inea"
try:
Expand Down Expand Up @@ -156,7 +157,7 @@ def list(self, request):
""",
),
)
class LastUpdate120MinRainViewRadar(LoggingMixin, ViewSet):
class LastUpdate120MinRainView(LoggingMixin, ViewSet):
def list(self, request):
last_update_key = "data_update_chuva_passado_radar_inea"
try:
Expand Down

0 comments on commit 0d2d3a7

Please sign in to comment.