# -*- coding:utf-8 -*-
# @Time    : 2020/5/18 9:54 上午
# @Author  : Creat by Han
from django.urls import include, path
from django.conf.urls import url
from smartfarming.api.views import api_gateway, api_document
from django.http import HttpResponseRedirect

class Api(object):
    def __init__(self, name="api", app_name="api"):
        self.namespace = name
        self.app_name = app_name

    def get_urls(self):
        urlpatterns = [
            url(r"^api_gateway", api_gateway, name='api_gateway'),
            url(r"^api_document", api_document, name='api_document')
        ]
        return urlpatterns

    @property
    def urls(self):
        return self.get_urls(), self.app_name, self.namespace


site = Api()