Created
September 15, 2019 20:36
-
-
Save dubeboy/9c76d4b8ea68245496509a500673ba29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package za.co.dubedivine.groceryapp.data.remote | |
import retrofit2.Call | |
import retrofit2.http.* | |
import za.co.dubedivine.groceryapp.model.GroceryItem | |
import za.co.dubedivine.groceryapp.model.responseModel.StatusResponseEntity | |
interface GroceryService { | |
@GET("groceries") | |
fun getGroceriesList(): Call<List<GroceryItem>> | |
@PUT("groceries") | |
fun addGroceryItem(@Body groceryItem: GroceryItem): Call<StatusResponseEntity<GroceryItem>> | |
@DELETE("groceries/{id}") | |
fun deleteGroceryItem(@Path("id") id: Long): Call<StatusResponseEntity<Boolean>> | |
@POST("groceries/available") | |
fun toggleGroceryItemAvailability(@Body availability: Boolean, @Query("id") id: Long): Call<StatusResponseEntity<Boolean>> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment