2018-03-30 02:59:51 +00:00
|
|
|
from django.urls import path
|
|
|
|
|
2018-03-28 20:12:55 +00:00
|
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
|
2018-03-30 02:59:51 +00:00
|
|
|
from api.views.controls import JustPlayed, NextRequest
|
2018-03-28 20:12:55 +00:00
|
|
|
from api.views.radio import (AlbumViewSet, ArtistViewSet,
|
|
|
|
GameViewSet, SongViewSet)
|
|
|
|
|
|
|
|
|
|
|
|
router = DefaultRouter()
|
2018-03-30 02:59:51 +00:00
|
|
|
|
2018-03-28 20:12:55 +00:00
|
|
|
router.register(r'albums', AlbumViewSet, base_name='album')
|
|
|
|
router.register(r'artists', ArtistViewSet, base_name='artist')
|
|
|
|
router.register(r'games', GameViewSet, base_name='game')
|
|
|
|
router.register(r'songs', SongViewSet, base_name='song')
|
|
|
|
|
2018-03-30 02:59:51 +00:00
|
|
|
urlpatterns = [
|
|
|
|
path('next/', NextRequest.as_view()),
|
|
|
|
path('played/', JustPlayed.as_view()),
|
|
|
|
]
|
|
|
|
|
|
|
|
urlpatterns += router.urls
|