diff --git a/app/src/main/java/com/example/nemophila/resources/FriendsRest.java b/app/src/main/java/com/example/nemophila/resources/FriendsRest.java index 9bc2788..dd66b14 100644 --- a/app/src/main/java/com/example/nemophila/resources/FriendsRest.java +++ b/app/src/main/java/com/example/nemophila/resources/FriendsRest.java @@ -1,35 +1,71 @@ package com.example.nemophila.resources; +import com.example.nemophila.entities.PostJson; + +import java.util.Collection; + import retrofit2.Call; import retrofit2.http.DELETE; +import retrofit2.http.Field; +import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.PUT; +import retrofit2.http.Path; public interface FriendsRest { @GET("accounts/{uid}/friends") - Call getFriends( + Call> getFriends( + @Path("uid") String uid ); + @FormUrlEncoded @PUT("accounts/{uid}/friends/{fid}") - Call putFriend(); + Call putFriend( + @Path("uid") String uid, + @Path("fid") String fid, + @Field("token") String token + ); @DELETE("accounts/{uid}/friends/{fid}") - Call deleteFriend(); + Call deleteFriend( + @Path("uid") String uid, + @Path("fid") String fid, + @Field("token") String token + ); @GET("/accounts/{uid}/requesting") - Call getRequesting(); + Call> getRequesting( + @Path("uid") String uid + ); + @FormUrlEncoded @PUT("accounts/{uid}/reqesting/{requesting_id}") - Call putRequesting(); + Call putRequesting( + @Path("uid") String uid, + @Path("requesting_id") String requesting_id, + @Field("token") String token + ); + @FormUrlEncoded @DELETE("accounts/{uid}/reqesting/{requesting_id}") - Call deleteRequesting(); + Call deleteRequesting( + @Path("uid") String uid, + @Path("requesting_id") String requesting_id, + @Field("token") String token + ); @GET("accounts/{uid}/reqested") - Call getRequested(); + Call> getRequested( + @Path("uid") String uid + ); + @FormUrlEncoded @DELETE("accounts/{uid}/reqested/{reqested_id}") - Call deleteRequested(); + Call deleteRequested( + @Path("uid") String uid, + @Path("requested_id") String requested_id, + @Field("token") String token + ); }