2025-05-22 19:03:01 +08:00
package com.qxcm.moduleutil.http ;
2025-05-30 19:01:54 +08:00
import com.qxcm.moduleutil.bean.AlbumBean ;
import com.qxcm.moduleutil.bean.CircleListBean ;
import com.qxcm.moduleutil.bean.CommentBean ;
import com.qxcm.moduleutil.bean.ExpandColumnBean ;
import com.qxcm.moduleutil.bean.GiftLabelBean ;
import com.qxcm.moduleutil.bean.HeatedBean ;
import com.qxcm.moduleutil.bean.NewsDataBean ;
2025-05-29 08:59:34 +08:00
import com.qxcm.moduleutil.bean.RealNameBean ;
2025-05-30 19:01:54 +08:00
import com.qxcm.moduleutil.bean.RewardUserBean ;
import com.qxcm.moduleutil.bean.RoonGiftModel ;
2025-05-22 19:03:01 +08:00
import com.qxcm.moduleutil.bean.UserBean ;
import com.qxcm.moduleutil.widget.Constants ;
import java.util.List ;
import java.util.Map ;
import io.reactivex.Observable ;
import okhttp3.ResponseBody ;
import retrofit2.Call ;
import retrofit2.http.Field ;
import retrofit2.http.FieldMap ;
import retrofit2.http.FormUrlEncoded ;
import retrofit2.http.GET ;
import retrofit2.http.POST ;
2025-05-30 19:01:54 +08:00
import retrofit2.http.Query ;
2025-05-22 19:03:01 +08:00
public interface ApiServer {
@FormUrlEncoded //请求验证码
@POST ( Constants . SEND_CODE )
Observable < BaseModel < Object > > sendCode ( @Field ( " mobile " ) String mobile , @Field ( " event " ) String event ) ;
@FormUrlEncoded
@POST ( Constants . LOGIN )
Observable < BaseModel < List < UserBean > > > login ( @Field ( " user_login " ) String user_login , @Field ( " sms_code " ) String sms_code ) ;
@FormUrlEncoded
@POST ( Constants . USER_LOGIN )
Observable < BaseModel < List < UserBean > > > userLogin ( @Field ( " user_login " ) String user_login , @Field ( " password " ) String password ) ;
@POST ( Constants . UPLOAD_NICK_NAME )
Observable < BaseModel < String > > upUserNickname ( ) ;
@FormUrlEncoded
@POST ( Constants . UPLOAD_USER_PIC )
Observable < BaseModel < String > > upUserPic ( @Field ( " sex " ) String sex ) ;
@FormUrlEncoded
@POST ( Constants . SWITCH_ACCOUNTS )
Observable < BaseModel < List < UserBean > > > switchAccounts ( @Field ( " user_login " ) String user_id ) ;
@FormUrlEncoded
@POST ( Constants . USER_UPDATE )
Observable < BaseModel < UserBean > > userUpdate ( @FieldMap Map < String , String > map ) ;
@GET ( Constants . AUTHORIZATION )
Observable < BaseModel < String > > authorization ( ) ;
@FormUrlEncoded
@POST ( Constants . CHANGE_PASSWORD )
Call < BaseModel < String > > getPostData ( @Field ( " new_password " ) String new_password , @Field ( " mobile " ) String mobile , @Field ( " sms_code " ) String code , @Field ( " user_id " ) String userId ) ;
2025-05-29 08:59:34 +08:00
@FormUrlEncoded
@POST ( Constants . REAL_NAME_RESULT )
Call < BaseModel < String > > getRealNameResult ( @Field ( " orderNo " ) String order_no ) ;
2025-05-22 19:03:01 +08:00
@FormUrlEncoded
@POST ( Constants . URL_LOGIN )
Observable < BaseModel < List < UserBean > > > oauthLogin ( @Field ( " login_token " ) String login_token ) ;
@FormUrlEncoded
@POST ( Constants . URL_AUTH_CODE )
Observable < BaseModel < List < UserBean > > > authCode ( @Field ( " auth_code " ) String login_token ) ;
@FormUrlEncoded
@POST ( Constants . URL_WX_CODE )
Observable < BaseModel < List < UserBean > > > authCode1 ( @Field ( " code " ) String login_token ) ;
2025-05-29 08:59:34 +08:00
@FormUrlEncoded
@POST ( Constants . REAL_NAME )
Observable < BaseModel < RealNameBean > > realName ( @Field ( " real_name " ) String real_name , @Field ( " card_number " ) String card_number ) ;
2025-05-30 19:01:54 +08:00
@FormUrlEncoded
@POST ( Constants . GET_EXPAND_COLUMN )
Observable < BaseModel < List < ExpandColumnBean > > > getExpandColumn ( @Field ( " type " ) String type ) ;
@FormUrlEncoded
@POST ( Constants . GET_OFFICIAL_NOTICE )
Observable < BaseModel < List < NewsDataBean > > > getOfficialNotice ( @Field ( " page " ) String page , @Field ( " page_limit " ) String page_limit , @Field ( " type " ) String type ) ;
@FormUrlEncoded
@POST ( Constants . GET_ALBUM_LIST )
Observable < BaseModel < List < AlbumBean > > > getAlbumList ( @Field ( " page " ) String page , @Field ( " page_limit " ) String page_limit ) ;
@FormUrlEncoded
@POST ( Constants . CREATE_ALBUM )
Call < BaseModel < String > > createAlbum ( @Field ( " name " ) String name , @Field ( " image " ) String image ) ;
@FormUrlEncoded
@POST ( Constants . GET_REWARD_LIST )
Observable < BaseModel < List < RewardUserBean > > > getRewardList ( @Field ( " id " ) String id , @Field ( " page " ) int page , @Field ( " page_limit " ) int page_limit ) ;
@GET ( Constants . GET_GIFT_LABEL )
Observable < BaseModel < List < GiftLabelBean > > > getGiftLabel ( @Query ( " have_hot " ) String have_hot ) ;
@GET ( Constants . GIFT_LIST ) //获取礼物列表
Observable < BaseModel < List < RoonGiftModel > > > getGiftList ( @Query ( " label " ) int label ) ;
@GET ( Constants . TOPIC_LIST ) //获取话题
Observable < BaseModel < List < HeatedBean > > > topicList ( @Query ( " page " ) String page , @Query ( " page_limit " ) String page_limit ) ;
@FormUrlEncoded
@POST ( Constants . PUBLISH_ZONE )
Call < BaseModel < String > > publishZone ( @Field ( " images " ) String images , @Field ( " content " ) String content , @Field ( " topic_id " ) String topic_id , @Field ( " room_id " ) String room_id , @Field ( " ip " ) String ip ) ;
@GET ( Constants . GET_CATEGORIES )
Observable < BaseModel < List < HeatedBean > > > getCategories ( ) ;
@GET ( Constants . GET_CIRCLE_LIST )
Observable < BaseModel < List < CircleListBean > > > getCircleList ( @Query ( " page " ) String page , @Query ( " page_limit " ) String page_limit ) ;
@FormUrlEncoded
@POST ( Constants . LIKE_ZONE )
Call < BaseModel < String > > likeZone ( @Field ( " id " ) String zone_id ) ;
@FormUrlEncoded
@POST ( Constants . GET_COMMENT_LIST )
Observable < BaseModel < CommentBean > > getCommentList ( @Field ( " id " ) String id , @Field ( " page " ) String page , @Field ( " page_limit " ) String page_limit ) ;
@FormUrlEncoded
@POST ( Constants . COMMENT_ZONE )
Call < BaseModel < String > > commentZone ( @Field ( " id " ) String id , @Field ( " content " ) String content , @Field ( " pid " ) String pid , @Field ( " reply_to " ) String reply_to ) ;
2025-05-22 19:03:01 +08:00
// @FormUrlEncoded
// @POST(Constant.URL.ADDBANK)
// Observable<BaseModel<String>> addBank(@Field("token") String token, @Field("bank_num") String bankNum, @Field("cardholder") String cardholder, @Field("bank_type") int bankType,
// @Field("bank_name") String bankName, @Field("mobile") String mobile, @Field("bank_zhi") String bankZhi, @Field("card_number") String cardNumber,
// @Field("code") String code
// );
//
// @FormUrlEncoded
// @POST(Constant.URL.SEND_CODE)
// Observable<BaseModel<String>> sendCode(@Field("token") String token, @Field("mobile") String mobile, @Field("type") int type);
//
// @FormUrlEncoded
// @POST(URLConstants.CHECK_SMS_CODE)
// Observable<BaseModel<String>> checkSmsCode(@Field("mobile") String mobile, @Field("code") String code);
//
// @FormUrlEncoded
// @POST(Constant.URL.USER_BANK)
// Observable<BaseModel<UserBankModel>> getUserBank(@Field("token") String token);
//
// @FormUrlEncoded
// @POST(Constant.URL.RECHARGE)
// Observable<BaseModel<String>> userRecharge(@Field("token") String token, @Field("money") String money, @Field("type") int type);
// @FormUrlEncoded
// @POST(Constant.URL.THREE_PARTY_LOGIN)
// Observable<BaseModel<BeanPayData>> threePay(@Field("user_id") String userId, @Field("type") int type, @Field("id") String id);
//
// @FormUrlEncoded
// @POST(Constant.URL.ALIPAYMENT)
// Observable<BaseModel<String>> aliPay(@Field("token") String token, @Field("user_id") String userId, @Field("type") int type, @Field("id") String id);
//
// @FormUrlEncoded
// @POST(Constant.URL.WXPAYMENT)
// Observable<BaseModel<WxPayModel>> wxPay(@Field("token") String token, @Field("user_id") String userId, @Field("type") int type, @Field("id") String id);
//
//
// @FormUrlEncoded
// @POST(Constant.URL.EDITBANK)
// Observable<BaseModel<String>> editBank(@Field("token") String token, @Field("cardholder") String cardholder, @Field("bank_name") String bank_name,
// @Field("mobile") String mobile, @Field("card_number") String card_number, @Field("id") String id,
// @Field("bank_num") String bank_num, @Field("bank_zhi") String bank_zhi, @Field("code") String code);
//
// @FormUrlEncoded
// @POST(Constant.URL.USERWITHDRAW)
// Observable<BaseModel<String>> userWithdraw(@Field("token") String token, @Field("bank_id") String bank_id, @Field("number") String number, @Field("password") String password);
//
// @FormUrlEncoded
// @POST(Constant.URL.LOGIN)
// Observable<BaseModel<UserBean>> login(@Field("mobile") String mobile, @Field("password") String password, @Field("code") String code, @Field("type") int type);
//
// @FormUrlEncoded
// @POST(Constant.URL.LOGIN)
// Observable<BaseModel<UserBean>> oauthLogin(@Field("netease_token") String netease_token, @Field("access_token") String access_token, @Field("type") int type);
//
// @FormUrlEncoded
// @POST(Constant.URL.SETUSERSEX)
// Observable<BaseModel<String>> setUserSex(@Field("user_id") String user_id, @Field("sex") int sex);
//
// @FormUrlEncoded
// @POST(Constant.URL.THIRDPARTYLOGIN)
// Observable<BaseModel<UserBean>> thirdPartyLogin(@Field("openid") String openid, @Field("three_party") int three_party, @Field("nickname") String nickname,@Field("openid_old") String oldOpenId, @Field("head_pic") String head_pic);
//
//
// @FormUrlEncoded
// @POST(Constant.URL.EARNINGS)
// Observable<BaseModel<EarningsModel>> getEarnings(@Field("token") String token);
//
// @FormUrlEncoded
// @POST(Constant.URL.CONVERTEARNINGS)
// Observable<BaseModel<String>> convertEarnings(@Field("token") String token, @Field("number") String number, @Field("password") String password);
//
//
// @FormUrlEncoded
// @POST(Constant.URL.CASHLOG)
// Observable<BaseModel<List<EarningsModel.EarningInfo>>> getCashLog(@Field("token") String token, @Field("p") int p, @Field("change_type") int change_type);
//
// @FormUrlEncoded
// @POST(Constant.URL.BALANCE)
// Observable<BaseModel<UserMoneyBean>> getBalance(@Field("token") String token, @Field("type") int type);
//
// @FormUrlEncoded
// @POST(Constant.URL.FOLLOW)
// Observable<BaseModel<String>> follow(@Field("token") String token, @Field("user_id") String userId, @Field("type") int type);
//
// @FormUrlEncoded
// @POST(Constant.URL.FRIENDLIST)
// Observable<BaseModel<List<FriendModel>>> friendList(@Field("p") int p);
//
// @FormUrlEncoded
// @POST(Constant.URL.FOLLOWLIST)
// Observable<BaseModel<List<FriendModel>>> followList(@Field("p") int p);
//
// @FormUrlEncoded
// @POST(Constant.URL.FANSLIST)
// Observable<BaseModel<List<FriendModel>>> fansList(@Field("p") int p);
//
// @POST(Constant.URL.MYINFO)
// Observable<BaseModel<UserInfoModel>> userInfo();
//
// @FormUrlEncoded
// @POST(Constant.URL.USERINFO)
// Observable<BaseModel<UserInfoDataModel>> userInfoData(@Field("user_id") String userId, @Field("emchat_username") String emchatUsername, @Field("visit") int visit);
//
// @POST(Constant.URL.VIPINFO)
// Observable<BaseModel<VipInfo>> vipinfo();
//
// @POST(Constant.URL.SERVICEUSER)
// Observable<BaseModel<String>> serviceUser();
//
// @POST(Constant.URL.ARTICLE_CATEGORIES)
// Observable<BaseModel<List<HelpTitleModel>>> articleCategories();
//
// @FormUrlEncoded
// @POST(Constant.URL.ARTICLE_LIST)
// Observable<BaseModel<List<HelpModel>>> articleList(@Field("article_cat_id") String articleCatId);
//
// @POST(Constant.URL.USER_NOBILITYINFO)
// Observable<BaseModel<NobilityInfo>> userNobilityInfo();
//
// @POST(Constant.URL.NOBILITY)
// Observable<BaseModel<List<NobilityModel>>> nobility();
//
// @FormUrlEncoded
// @POST(Constant.URL.BUYNOBILITY)
// Observable<BaseModel<String>> buyNobility(@Field("nobility_id") String nobilityId);
//
// @FormUrlEncoded
// @POST(Constant.URL.RENEWNOBILITY)
// Observable<BaseModel<String>> renewNobility(@Field("day") String day);
//
// @FormUrlEncoded
// @POST(Constant.URL.UPDATE_USERINFO)
// Observable<BaseModel<String>> updateUserInfo(@Field("signature") String signature, @Field("birthday") String birthday, @Field("constellation") String constellation, @Field("profession") String profession,
// @Field("city_id") String city_id, @Field("user_photo") String user_photo, @Field("sex") String sex, @Field("head_picture") String head_picture,
// @Field("nickname") String nickname, @Field("province_id") String province_id, @Field("user_no") String userNo, @Field("county_id") String county_id);
//
// @FormUrlEncoded
// @POST(Constant.URL.INDEX_LABEL)
// Observable<BaseModel<List<LabelModel>>> indexLabel(@Field("category_id") String categoryId, @Field("p") int p);
//
// @FormUrlEncoded
// @POST(Constant.URL.ADDLABEL)
// Observable<BaseModel<String>> addLabel(@Field("ids") String ids);
//
// @POST(Constant.URL.CASHTYPE)
// Observable<BaseModel<List<CashTypeModel>>> cashType();
//
// @FormUrlEncoded
// @POST(Constant.URL.COMEUSER)
// Observable<BaseModel<List<LatelyVisitInfo>>> comeUser(@Field("token") String token, @Field("p") int p);
//
// @GET(Constant.URL.APPUPDATE)
// Observable<BaseModel<AppUpdateModel>> appUpdate();
//
// @GET(Constant.URL.CHECK_UPDATE)
// Observable<BaseModel<AppUpdateModel>> checkUpdate();
//
// @POST(Constant.URL.USER_FILES)
// Observable<BaseModel<UserBean>> userFiles();
//
// @FormUrlEncoded
// @POST(Constant.URL.BIND_MOBILE)
// Observable<BaseModel<String>> bindMobile(@Field("mobile") String mobile, @Field("code") String code);
//
// @FormUrlEncoded
// @POST(Constant.URL.RESET_PASSWORD)
// Observable<BaseModel<String>> resetPassword(@Field("mobile") String mobile, @Field("code") String code, @Field("password") String password);
//
// @FormUrlEncoded
// @POST(Constant.URL.MESSAGE_SETTING)
// Observable<BaseModel<String>> messageSetting(@Field("broadcast") int broadcast, @Field("fans") int fans, @Field("news_voice") int news_voice, @Field("news_vibrate") int news_vibrate, @Field("only_friend") int only_friend );
//
// @FormUrlEncoded
// @POST(Constant.URL.USER_BLACK_LIST)
// Observable<BaseModel<List<BlacListSectionBean>>> userBlackList(@Field("p") int page, @Field("keyword") String keyword);
//
// @FormUrlEncoded
// @POST(Constant.URL.ADD_BLACK_USER)
// Observable<BaseModel<String>> removeBlackUser(@Field("black_id") String blackId, @Field("type") int type);
//
// @FormUrlEncoded
// @POST(Constant.URL.QUIT_ROOM_WITH_USER_ID)
// Observable<BaseModel<String>> quitRoomWithUserId(@Field("room_id") String roomId, @Field("user_id") String userId);
//
// @POST(Constant.URL.SIGN_SWITCH)
// Observable<BaseModel<SignSwitchModel>> signSwitch();
//
// @FormUrlEncoded
// @POST(Constant.URL.SET_SECOND_PASSWORD)
// Observable<BaseModel<String>> setSecondPassword(@Field("mobile") String mobile, @Field("password") String password, @Field("code") String code);
//
// @FormUrlEncoded
// @POST(URLConstants.NAME_AUTH)
// Observable<BaseModel<String>> nameAuth(@Field("userId") String userId, @Field("fullName") String fullName, @Field("idNumber") String idNumber, @Field("idCard") String idCard, @Field("front") String front, @Field("back") String back);
//
// @POST(Constant.URL.USER_PHOTO)
// Observable<BaseModel<List<MyPhotoItem>>> userPhotos();
//
// @FormUrlEncoded
// @POST(Constant.URL.DELETE_USER_PHOTO)
// Observable<BaseModel<String>> deleteUserPhoto(@Field("id") String ids);
//
// @FormUrlEncoded
// @POST(Constant.URL.ADD_USER_PHOTO)
// Observable<BaseModel<String>> addUserPhoto(@Field("photo") String photo);
//
// @FormUrlEncoded
// @POST(Constant.URL.LOGOUT_REASON)
// Observable<BaseModel<String>> logoutReason(@Field("token") String token, @Field("mobile") String mobile,
// @Field("reason") String reason,@Field("code") String code);
//
// @FormUrlEncoded
// @POST(Constant.URL.LOGOUT_STATUS)
// Observable<BaseModel<LogoutReasonModel>> getlogoutStatus(@Field("token") String token, @Field("mobile") String mobile);
}