from django.urls import path, include
from . import views
from rest_framework.routers import DefaultRouter
from rest_framework.authtoken.views import obtain_auth_token

app_name = 'PortalREMaxAPI'

router = DefaultRouter(trailing_slash=False)
#router.register('assinantes3', views.AssinantesViewSet, basename=app_name)

urlpatterns = [
    path(r'offices', views.OfficeView.as_view(), name="offices"),
    path(r'offices/<int:pk>', views.SingleOfficeView.as_view(), name="office"),
    path(r'agents', views.AgentView.as_view(), name="agents"),
    path(r'types', views.TypeView.as_view(), name="types"),
    path(r'usages', views.UsageView.as_view(), name="usages"),
    path(r'features', views.FeatureView.as_view(), name="features"),
    path(r'agents/<int:pk>', views.SingleAgentView.as_view(), name="agent"),
    path(r'properties', views.PropertyView.as_view(), name="properties"),
    path(r'properties/<int:pk>', views.SinglePropertyView.as_view(), name="property"),
    path(r'medias', views.PropertyMediaView.as_view(), name="medias"),
    path(r'medias/<int:pk>', views.SinglePropertyMediaView.as_view(), name="media"),
    path(r'properties_features', views.PropertyFeatureView.as_view(), name="properties_features"),
    path(r'properties_features/<int:pk>', views.SinglePropertyFeatureView.as_view(), name="property_features"),
    path(r'locations', views.LocationView.as_view(), name="locations"),
    path(r'locations/<int:pk>', views.SingleLocationView.as_view(), name="location"), 
]

urlpatterns += router.urls
