mirror of
https://github.com/bspeice/UNCCGameDay-Server
synced 2024-11-12 19:18:18 -05:00
Some documentation updates
This commit is contained in:
parent
bac2244f44
commit
c69bab3648
@ -6,9 +6,9 @@ from rest_framework.urlpatterns import format_suffix_patterns
|
|||||||
urlpatterns = patterns('gameday.views',
|
urlpatterns = patterns('gameday.views',
|
||||||
url('^$', 'api_root'),
|
url('^$', 'api_root'),
|
||||||
url('^lots/$', views.ParkingLotList.as_view(), name='parking-lots'),
|
url('^lots/$', views.ParkingLotList.as_view(), name='parking-lots'),
|
||||||
url('^lots/(?P<lot>\w+)/$', views.SingleParkingLotList.as_view(), name='parking-lot'),
|
|
||||||
url('^lots/rate/$', views.RateLot.as_view(), name='parking-rating'),
|
url('^lots/rate/$', views.RateLot.as_view(), name='parking-rating'),
|
||||||
url('^lots/location/(?P<lot>\w+)/$', views.ParkingLotEntrance.as_view(), name='get-location'),
|
url('^lots/location/(?P<lot>\w+)/$', views.ParkingLotEntrance.as_view(), name='get-location'),
|
||||||
|
url('^lots/(?P<lot>\w+)/$', views.SingleParkingLotList.as_view(), name='parking-lot'),
|
||||||
url('^register/(?P<id>\d+)/$', views.ListRegisteredUsers.as_view(), name='get-registered-user'),
|
url('^register/(?P<id>\d+)/$', views.ListRegisteredUsers.as_view(), name='get-registered-user'),
|
||||||
url('^register/(?P<fname>\w+)/(?P<lname>\w+)/$', views.ListRegisteredUserByName.as_view(),
|
url('^register/(?P<fname>\w+)/(?P<lname>\w+)/$', views.ListRegisteredUserByName.as_view(),
|
||||||
name='get-registered-user-by-name'),
|
name='get-registered-user-by-name'),
|
||||||
|
@ -15,10 +15,10 @@ def api_root(request):
|
|||||||
'Give some information about our API'
|
'Give some information about our API'
|
||||||
return Response({
|
return Response({
|
||||||
'parking_lots': request.build_absolute_uri(reverse('parking-lots')),
|
'parking_lots': request.build_absolute_uri(reverse('parking-lots')),
|
||||||
'parking_lot': request.build_absolute_uri(reverse('parking-lot')),
|
#'parking_lot': request.build_absolute_uri(reverse('parking-lot')),
|
||||||
'parking_rating': request.build_absolute_uri(reverse('parking-rating')),
|
'parking_rating': request.build_absolute_uri(reverse('parking-rating')),
|
||||||
'get_registered_user': request.build_absolute_uri(reverse('get-registered-user')),
|
#'get_registered_user': request.build_absolute_uri(reverse('get-registered-user')),
|
||||||
'get_registered_user_by_name': request.build_absolute_uri(reverse('get-registered-user-by-name')),
|
#'get_registered_user_by_name': request.build_absolute_uri(reverse('get-registered-user-by-name')),
|
||||||
'register_user': request.build_absolute_uri(reverse('register-user'))
|
'register_user': request.build_absolute_uri(reverse('register-user'))
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ class RateLot(APIView):
|
|||||||
"""
|
"""
|
||||||
Rate a parking lot
|
Rate a parking lot
|
||||||
**GET**: Get the rating choice options
|
**GET**: Get the rating choice options
|
||||||
**POST**: Rate a parking lot
|
**POST**: Rate a parking lot. Please POST a body similar to: {"rating": <rating\>, "parking_lot": <parking_lot\>}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
@ -78,7 +78,7 @@ class RegisterUser(APIView):
|
|||||||
"""
|
"""
|
||||||
Handle Registration of users
|
Handle Registration of users
|
||||||
**GET**: Get the current information of a registered user by ID
|
**GET**: Get the current information of a registered user by ID
|
||||||
**POST**: Register a new user
|
**POST**: Register a new user. Please POST the <first_name\> and <last_name\>
|
||||||
"""
|
"""
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
'Get the first and last names of all registered users'
|
'Get the first and last names of all registered users'
|
||||||
|
Loading…
Reference in New Issue
Block a user