Class GroupApi


  • @Deprecated
    public class GroupApi
    extends MpApi
    Deprecated.
    分组相关API
    Since:
    JDK 1.6
    Author:
    jinyu(foxinmy@gmail.com)
    See Also:
    Group
    • Constructor Detail

      • GroupApi

        public GroupApi​(com.foxinmy.weixin4j.token.TokenManager tokenManager)
        Deprecated.
    • Method Detail

      • createGroup

        public Group createGroup​(String name)
                          throws com.foxinmy.weixin4j.exception.WeixinException
        Deprecated.
        创建分组
        Parameters:
        name - 组名称
        Returns:
        group对象
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        创建分组, Group, Group.toCreateJson()
      • getGroups

        public List<Group> getGroups()
                              throws com.foxinmy.weixin4j.exception.WeixinException
        Deprecated.
        查询所有分组
        Returns:
        组集合
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        查询所有分组, Group
      • getGroupByOpenId

        public int getGroupByOpenId​(String openId)
                             throws com.foxinmy.weixin4j.exception.WeixinException
        Deprecated.
        查询用户所在分组
        Parameters:
        openId - 用户对应的ID
        Returns:
        组ID
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        查询用户所在分组, Group
      • modifyGroup

        public com.foxinmy.weixin4j.http.weixin.ApiResult modifyGroup​(int groupId,
                                                                      String name)
                                                               throws com.foxinmy.weixin4j.exception.WeixinException
        Deprecated.
        修改分组名
        Parameters:
        groupId - 组ID
        name - 组名称
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        修改分组名, Group, Group.toModifyJson()
      • moveGroup

        public com.foxinmy.weixin4j.http.weixin.ApiResult moveGroup​(int groupId,
                                                                    String openId)
                                                             throws com.foxinmy.weixin4j.exception.WeixinException
        Deprecated.
        移动用户到分组
        Parameters:
        groupId - 组ID
        openId - 用户对应的ID
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        移动分组, Group
      • moveGroup

        public com.foxinmy.weixin4j.http.weixin.ApiResult moveGroup​(int groupId,
                                                                    String... openIds)
                                                             throws com.foxinmy.weixin4j.exception.WeixinException
        Deprecated.
        批量移动分组
        Parameters:
        groupId - 组ID
        openIds - 用户ID列表(不能超过50个)
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        批量移动分组, Group
      • deleteGroup

        public com.foxinmy.weixin4j.http.weixin.ApiResult deleteGroup​(int groupId)
                                                               throws com.foxinmy.weixin4j.exception.WeixinException
        Deprecated.
        删除用户分组,所有该分组内的用户自动进入默认分组.
        Parameters:
        groupId - 组ID
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        删除用户分组, Group