package cn.bjtu.nourriture.api;

import cn.bjtu.nourriture.model.Message;
import cn.bjtu.nourriture.model.Register;
import cn.bjtu.nourriture.model.User;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Path;
import rx.Observable;

/**
 * Author : juliengenoud
 * 30/11/15
 **/
public interface NourritureService {

    @GET("users/username/{login}")
    Observable<User> getUser(@Path("login") String login);

    @POST("users/register")
    Observable<Message> registerUser(@Body Register user);

}

@@ -26,16 +26,81 @@
 e.api;%0A%0A
+import android.util.Log;%0A%0Aimport cn.bjtu.nourriture.model.Login;%0A
 import c
@@ -609,10 +609,91 @@
 user);%0A%0A
+    @POST(%22users/sign-in%22)%0A    Observable%3CMessage%3E loginUser(@Body Login user);%0A%0A
 %7D%0A

add login in interface