package com.virjar.echo.adr.repo;

import com.virjar.echo.adr.bean.CommonRes;
import com.virjar.echo.adr.bean.UserInfo;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface UserApi {
    @GET("api/user-info/userMode")
    Call<CommonRes<UserInfo>> loginWithToken();


    @FormUrlEncoded
    @POST("api/user-info/login")
    Call<CommonRes<UserInfo>> loginWithUsername(@Field("userName") String userName,
                                                @Field("password") String password);


    @GET("api/user-info/queryClientMapping")
    Call<CommonRes<Integer>> getClientMappingPort(@Query("clientId") String clientId);


    @GET("api/user-info/myProxies")
    Call<CommonRes<List<Integer>>> myProxies();
}
