from django.urls import path
from rest_framework.routers import DefaultRouter

from store import views

router = DefaultRouter()

# FIXME: renamed
router.register(r'statistics', views.StatisticsAPI, basename='statistics')
router.register(r'cdek', views.CDEKAPI, basename='cdek')

urlpatterns = [
    path("login/", views.LoginAPI.as_view()),
    path("users/", views.UserAPI.as_view()),
    path("users/<int:pk>", views.UserAPI.as_view()),

    path("checklist/", views.ChecklistAPI.as_view()),
    path("checklist/<str:id>", views.ChecklistAPI.as_view()),

    path("currency/", views.YuanRateAPI.as_view()),
    path("category/", views.CategoryAPI.as_view()),
    path("pickup/", views.PickupAPI.as_view()),
    path("category/price/", views.PricesAPI.as_view()),
    path("payment/", views.PaymentMethodsAPI.as_view()),

    path("promo/", views.PromoCodeAPI.as_view()),

] + router.urls
