package de.beyondsoft.ownchat.data.api.services;

import com.google.gson.JsonObject;
import de.beyondsoft.ownchat.data.api.responses.ProfileResponse;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import rx.Observable;

/**
 * Created by laszloffiferenc on 2/21/17.
 */
public interface LoginService {

    @FormUrlEncoded
    @POST("api/user/loginwithchatcode")
    Observable<ProfileResponse> loginWithChatCode(
            @Field("username") String username,
            @Field("password") String password,
            @Field("chatcode") String chatcode
    );

    @GET("https://dict.ownchat.de/api/server/resolve/{type}/{customerid}")
    //@GET("https://bewoplaner.de/{type}/{customerid}")
    Observable<JsonObject> getServiceType(@Path("type") String type, @Path("customerid") String customerId);

    @GET("api/ownchat/uploadmaxsize")
    Observable<JsonObject> getUploadMaxSize();

    @GET("api/ownchat/chatcode/verify/{customerid}/{userid}/{chatcode}")
    Observable<JsonObject> verifyChatCode(@Path("customerid") String customerid, @Path("userid") String userid, @Path("chatcode") String chatcode);
}
