# Copyright (c) 2011-2022 Berkeley Model United Nations. All rights reserved.
# Use of this source code is governed by a BSD License (see LICENSE).

from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns

from huxley.api import views

app_name = "api"

urlpatterns = [
    url(r'^users/?$', views.user.UserList.as_view(), name='user_list'),
    url(r'^users/(?P<pk>[0-9]+)/?$',
        views.user.UserDetail.as_view(),
        name='user_detail'),
    url(r'^users/me/?$', views.user.CurrentUser.as_view(),
        name='current_user'),
    url(r'^users/me/password?$',
        views.user.UserPassword.as_view(),
        name='user_password'),
    url(r'^users/delegate/password?$',
        views.user.DelegateUserPassword.as_view(),
        name='delegate_user_password'),
    url(r'^committees/?$',
        views.committee.CommitteeList.as_view(),
        name='committee_list'),
    url(r'^committees/(?P<pk>[0-9]+)/?$',
        views.committee.CommitteeDetail.as_view(),
        name='committee_detail'),
    url(r'^committee_feedback/?$',
        views.committee_feedback.CommitteeFeedbackList.as_view(),
        name='committee_feedback_list'),
    url(r'^committee_feedback/(?P<pk>[0-9]+)/?$',
        views.committee_feedback.CommitteeFeedbackDetail.as_view(),
        name='committee_feedback_detail'),
    url(r'^committee_feedback/post/?$',
        views.committee_feedback.CommitteeFeedbackDetail.as_view(),
        name='committee_feedback_create'),
    url(r'^countries/?$',
        views.country.CountryList.as_view(),
        name='country_list'),
    url(r'^countries/(?P<pk>[0-9]+)/?$',
        views.country.CountryDetail.as_view(),
        name='country_detail'),
    url(r'^schools/?$', views.school.SchoolList.as_view(), name='school_list'),
    url(r'^schools/(?P<pk>[0-9]+)/?$',
        views.school.SchoolDetail.as_view(),
        name='school_detail'),
    url(r'^schools/(?P<pk>[0-9]+)/invoice/?$',
        views.school.SchoolInvoice.as_view(),
        name='school_invoice'),
    url(r'^assignments/?$',
        views.assignment.AssignmentList.as_view(),
        name='assignment_list'),
    url(r'^assignments/(?P<pk>[0-9]+)/?$',
        views.assignment.AssignmentDetail.as_view(),
        name='assignment_detail'),
    url(r'^delegates/?$',
        views.delegate.DelegateList.as_view(),
        name='delegate_list'),
    url(r'^delegates/(?P<pk>[0-9]+)/?$',
        views.delegate.DelegateDetail.as_view(),
        name='delegate_detail'),
    url(r'^registrations/?$',
        views.registration.RegistrationList.as_view(),
        name='registration_list'),
    url(r'^registrations/(?P<pk>[0-9]+)/?$',
        views.registration.RegistrationDetail.as_view(),
        name='registration_detail'),
    url(r'^register/?$', views.register.Register.as_view(), name='register'),
    url(r'^papers/(?P<pk>[0-9]+)/?$',
        views.position_paper.PositionPaperDetail.as_view(),
        name='position_paper_detail'),
    url(r'^papers/file/?$',
        views.position_paper.PositionPaperFile.as_view(),
        name='position_paper_file'),
    url(r'^papers/graded_file/?$',
        views.position_paper.PositionPaperGradedFile.as_view(),
        name='position_paper_graded_file'),
    url(r'^rubrics/(?P<pk>[0-9]+)/?$',
        views.rubric.RubricDetail.as_view(),
        name='rubric_detail'),
    url(r'^secretariat_member/?$',
        views.secretariat_member.SecretariatMemberList.as_view(),
        name='secretariat_member_list'),
    url(r'^secretariat_member/(?P<pk>[0-9]+)/?$',
        views.secretariat_member.SecretariatMemberDetail.as_view(),
        name='secretariat_member_detail'),
    url(r'^secretariat_member_committee/?$',
        views.secretariat_member.SecretariatMemberCommitteeList.as_view(),
        name='secretariat_member_committee_list'),
    url(r'^notes/?$', 
        views.note.NoteList.as_view(), 
        name='note_list'), 
    url(r'^note/?$',
        views.note.NoteDetail.as_view(),
        name='note_detail')
]

urlpatterns = format_suffix_patterns(urlpatterns)
