com.github.sd4324530.fastweixin.api
类 UserAPI

java.lang.Object
  继承者 com.github.sd4324530.fastweixin.api.BaseAPI
      继承者 com.github.sd4324530.fastweixin.api.UserAPI

public class UserAPI
extends BaseAPI

用户管理相关API

从以下版本开始:
1.2
作者:
peiyu

字段摘要
 
从类 com.github.sd4324530.fastweixin.api.BaseAPI 继承的字段
BASE_API_URL, config
 
构造方法摘要
UserAPI(ApiConfig config)
           
 
方法摘要
 ResultType batchDeleteTagsToUser(List<String> openidList, Integer tagId)
          批量为用户取消标签
 ResultType batchTagsToUser(List<String> openidList, Integer tagId)
          批量为用户打上标签 标签功能目前支持公众号为用户打上最多三个标签。
 CreateGroupResponse createGroup(String name)
          创建分组
 ResultType deleteGroup(Integer groupId)
          删除分组
 String getGroupIdByOpenid(String openid)
          通过关注者ID获取所在分组信息
 GetGroupsResponse getGroups()
          获取所有分组信息
 GetUserInfoResponse getUserInfo(String openid)
          获取关注者信息
 GetUserInfoListResponse getUserInfoList(List<UserInfo> userInfoList)
          批量获取关注者信息
 GetUsersResponse getUsers(String nextOpenid)
          获取关注者列表
 ResultType moveGroupUser(String[] openids, String toGroupid)
          移动关注者所在分组
 ResultType moveGroupUser(String openid, String toGroupid)
          移动关注者所在分组
 ResultType setUserRemark(String openid, String remark)
          设置关注者备注
 ResultType updateGroup(Integer groupid, String name)
          修改分组信息
 
从类 com.github.sd4324530.fastweixin.api.BaseAPI 继承的方法
executeGet, executePost, executePost, isSuccess
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

UserAPI

public UserAPI(ApiConfig config)
方法详细信息

getUsers

public GetUsersResponse getUsers(String nextOpenid)
获取关注者列表

参数:
nextOpenid - 下一个用户的ID
返回:
关注者列表对象

setUserRemark

public ResultType setUserRemark(String openid,
                                String remark)
设置关注者备注

参数:
openid - 关注者ID
remark - 备注内容
返回:
调用结果

createGroup

public CreateGroupResponse createGroup(String name)
创建分组

参数:
name - 分组名称
返回:
返回对象,包含分组的ID和名称信息

getGroups

public GetGroupsResponse getGroups()
获取所有分组信息

返回:
所有分组信息列表对象

getGroupIdByOpenid

public String getGroupIdByOpenid(String openid)
通过关注者ID获取所在分组信息

参数:
openid - 关注者ID
返回:
所在分组信息

updateGroup

public ResultType updateGroup(Integer groupid,
                              String name)
修改分组信息

参数:
groupid - 分组ID
name - 新名称
返回:
调用结果

moveGroupUser

public ResultType moveGroupUser(String openid,
                                String toGroupid)
移动关注者所在分组

参数:
openid - 关注者ID
toGroupid - 新分组ID
返回:
调用结果

moveGroupUser

public ResultType moveGroupUser(String[] openids,
                                String toGroupid)
移动关注者所在分组

参数:
openids - 关注者ID
toGroupid - 新分组ID
返回:
调用结果

getUserInfo

public GetUserInfoResponse getUserInfo(String openid)
获取关注者信息

参数:
openid - 关注者ID
返回:
关注者信息对象

getUserInfoList

public GetUserInfoListResponse getUserInfoList(List<UserInfo> userInfoList)
批量获取关注者信息

参数:
userInfoList - 关注者ID列表
返回:
关注者信息对象列表

deleteGroup

public ResultType deleteGroup(Integer groupId)
删除分组

参数:
groupId - 分组ID
返回:
删除结果

batchTagsToUser

public ResultType batchTagsToUser(List<String> openidList,
                                  Integer tagId)
批量为用户打上标签 标签功能目前支持公众号为用户打上最多三个标签。

参数:
openidList - 用户openid列表
tagId - 标签ID
返回:
结果

batchDeleteTagsToUser

public ResultType batchDeleteTagsToUser(List<String> openidList,
                                        Integer tagId)
批量为用户取消标签

参数:
openidList - 用户openid列表
tagId - 标签ID
返回:
结果


Copyright © 2017. All rights reserved.