Some more data in api.
[wolnelektury.git] / src / catalogue / api / urls2.py
1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 from django.urls import path, re_path
5 from stats.utils import piwik_track_view
6 from . import views
7
8
9 urlpatterns = [
10     path('books/',
11          piwik_track_view(views.BookList2.as_view()),
12          name='catalogue_api_book_list'
13          ),
14     path('books/<slug:slug>/',
15          piwik_track_view(views.BookDetail2.as_view()),
16          name='catalogue_api_book'
17          ),
18
19     path('authors/',
20          piwik_track_view(views.AuthorList.as_view()),
21          name="catalogue_api_author_list"),
22     path('authors/<slug:slug>/',
23          piwik_track_view(views.AuthorView.as_view()),
24          name='catalogue_api_author'),
25     path('epochs/',
26          piwik_track_view(views.EpochList.as_view()),
27          name="catalogue_api_epoch_list"),
28     path('epochs/<slug:slug>/',
29          piwik_track_view(views.EpochView.as_view()),
30          name='catalogue_api_epoch'),
31     path('kinds/',
32          piwik_track_view(views.KindList.as_view()),
33          name="catalogue_api_kind_list"),
34     path('kinds/<slug:slug>/',
35          piwik_track_view(views.KindView.as_view()),
36          name='catalogue_api_kind'),
37     path('genres/',
38          piwik_track_view(views.GenreList.as_view()),
39          name="catalogue_api_genre_list"),
40     path('genres/<slug:slug>/',
41          piwik_track_view(views.GenreView.as_view()),
42          name='catalogue_api_genre'),
43 ]