Some documentation updates

This commit is contained in:
Bradlee Speice 2013-11-12 20:13:13 -05:00
parent bac2244f44
commit c69bab3648
2 changed files with 6 additions and 6 deletions

View File

@ -6,9 +6,9 @@ from rest_framework.urlpatterns import format_suffix_patterns
urlpatterns = patterns('gameday.views',
url('^$', 'api_root'),
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/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<fname>\w+)/(?P<lname>\w+)/$', views.ListRegisteredUserByName.as_view(),
name='get-registered-user-by-name'),

View File

@ -15,10 +15,10 @@ def api_root(request):
'Give some information about our API'
return Response({
'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')),
'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': request.build_absolute_uri(reverse('get-registered-user')),
#'get_registered_user_by_name': request.build_absolute_uri(reverse('get-registered-user-by-name')),
'register_user': request.build_absolute_uri(reverse('register-user'))
})
@ -45,7 +45,7 @@ class RateLot(APIView):
"""
Rate a parking lot
**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
@ -78,7 +78,7 @@ class RegisterUser(APIView):
"""
Handle Registration of users
**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):
'Get the first and last names of all registered users'