"""This module contains the api-related urls of the ``trainings`` app"""

from django.contrib.auth.decorators import login_required

from macrosurl import url

from . import views


urlpatterns = [
    url(
        r'^v1.0/trainings$',
        views.TrainingList.as_view(),
        name='training-list'
    ),
    url(
        r'^v1.0/sessions$',
        views.SessionList.as_view(),
        name='session-list'
    ),
    url(
        r'^v1.0/sessions/:session_uuid$',
        views.SessionDetail.as_view(),
        name='session-detail'
    ),
    url(
        r'^v1.0/sessions/:session_uuid/content$',
        views.SessionContent.as_view(),
        name='session-content'
    ),
    url(
        r'^v1.0/sessions/:session_uuid/ugc$',
        views.SessionUGC.as_view(),
        name='session-ugc'
    ),
    url(
        r'^v1.0/sessions/:session_uuid/trainees$',
        views.SessionUserList.as_view(),
        name='session-trainees'
    ),
    url(
        r'^v1.0/sessions/:session_uuid/challenge$',
        login_required(views.SessionChallengeScoreListView.as_view()),
        name='session-challenge'
    ),
]
