Documentation ¶
Index ¶
Constants ¶
View Source
const (
RecordPageSizeLimit = 50
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRecordRequest ¶
type GetRecordRequest struct { StartTime int64 `json:"starttime"` // 查询开始时间, UNIX时间戳 EndTime int64 `json:"endtime"` // 查询结束时间, UNIX时间戳, 每次查询不能跨日查询 PageIndex int `json:"pageindex"` // 查询第几页, 从1开始 PageSize int `json:"pagesize"` // 每页大小, 每页最多拉取50条 OpenId string `json:"openid,omitempty"` // 普通用户的标识, 对当前公众号唯一 }
type Record ¶
type RecordIterator ¶
type RecordIterator struct {
// contains filtered or unexported fields
}
RecordIterator
iter, err := NewRecordIterator(clt, request) if err != nil { // TODO: 增加你的代码 } for iter.HasNext() { records, err := iter.NextPage() if err != nil { // TODO: 增加你的代码 } // TODO: 增加你的代码 }
func NewRecordIterator ¶
func NewRecordIterator(clt *mp.Client, request *GetRecordRequest) (iter *RecordIterator, err error)
获取聊天记录遍历器.
func (*RecordIterator) HasNext ¶
func (iter *RecordIterator) HasNext() bool
func (*RecordIterator) NextPage ¶
func (iter *RecordIterator) NextPage() (records []Record, err error)
Click to show internal directories.
Click to hide internal directories.