Newer
Older
CosmosClient / app / src / main / java / com / example / cosmosclient / resources / GroupsRest.java
package com.example.cosmosclient.resources;

import com.example.cosmosclient.entities.Group;
import com.example.cosmosclient.entities.Request;

import java.util.ArrayList;

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<Group> createGroup(@Field("name") String name,@Field("uId") String uId,@Field("token") String token);

//    @GET("/{gId}/requests")
//    Call<ArrayList<Request>> getRequestsListByGid(@Path("gid") String gid, @Query("token") String token);
//
//    @GET("{gId}/requests/{rId}")
//    Call<Request> getRequestsDetailByGidAndRid(@Path("gid") String gid, @Path("rid") String rid, @Query("token") String token);

}