AliAuthTokenApi.java 2.01 KB
Newer Older
1
package com.yidianling.user.http.response;
konghaorui committed
2

3 4
import com.ydl.ydlcommon.data.http.BaseResponse;
import com.yidianling.user.http.request.*;
konghaorui committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
import retrofit2.Call;
import retrofit2.http.*;

public interface AliAuthTokenApi {
    //    getVendorConfig
    @POST("phone/verification/init")
    Call<BaseResponse> getVendorConfig(@Header("ffrom") String ffrom, @Body InitPhoneRequest initPhoneRequest);

    @POST("user/login_direct")
//    Observable<BaseResponse> getLoginDirect(@Header("ffrom") String ffrom, @Body PhoneLoginDirectRequest phoneLoginDirectRequest);
    Call<BaseResponse> getLoginDirect(@Header("ffrom") String ffrom, @Body PhoneLoginDirectRequest phoneLoginDirectRequest);

    @POST("user/login_sms")
    Call<BaseResponse> loginBySMS(@Header("ffrom") String ffrom, @Body PhoneLoginSmsRequest PhoneLoginSmsRequest);

    //POST /user/login_pwd
    @POST("user/login_pwd")
    Call<BaseResponse> loginByPassword(@Header("ffrom") String ffrom, @Body PhoneLoginPwdRequest phoneLoginPwdRequest);

    //POST /user/reset_pwd
    @POST("user/reset_pwd")
    Call<BaseResponse> resetPwd(@Body ResetPwdRequest resetPwdRequest);

    @GET("user/phone_detection")
    Call<BaseResponse> getPhoneDetection(@Query("phone") String phone, @Query("countryCode") String countryCode);

    @GET("user/send_login_sms")
    Call<BaseResponse> sendLoginSms(@Query("phone") String phone, @Query("countryCode") String countryCode);

    @GET("user/send_reset_sms")
    Call<BaseResponse> sendResetSms(@Query("phone") String phone, @Query("countryCode") String countryCode);

    //验证重置密码的短信验证码
    @GET("user/precheck_reset_sms")
    Call<BaseResponse> precheckResetSms(@Query("phone") String phone, @Query("countryCode") String countryCode, @Query("code") String code);


    //验证重置密码的短信验证码
    @POST("user/bind_phone")
    Call<BaseResponse> bindPhone(@Header("ffrom") String ffrom, @Body BindPhoneRequest bindPhoneRequest);
}

//    fun bindQQ(@FieldMap params: Map<String, String>): Observable<BaseResponse<Any>>