diff --git a/bin/AndroidManifest.xml b/bin/AndroidManifest.xml index cd35a53..e30cd4e 100644 --- a/bin/AndroidManifest.xml +++ b/bin/AndroidManifest.xml @@ -7,6 +7,7 @@ + unccharlotte Gameday.sqlite GamedayPreferences - uncc-gameday.no-ip.org + 10.0.1.12 diff --git a/src/com/uncc/gameday/registration/GamedayService.java b/src/com/uncc/gameday/registration/GamedayService.java index 77c24fc..1a1de24 100644 --- a/src/com/uncc/gameday/registration/GamedayService.java +++ b/src/com/uncc/gameday/registration/GamedayService.java @@ -2,6 +2,7 @@ package com.uncc.gameday.registration; import java.util.List; +import retrofit.Callback; import retrofit.http.*; public interface GamedayService { @@ -12,7 +13,7 @@ public interface GamedayService { @GET("/lots/{lot}/") ParkingLot listLot(@Path("lot") String lot); - @POST("/rating/") - void rateLot(@Body RatingChoices rating, @Body ParkingChoices parking_lot); + @POST("/rate/") + void rateLot(@Body ParkingRating p, Callback lot); } diff --git a/src/com/uncc/gameday/registration/ParkingRating.java b/src/com/uncc/gameday/registration/ParkingRating.java index f284088..dbc584a 100644 --- a/src/com/uncc/gameday/registration/ParkingRating.java +++ b/src/com/uncc/gameday/registration/ParkingRating.java @@ -1,6 +1,6 @@ package com.uncc.gameday.registration; -public class ParkingRating { +public class ParkingRating { private ParkingChoices parking_lot; private RatingChoices rating; diff --git a/src/com/uncc/gameday/registration/RatingChoices.java b/src/com/uncc/gameday/registration/RatingChoices.java index 3ebb82e..929fd1c 100644 --- a/src/com/uncc/gameday/registration/RatingChoices.java +++ b/src/com/uncc/gameday/registration/RatingChoices.java @@ -1,10 +1,10 @@ package com.uncc.gameday.registration; public enum RatingChoices { - EMPTY ("EMP"), - SCATTERED ("SCT"), - BUSY ("BSY"), - FULL ("FLL"); + EMP ("EMPTY"), + SCT ("SCATTERED"), + BSY ("BUSY"), + FLL ("FULL"); String choice; RatingChoices(String choice) { this.choice = choice; } diff --git a/src/com/uncc/gameday/registration/RegistrationClient.java b/src/com/uncc/gameday/registration/RegistrationClient.java index d964732..7ddb1d6 100644 --- a/src/com/uncc/gameday/registration/RegistrationClient.java +++ b/src/com/uncc/gameday/registration/RegistrationClient.java @@ -2,12 +2,11 @@ package com.uncc.gameday.registration; import java.util.List; -import com.uncc.gameday.R; - -import android.content.Context; -import android.util.Log; import retrofit.RestAdapter; -import retrofit.RetrofitError; +import retrofit.RestAdapter.LogLevel; +import android.content.Context; + +import com.uncc.gameday.R; public class RegistrationClient { @@ -33,11 +32,14 @@ public class RegistrationClient { } public void rateLot(RatingChoices rating, ParkingChoices parkingLot) { - gds.rateLot(rating, parkingLot); + ParkingRating pRating = new ParkingRating(); + pRating.setParkingLot(parkingLot); + pRating.setRating(rating); + gds.rateLot(pRating, null); } public void rateLot(ParkingRating rating) { - gds.rateLot(rating.getRating(), rating.getParkingLot()); + gds.rateLot(rating, null); } }