From 0ed240166362abd188c4cc43e78b6fb672e426b7 Mon Sep 17 00:00:00 2001 From: bspeice Date: Fri, 18 Oct 2013 17:58:06 -0400 Subject: [PATCH] Add ability to list an individual lot for parking. --- src/com/uncc/gameday/registration/GamedayService.java | 3 +++ src/com/uncc/gameday/registration/RegistrationClient.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/com/uncc/gameday/registration/GamedayService.java b/src/com/uncc/gameday/registration/GamedayService.java index f6c6185..555b187 100644 --- a/src/com/uncc/gameday/registration/GamedayService.java +++ b/src/com/uncc/gameday/registration/GamedayService.java @@ -9,6 +9,9 @@ public interface GamedayService { @GET("/lots/") List listLots(); + @GET("/lots/{lot}/") + ParkingLot listLot(@Path("lot") String lot); + @POST("/rating/") void rateLot(@Body ParkingRating rating, @Body ParkingChoices parking_lot); diff --git a/src/com/uncc/gameday/registration/RegistrationClient.java b/src/com/uncc/gameday/registration/RegistrationClient.java index 7eed259..394ae74 100644 --- a/src/com/uncc/gameday/registration/RegistrationClient.java +++ b/src/com/uncc/gameday/registration/RegistrationClient.java @@ -24,6 +24,10 @@ public class RegistrationClient { return gds.listLots(); } + public ParkingLot listLot(ParkingLot lot) { + return gds.listLot(lot.location.getValue()); + } + public void rateLot(ParkingRating rating, ParkingChoices parkingLot) { gds.rateLot(rating, parkingLot); }