RetrofitAPI.java 470 B

123456789101112131415161718192021
  1. package com.example.zhulinaapi;
  2. import retrofit2.Call;
  3. import retrofit2.http.Body;
  4. import retrofit2.http.DELETE;
  5. import retrofit2.http.POST;
  6. import retrofit2.http.PUT;
  7. import retrofit2.http.Query;
  8. public interface RetrofitAPI {
  9. @POST("Workouts/")
  10. Call<Mask> createPost(@Body Mask mask);
  11. @PUT("Workouts/{id}")
  12. Call<Mask> updateData(@Query("id") int id, @Body Mask mask);
  13. @DELETE("Workouts/{id}")
  14. Call<Mask> deleteData(@Query("id") int id);
  15. }