Class MuteApi


  • public class MuteApi
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      MuteApi​(Context context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      reactor.core.publisher.Mono<EMMute> detail​(java.lang.String username)
      查询单个用户全局禁言剩余时间。
      reactor.core.publisher.Mono<GetMuteListResponse> muteList()
      查询所有用户全局禁言剩余时间。
      reactor.core.publisher.Mono<java.lang.Void> muteUser​(MuteUserRequest request)
      设置用户全局禁言。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MuteApi

        public MuteApi​(Context context)
    • Method Detail

      • muteUser

        public reactor.core.publisher.Mono<java.lang.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();
         }
         
        Parameters:
        request - 用户全局禁言请求体
        Returns:
        成功或错误
        See Also:
        设置用户全局禁言
      • detail

        public reactor.core.publisher.Mono<EMMute> detail​(java.lang.String username)
        查询单个用户全局禁言剩余时间。

        API使用示例:

         
         EMService service;
         try {
             service.mute().detail("test_user").block();
         } catch (EMException e) {
             e.getErrorCode();
             e.getMessage();
         }
         
        Parameters:
        username - 查询禁言信息的用户名
        Returns:
        成功或错误
        See Also:
        查询单个用户全局禁言剩余时间
      • muteList

        public reactor.core.publisher.Mono<GetMuteListResponse> muteList()
        查询所有用户全局禁言剩余时间。

        API使用示例:

         
         EMService service;
         try {
             service.mute().muteList().block();
         } catch (EMException e) {
             e.getErrorCode();
             e.getMessage();
         }
         
        Returns:
        成功或错误
        See Also:
        查询所有用户全局禁言剩余时间