Newer
Older
CosmosClient / app / src / main / java / com / example / cosmosclient / resources / GroupsRest.java
t-sugisawa on 3 Oct 2019 1 KB uId表示
package com.example.cosmosclient.resources;

import com.example.cosmosclient.entities.CreateGroupResponse;
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 {
    @GET("groups")
    Call<Group> getGroups(@Field("uId") String uId, @Field("token") String token);

    @POST("groups")
    @FormUrlEncoded
    Call<CreateGroupResponse> 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);

}