public class MuteApi extends Object
限定符和类型 | 方法和说明 |
---|---|
reactor.core.publisher.Mono<EMMute> |
detail(String username)
查询单个用户全局禁言剩余时间。
|
reactor.core.publisher.Mono<GetMuteListResponse> |
muteList()
查询所有用户全局禁言剩余时间。
|
reactor.core.publisher.Mono<Void> |
muteUser(MuteUserRequest request)
设置用户全局禁言。
|
public MuteApi(Context context)
public reactor.core.publisher.Mono<Void> muteUser(MuteUserRequest request)
API使用示例:
EMService service;
try {
MuteUserRequest request = MuteUserRequest.builder().username("test_user").chat(0).build();
service.mute().muteUser(request).block();
} catch (EMException e) {
e.getErrorCode();
e.getMessage();
}
request
- 用户全局禁言请求体public reactor.core.publisher.Mono<EMMute> detail(String username)
API使用示例:
EMService service;
try {
service.mute().detail("test_user").block();
} catch (EMException e) {
e.getErrorCode();
e.getMessage();
}
username
- 查询禁言信息的用户名public reactor.core.publisher.Mono<GetMuteListResponse> muteList()
API使用示例:
EMService service;
try {
service.mute().muteList().block();
} catch (EMException e) {
e.getErrorCode();
e.getMessage();
}
Copyright © 2024. All rights reserved.