1 Star 0 Fork 0

GoMods / wechat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
get_role_ist.go 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
wanglelecc 提交于 2022-01-11 18:47 . first commit
package livebroadcast
import (
"context"
"gitee.com/gomods/wechat/request"
)
const apiGetRoleList = "/wxaapi/broadcast/role/getrolelist"
type GetRoleListRequest struct {
// 非必填 查询的用户角色,取值 [-1-所有成员, 0-超级管理员,1-管理员,2-主播,3-运营者],默认-1
Role Role `query:"role"`
// 非必填 起始偏移量, 默认0
Offset int `query:"offset"`
// 非必填 查询个数,最大30,默认10
Limit int `query:"limit"`
// 非必填 搜索的微信号或昵称,不传则返回全部
Keyword string `query:"keyword"`
}
type GetRoleListResponse struct {
request.CommonError
// 角色列表
List []struct {
// 微信用户头像url
Headingimg string `json:"headingimg"`
// 微信用户昵称
Nickname string `json:"nickname"`
// 微信openid
Openid string `json:"openid"`
// 具有的身份,[0-超级管理员,1-管理员,2-主播,3-运营者]
RoleList []Role `json:"roleList"`
// 更新时间戳
UpdateTimestamp string `json:"updateTimestamp"`
// 脱敏微信号
Username string `json:"username"`
} `json:"list"`
}
// 查询小程序直播成员列表
func (cli *LiveBroadcast) GetRoleList(ctx context.Context, req *GetRoleListRequest) (*GetRoleListResponse, error) {
api, err := cli.conbineURI(ctx, apiGetRoleList, req, true)
if err != nil {
return nil, err
}
res := new(GetRoleListResponse)
err = cli.request.Get(ctx, api, res)
if err != nil {
return nil, err
}
return res, nil
}
1
https://gitee.com/gomods/wechat.git
git@gitee.com:gomods/wechat.git
gomods
wechat
wechat
v0.0.1

搜索帮助

53164aa7 5694891 3bd8fe86 5694891