package com.example.cosmosclient.resources; import com.example.cosmosclient.entities.AddRequestsResponse; import com.example.cosmosclient.entities.CreateGroupResponse; import com.example.cosmosclient.entities.Group; import com.example.cosmosclient.entities.Request; import com.example.cosmosclient.entities.Requests; import com.example.cosmosclient.entities.User; import java.util.ArrayList; import java.util.Date; import retrofit2.Call; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Path; import retrofit2.http.Query; public interface GroupsRest { @POST("groups") @FormUrlEncoded Call<CreateGroupResponse> createGroup(@Field("name") String name, @Field("uId") String uId, @Field("token") String token); @GET("groups/{gId}/requests") Call<Requests> getRequestsListByGid(@Path("gId") String gId, @Query("token") String token, @Query("detail") boolean detail, @Query("quantity") int quantity); @POST("groups/{gId}/requests") @FormUrlEncoded Call<AddRequestsResponse> addRequests(@Path("gId") String gId, @Field("uId") String uId, @Field("product") String product, @Field("deadline") String deadline, @Field("location") int location, @Field("token") String token); // @GET("{gId}/requests/{rId}") // Call<Request> getRequestsDetailByGidAndRid(@Path("gid") String gid, @Path("rid") String rid, @Query("token") String token); }