完成基本功能转移
This commit is contained in:
71
src/main/java/com/yutou/napcat/http/GroupApi.java
Normal file
71
src/main/java/com/yutou/napcat/http/GroupApi.java
Normal file
@@ -0,0 +1,71 @@
|
||||
package com.yutou.napcat.http;
|
||||
|
||||
import com.yutou.napcat.model.FriendBean;
|
||||
import com.yutou.napcat.model.GroupBean;
|
||||
import com.yutou.napcat.model.GroupUserBean;
|
||||
import com.yutou.okhttp.BaseBean;
|
||||
import com.yutou.okhttp.HttpBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GroupApi {
|
||||
/**
|
||||
* 禁言
|
||||
* @param group 群号
|
||||
* @param user 用户
|
||||
* @param duration 禁言时长,单位秒
|
||||
*
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/set_group_ban")
|
||||
Call<HttpBody<BaseBean>> groupBan(
|
||||
@Field("group_id") long group,
|
||||
@Field("user_id") long user,
|
||||
@Field("duration") long duration
|
||||
);
|
||||
|
||||
/**
|
||||
* 禁言群组全体成员
|
||||
* @param group 群号
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/set_group_whole_ban")
|
||||
Call<HttpBody<BaseBean>> groupBanAll(
|
||||
@Field("group_id") long group
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取群组列表
|
||||
*/
|
||||
@POST("/get_group_list")
|
||||
Call<HttpBody<List<GroupBean>>> getGroupList(
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取群组信息
|
||||
*/
|
||||
@POST("/get_group_info")
|
||||
Call<HttpBody<GroupBean>> getGroupInfo(
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取群组成员信息
|
||||
*/
|
||||
@POST("/get_group_member_info")
|
||||
Call<HttpBody<GroupUserBean>> getGroupUserInfo(
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取群组成员列表
|
||||
* @param group 群号
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/get_group_member_list")
|
||||
Call<HttpBody<GroupUserBean>> getGroupUserList(
|
||||
@Field("group_id") long group
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user