20 lines
575 B
Python
20 lines
575 B
Python
from django.urls import path
|
|
|
|
from .views import (
|
|
CompetitionListApiView,
|
|
PlayerDetailApiView,
|
|
PlayerSearchApiView,
|
|
SeasonListApiView,
|
|
TeamListApiView,
|
|
)
|
|
|
|
app_name = "api"
|
|
|
|
urlpatterns = [
|
|
path("players/", PlayerSearchApiView.as_view(), name="players"),
|
|
path("players/<int:pk>/", PlayerDetailApiView.as_view(), name="player_detail"),
|
|
path("competitions/", CompetitionListApiView.as_view(), name="competitions"),
|
|
path("teams/", TeamListApiView.as_view(), name="teams"),
|
|
path("seasons/", SeasonListApiView.as_view(), name="seasons"),
|
|
]
|