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-06-09 09:14:32 +08:00
|
|
|
import com.qxcm.moduleutil.bean.PersonaltyBean;
|
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;
|
2025-06-07 09:00:24 +08:00
|
|
|
import com.qxcm.moduleutil.bean.UserInfo;
|
|
|
|
|
import com.qxcm.moduleutil.bean.UserTagBean;
|
2025-06-09 09:14:32 +08:00
|
|
|
import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
2025-05-22 19:03:01 +08:00
|
|
|
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);
|
|
|
|
|
|
2025-06-07 09:00:24 +08:00
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.FORGOT_PASSWORD)
|
|
|
|
|
Call<BaseModel<String>> forgotPassword(@Field("new_password") String new_password, @Field("mobile") String mobile, @Field("sms_code") String sms_code);
|
|
|
|
|
|
2025-05-22 19:03:01 +08:00
|
|
|
@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)
|
2025-06-07 09:00:24 +08:00
|
|
|
Observable<BaseModel<List<AlbumBean>>> getAlbumList(@Field("page") String page, @Field("page_limit") String page_limit, @Field("user_id") String user_id);
|
2025-05-30 19:01:54 +08:00
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.CREATE_ALBUM)
|
2025-06-07 09:00:24 +08:00
|
|
|
Call<BaseModel<String> > createAlbum(@Field("name") String name, @Field("pwd")String pwd, @Field("image") String image);
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.EDIT_ALBUM)
|
|
|
|
|
Call<BaseModel<String> > editAlbum(@Field("album_id") String album_id,@Field("name") String name, @Field("pwd")String pwd, @Field("image") String image);
|
2025-05-30 19:01:54 +08:00
|
|
|
|
|
|
|
|
@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);
|
2025-06-07 09:00:24 +08:00
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.GET_USER_HOME_ZONE)
|
|
|
|
|
Observable<BaseModel<List<CircleListBean>>> getCircleUserList(@Field("user_id") String user_id,@Field("page") String page, @Field("page_limit") String page_limit);
|
2025-05-30 19:01:54 +08:00
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.LIKE_ZONE)
|
|
|
|
|
Call<BaseModel<String>> likeZone(@Field("id") String zone_id);
|
|
|
|
|
|
2025-06-07 09:00:24 +08:00
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.TOPIC_ID)
|
|
|
|
|
Observable<BaseModel<List<CircleListBean>>> topicId(@Field("topic_id") String topic_id);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.ZONE_DETAIL)
|
|
|
|
|
Observable<BaseModel<CircleListBean>> zoneDetail(@Field("id") String topic_id);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.GET_USER_HOME)
|
|
|
|
|
Observable<BaseModel<UserInfo>> getUserHome(@Field("user_id") String user_id);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.DELETE_COMMENT)
|
|
|
|
|
Call<BaseModel<String>> deleteComment(@Field("id") String zone_id);
|
|
|
|
|
|
2025-05-30 19:01:54 +08:00
|
|
|
@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
|
|
|
|
2025-06-07 09:00:24 +08:00
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.CLEAR_LOGIN_INFO)
|
|
|
|
|
Call<BaseModel<String>> clearLoginInfo(@Field("token") String token);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.CANCEL)
|
|
|
|
|
Call<BaseModel<String>> cancel(@Field("token") String token);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.DELETE_ZONE)
|
|
|
|
|
Call<BaseModel<String>> deleteZone(@Field("id") String id);
|
|
|
|
|
|
|
|
|
|
@GET(Constants.GET_MY_INFO)
|
|
|
|
|
Observable<BaseModel<UserInfo>> getMyInfo();
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.ED_USER_INFO)
|
|
|
|
|
Call<BaseModel<String>> editUserInfo(@Field("nickname") String nickname, @Field("birthday") String birthday, @Field("sex") String sex, @Field("avatar") String avatar, @Field("images") String images, @Field("profile") String profile, @Field("tag_id") String tag_id);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.ED_USER_BG)
|
|
|
|
|
Call<BaseModel<String>> editUserBg(@Field("images") String images);
|
|
|
|
|
@GET(Constants.GET_USER_TAG_LIST)
|
|
|
|
|
Observable<BaseModel<List<UserTagBean>>> getUserTagList();
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.GET_LIKE_LIST)
|
|
|
|
|
Observable<BaseModel<List<CircleListBean.LikeList>>> getLikeList(@Field("id") String id);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.GET_ALBUM_DETAIL)
|
|
|
|
|
Observable<BaseModel<AlbumBean>> getAlbumDetail(@Field("album_id") String albumId, @Field("pwd") String pwd, @Field("page") String page, @Field("page_limit") String page_limit);
|
|
|
|
|
|
2025-06-09 09:14:32 +08:00
|
|
|
@GET(Constants.GET_PERSONALTY)
|
|
|
|
|
Observable<BaseModel<List<PersonaltyBean>>> getPersonaltyList();
|
|
|
|
|
|
2025-06-07 09:00:24 +08:00
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.POST_GZ)
|
|
|
|
|
Call<BaseModel<String>> userGuanz(@Field("user_id") String userId,@Field("type")String type);
|
|
|
|
|
|
2025-06-09 09:14:32 +08:00
|
|
|
@GET(Constants.GET_DECORATE)
|
|
|
|
|
Observable<BaseModel<List<ZhuangBanShangChengBean>>> getDecorateList(@Query("type") String type);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.SET_USER_DECORATE)
|
|
|
|
|
Call<BaseModel<String>> setUserDecorate(@Field("udid") String udid);
|
|
|
|
|
|
2025-06-07 09:00:24 +08:00
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.UP_ALBUM)
|
|
|
|
|
Call<BaseModel<String>> upAddAlbum(@Field("album_id") String album_id, @Field("images") String images, @Field("content") String content);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.MOVE_ALBUM)
|
|
|
|
|
Call<BaseModel<String>> moveAlbum(@Field("id") String id,@Field("new_album_id")String new_album_id);
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.DELETE_ALBUM_IMAGE)
|
|
|
|
|
Call<BaseModel<String>> deleteAlbumImage(@Field("id") String id);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.DELETE_ALBUM)
|
|
|
|
|
Call<BaseModel<String>> deleteAlbum(@Field("album_id") String id);
|
|
|
|
|
|
|
|
|
|
@FormUrlEncoded
|
|
|
|
|
@POST(Constants.LIKE_ALBUM)
|
|
|
|
|
Call<BaseModel<String>> likeAlbum(@Field("album_id") String id);
|
2025-05-22 19:03:01 +08:00
|
|
|
|
|
|
|
|
}
|