record

package
v0.0.0-...-3ccc67d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

README

客服聊天记录接口

Documentation

Overview

客服聊天记录接口

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetRequest

type GetRequest 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 Record struct {
	Worker string `json:"worker"` // 客服账号
	OpenId string `json:"openid"` // 用户的标识, 对当前公众号唯一
	OperCode int `json:"opercode"` // 操作ID(会话状态)
	Timestamp int64 `json:"time"` // 操作时间, UNIX时间戳
	Text string `json:"text"` // 聊天记录
}

func Get

func Get(clt *core.Client, request *GetRequest) (list []Record, err error)

Get 获取客服聊天记录

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 *core.Client, request *GetRequest) (iter *RecordIterator, err error)

func (*RecordIterator) HasNext

func (iter *RecordIterator) HasNext() bool 

func (*RecordIterator) NextPage

func (iter *RecordIterator) NextPage() (records []Record, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more.
[フレーム]

AltStyle によって変換されたページ (->オリジナル) /