from rest_framework.views import APIView
from rest_framework.response import Response
from weather_app.utils import OpenWeather


class WeatherAPIView(APIView):
    """
    """
    period = ['hourly', 'daily']

    def post(self, request):
        period = request.query_params.get('period')
        city = request.query_params.get('city')
        weather = OpenWeather()
        data = weather.get_api_data(city, period)
        return Response(data)

d8d6a67b3e3282d8f8364bf1f1d9c0bd151c9816
<mask token>

<mask token>


class WeatherAPIView(APIView):
    <mask token>
    period = ['hourly', 'daily']

    def post(self, request):
        period = request.query_params.get('period')
        city = request.query_params.get('city')
        weather = OpenWeather()
        data = weather.get_api_data(city, period)
        return Response(data)

<mask token>


class WeatherAPIView(APIView):
    """
    """
    period = ['hourly', 'daily']

    def post(self, request):
        period = request.query_params.get('period')
        city = request.query_params.get('city')
        weather = OpenWeather()
        data = weather.get_api_data(city, period)
        return Response(data)

from rest_framework.views import APIView
from rest_framework.response import Response
from weather_app.utils import OpenWeather


class WeatherAPIView(APIView):
    """
    """
    period = ['hourly', 'daily']

    def post(self, request):
        period = request.query_params.get('period')
        city = request.query_params.get('city')
        weather = OpenWeather()
        data = weather.get_api_data(city, period)
        return Response(data)
