|
1 |
| -package website.bloop.app.api; |
2 |
| - |
3 |
| -import io.reactivex.Observable; |
4 |
| -import okhttp3.ResponseBody; |
5 |
| -import retrofit2.http.Body; |
6 |
| -import retrofit2.http.DELETE; |
7 |
| -import retrofit2.http.GET; |
8 |
| -import retrofit2.http.POST; |
9 |
| -import retrofit2.http.Query; |
10 |
| - |
11 |
| -/** |
12 |
| - * Interface for sending requests to the backend. |
13 |
| - */ |
14 |
| - |
15 |
| -public interface BloopAPIService { |
16 |
| - @POST(APIPath.PLACE_FLAG) |
17 |
| - Observable<ResponseBody> placeFlag(@Body PlacedFlag flag); |
18 |
| - |
19 |
| - @POST(APIPath.CHECK_NEARBY) |
20 |
| - Observable<NearbyFlag> getNearestFlag(@Body PlayerLocation location); |
21 |
| - |
22 |
| - @POST(APIPath.CAPTURE_FLAG) |
23 |
| - Observable<ResponseBody> captureFlag(@Body CapturedFlag flag); |
24 |
| - |
25 |
| - @POST(APIPath.ADD_PLAYER) |
26 |
| - Observable<ResponseBody> addPlayer(@Body Player player); |
27 |
| - |
28 |
| - @POST(APIPath.UPDATE_FIREBASE_TOKEN) |
29 |
| - Observable<ResponseBody> updateFirebaseToken(@Body Player player); |
30 |
| - |
31 |
| - @GET(APIPath.HAS_PLACED_FLAG) |
32 |
| - Observable<OwnFlag> checkHasPlacedFlag(@Query("id") String googlePlayId); |
33 |
| - |
34 |
| - @DELETE(APIPath.DELETE_FLAG) |
35 |
| - Observable<OwnFlag> deleteFlag(@Query("id") String googlePlayId); |
36 |
| -} |
| 1 | +package website.bloop.app.api; |
| 2 | + |
| 3 | +import io.reactivex.Observable; |
| 4 | +import okhttp3.ResponseBody; |
| 5 | +import retrofit2.http.Body; |
| 6 | +import retrofit2.http.DELETE; |
| 7 | +import retrofit2.http.GET; |
| 8 | +import retrofit2.http.POST; |
| 9 | +import retrofit2.http.Query; |
| 10 | + |
| 11 | +/** |
| 12 | + * Interface for sending requests to the backend. |
| 13 | + */ |
| 14 | + |
| 15 | +public interface BloopAPIService { |
| 16 | + @POST(APIPath.PLACE_FLAG) |
| 17 | + Observable<ResponseBody> placeFlag(@Body PlacedFlag flag); |
| 18 | + |
| 19 | + @POST(APIPath.CHECK_NEARBY) |
| 20 | + Observable<NearbyFlag> getNearestFlag(@Body PlayerLocation location); |
| 21 | + |
| 22 | + @POST(APIPath.CAPTURE_FLAG) |
| 23 | + Observable<ResponseBody> captureFlag(@Body CapturedFlag flag); |
| 24 | + |
| 25 | + @POST(APIPath.ADD_PLAYER) |
| 26 | + Observable<ResponseBody> addPlayer(@Body Player player); |
| 27 | + |
| 28 | + @POST(APIPath.UPDATE_FIREBASE_TOKEN) |
| 29 | + Observable<ResponseBody> updateFirebaseToken(@Body Player player); |
| 30 | + |
| 31 | + @GET(APIPath.HAS_PLACED_FLAG) |
| 32 | + Observable<OwnFlag> checkHasPlacedFlag(@Query("id") String googlePlayId); |
| 33 | + |
| 34 | + @DELETE(APIPath.DELETE_FLAG) |
| 35 | + Observable<OwnFlag> deleteFlag(@Query("id") String googlePlayId); |
| 36 | +} |
0 commit comments