"""This module holds the api-related urls for the ``photostories`` app."""

from mtp.apps.api.routers import SimpleRouterWithNesting

from . import viewsets

router = SimpleRouterWithNesting(trailing_slash=True)

# Route for photostories
router.register(
    r'photostories',
    viewsets.PhotostoryViewSet,
    base_name='photostory'
).register(
    r'strips',
    viewsets.StripViewSet,
    base_name='strip',
    parents_query_lookups=['photostory']
).register(
    r'photos',
    viewsets.PhotoViewSet,
    base_name='photo',
    parents_query_lookups=['strip__photostory', 'strip']
)

urlpatterns = router.urls
