# pylint: skip-file
"""
Discussion API URLs
"""


from django.conf import settings
from django.conf.urls import include, url
from rest_framework.routers import SimpleRouter

from lms.djangoapps.discussion.rest_api.views import (
    CommentViewSet,
    CourseDiscussionRolesAPIView,
    CourseDiscussionSettingsAPIView,
    CourseTopicsView,
    CourseView,
    ReplaceUsernamesView,
    RetireUserView,
    ThreadViewSet
)

ROUTER = SimpleRouter()
ROUTER.register("threads", ThreadViewSet, basename="thread")
ROUTER.register("comments", CommentViewSet, basename="comment")

urlpatterns = [
    url(
        r"^v1/courses/{}/settings$".format(
            settings.COURSE_ID_PATTERN
        ),
        CourseDiscussionSettingsAPIView.as_view(),
        name="discussion_course_settings",
    ),
    url(
        r"^v1/courses/{}/roles/(?P<rolename>[A-Za-z0-9+ _-]+)/?$".format(
            settings.COURSE_ID_PATTERN
        ),
        CourseDiscussionRolesAPIView.as_view(),
        name="discussion_course_roles",
    ),
    url(
        fr"^v1/courses/{settings.COURSE_ID_PATTERN}",
        CourseView.as_view(),
        name="discussion_course"
    ),
    url(r"^v1/accounts/retire_forum", RetireUserView.as_view(), name="retire_discussion_user"),
    url(r"^v1/accounts/replace_username", ReplaceUsernamesView.as_view(), name="replace_discussion_username"),
    url(
        fr"^v1/course_topics/{settings.COURSE_ID_PATTERN}",
        CourseTopicsView.as_view(),
        name="course_topics"
    ),
    url("^v1/", include(ROUTER.urls)),
]

c8c5daaad36e3dccc2e28d6baf0ddd133f200155
<mask token>

<mask token>
ROUTER.register('threads', ThreadViewSet, basename='thread')
ROUTER.register('comments', CommentViewSet, basename='comment')
<mask token>

<mask token>
ROUTER = SimpleRouter()
ROUTER.register('threads', ThreadViewSet, basename='thread')
ROUTER.register('comments', CommentViewSet, basename='comment')
urlpatterns = [url('^v1/courses/{}/settings$'.format(settings.
    COURSE_ID_PATTERN), CourseDiscussionSettingsAPIView.as_view(), name=
    'discussion_course_settings'), url(
    '^v1/courses/{}/roles/(?P<rolename>[A-Za-z0-9+ _-]+)/?$'.format(
    settings.COURSE_ID_PATTERN), CourseDiscussionRolesAPIView.as_view(),
    name='discussion_course_roles'), url(
    f'^v1/courses/{settings.COURSE_ID_PATTERN}', CourseView.as_view(), name
    ='discussion_course'), url('^v1/accounts/retire_forum', RetireUserView.
    as_view(), name='retire_discussion_user'), url(
    '^v1/accounts/replace_username', ReplaceUsernamesView.as_view(), name=
    'replace_discussion_username'), url(
    f'^v1/course_topics/{settings.COURSE_ID_PATTERN}', CourseTopicsView.
    as_view(), name='course_topics'), url('^v1/', include(ROUTER.urls))]

<mask token>
from django.conf import settings
from django.conf.urls import include, url
from rest_framework.routers import SimpleRouter
from lms.djangoapps.discussion.rest_api.views import CommentViewSet, CourseDiscussionRolesAPIView, CourseDiscussionSettingsAPIView, CourseTopicsView, CourseView, ReplaceUsernamesView, RetireUserView, ThreadViewSet
ROUTER = SimpleRouter()
ROUTER.register('threads', ThreadViewSet, basename='thread')
ROUTER.register('comments', CommentViewSet, basename='comment')
urlpatterns = [url('^v1/courses/{}/settings$'.format(settings.
    COURSE_ID_PATTERN), CourseDiscussionSettingsAPIView.as_view(), name=
    'discussion_course_settings'), url(
    '^v1/courses/{}/roles/(?P<rolename>[A-Za-z0-9+ _-]+)/?$'.format(
    settings.COURSE_ID_PATTERN), CourseDiscussionRolesAPIView.as_view(),
    name='discussion_course_roles'), url(
    f'^v1/courses/{settings.COURSE_ID_PATTERN}', CourseView.as_view(), name
    ='discussion_course'), url('^v1/accounts/retire_forum', RetireUserView.
    as_view(), name='retire_discussion_user'), url(
    '^v1/accounts/replace_username', ReplaceUsernamesView.as_view(), name=
    'replace_discussion_username'), url(
    f'^v1/course_topics/{settings.COURSE_ID_PATTERN}', CourseTopicsView.
    as_view(), name='course_topics'), url('^v1/', include(ROUTER.urls))]

# pylint: skip-file
"""
Discussion API URLs
"""


from django.conf import settings
from django.conf.urls import include, url
from rest_framework.routers import SimpleRouter

from lms.djangoapps.discussion.rest_api.views import (
    CommentViewSet,
    CourseDiscussionRolesAPIView,
    CourseDiscussionSettingsAPIView,
    CourseTopicsView,
    CourseView,
    ReplaceUsernamesView,
    RetireUserView,
    ThreadViewSet
)

ROUTER = SimpleRouter()
ROUTER.register("threads", ThreadViewSet, basename="thread")
ROUTER.register("comments", CommentViewSet, basename="comment")

urlpatterns = [
    url(
        r"^v1/courses/{}/settings$".format(
            settings.COURSE_ID_PATTERN
        ),
        CourseDiscussionSettingsAPIView.as_view(),
        name="discussion_course_settings",
    ),
    url(
        r"^v1/courses/{}/roles/(?P<rolename>[A-Za-z0-9+ _-]+)/?$".format(
            settings.COURSE_ID_PATTERN
        ),
        CourseDiscussionRolesAPIView.as_view(),
        name="discussion_course_roles",
    ),
    url(
        fr"^v1/courses/{settings.COURSE_ID_PATTERN}",
        CourseView.as_view(),
        name="discussion_course"
    ),
    url(r"^v1/accounts/retire_forum", RetireUserView.as_view(), name="retire_discussion_user"),
    url(r"^v1/accounts/replace_username", ReplaceUsernamesView.as_view(), name="replace_discussion_username"),
    url(
        fr"^v1/course_topics/{settings.COURSE_ID_PATTERN}",
        CourseTopicsView.as_view(),
        name="course_topics"
    ),
    url("^v1/", include(ROUTER.urls)),
]
