larkbaike

package
v3.0.21 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

View Source
const (
	UserIdTypeUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeOpenId  = "open_id"  // 以open_id来识别用户
)
View Source
const (
	UserIdTypeUpdateDraftUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeUpdateDraftUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeUpdateDraftOpenId  = "open_id"  // 以open_id来识别用户
)
View Source
const (
	UserIdTypeCreateEntityUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeCreateEntityUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeCreateEntityOpenId  = "open_id"  // 以open_id来识别用户
)
View Source
const (
	UserIdTypeGetEntityUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeGetEntityUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeGetEntityOpenId  = "open_id"  // 以open_id来识别用户
)
View Source
const (
	UserIdTypeListEntityUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeListEntityUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeListEntityOpenId  = "open_id"  // 以open_id来识别用户
)
View Source
const (
	UserIdTypeSearchEntityUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeSearchEntityUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeSearchEntityOpenId  = "open_id"  // 以open_id来识别用户
)
View Source
const (
	UserIdTypeUpdateEntityUserId  = "user_id"  // 以user_id来识别用户
	UserIdTypeUpdateEntityUnionId = "union_id" // 以union_id来识别用户
	UserIdTypeUpdateEntityOpenId  = "open_id"  // 以open_id来识别用户
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Abbreviation

type Abbreviation struct {
	Id *string `json:"id,omitempty"` // 相关词条 ID
}

type AbbreviationBuilder

type AbbreviationBuilder struct {
	// contains filtered or unexported fields
}

func NewAbbreviationBuilder

func NewAbbreviationBuilder() *AbbreviationBuilder

func (*AbbreviationBuilder) Build

func (builder *AbbreviationBuilder) Build() *Abbreviation

func (*AbbreviationBuilder) Id

相关词条 ID

示例值:enterprise_51587960

type BaikeImage added in v3.0.3

type BaikeImage struct {
	Token *string `json:"token,omitempty"` // 通过文件接口上传图片后,获得的图片 token
}

type BaikeImageBuilder added in v3.0.3

type BaikeImageBuilder struct {
	// contains filtered or unexported fields
}

func NewBaikeImageBuilder added in v3.0.3

func NewBaikeImageBuilder() *BaikeImageBuilder

func (*BaikeImageBuilder) Build added in v3.0.3

func (builder *BaikeImageBuilder) Build() *BaikeImage

func (*BaikeImageBuilder) Token added in v3.0.3

func (builder *BaikeImageBuilder) Token(token string) *BaikeImageBuilder

通过文件接口上传图片后,获得的图片 token

示例值:boxbcEcmKiD3SGHvgqWTpvdc7jc

type BaikeService

type BaikeService struct {
	Classification *classification // 分类
	Draft          *draft          // 草稿
	Entity         *entity         // 词条
	File           *file           // 文件
	// contains filtered or unexported fields
}

func NewService

func NewService(config *larkcore.Config) *BaikeService

type Classification

type Classification struct {
	Id       *string `json:"id,omitempty"`        // 二级分类 ID
	Name     *string `json:"name,omitempty"`      // 二级分类名称
	FatherId *string `json:"father_id,omitempty"` // 对应一级分类 ID
}

type ClassificationBuilder

type ClassificationBuilder struct {
	// contains filtered or unexported fields
}

func NewClassificationBuilder

func NewClassificationBuilder() *ClassificationBuilder

func (*ClassificationBuilder) Build

func (builder *ClassificationBuilder) Build() *Classification

func (*ClassificationBuilder) FatherId

func (builder *ClassificationBuilder) FatherId(fatherId string) *ClassificationBuilder

对应一级分类 ID

示例值:7049606926702837777

func (*ClassificationBuilder) Id

二级分类 ID

示例值:7049606926702837761

func (*ClassificationBuilder) Name

func (builder *ClassificationBuilder) Name(name string) *ClassificationBuilder

二级分类名称

示例值:行业术语

type ClassificationFilter added in v3.0.20

type ClassificationFilter struct {
	Include []string `json:"include,omitempty"` // 需要获取的分类
	Exclude []string `json:"exclude,omitempty"` // 需要排除的分类
}

type ClassificationFilterBuilder added in v3.0.20

type ClassificationFilterBuilder struct {
	// contains filtered or unexported fields
}

func NewClassificationFilterBuilder added in v3.0.20

func NewClassificationFilterBuilder() *ClassificationFilterBuilder

func (*ClassificationFilterBuilder) Build added in v3.0.20

func (*ClassificationFilterBuilder) Exclude added in v3.0.20

func (builder *ClassificationFilterBuilder) Exclude(exclude []string) *ClassificationFilterBuilder

需要排除的分类

示例值:

func (*ClassificationFilterBuilder) Include added in v3.0.20

func (builder *ClassificationFilterBuilder) Include(include []string) *ClassificationFilterBuilder

需要获取的分类

示例值:

type CorrectError added in v3.0.5

type CorrectError struct {
	Type         *int           `json:"type,omitempty"`          //
	Total        *int           `json:"total,omitempty"`         // 该类型错误在请求时间周期内的累计数量
	CorrectPairs []*CorrectPair `json:"correct_pairs,omitempty"` // 该类型错误在周期内具体的纠错对
}

type CorrectErrorBuilder added in v3.0.5

type CorrectErrorBuilder struct {
	// contains filtered or unexported fields
}

func NewCorrectErrorBuilder added in v3.0.5

func NewCorrectErrorBuilder() *CorrectErrorBuilder

func (*CorrectErrorBuilder) Build added in v3.0.5

func (builder *CorrectErrorBuilder) Build() *CorrectError

func (*CorrectErrorBuilder) CorrectPairs added in v3.0.5

func (builder *CorrectErrorBuilder) CorrectPairs(correctPairs []*CorrectPair) *CorrectErrorBuilder

该类型错误在周期内具体的纠错对

示例值:

func (*CorrectErrorBuilder) Total added in v3.0.5

func (builder *CorrectErrorBuilder) Total(total int) *CorrectErrorBuilder

该类型错误在请求时间周期内的累计数量

示例值:

func (*CorrectErrorBuilder) Type added in v3.0.5

func (builder *CorrectErrorBuilder) Type(type_ int) *CorrectErrorBuilder

示例值:

type CorrectInfo added in v3.0.5

type CorrectInfo struct {
	CorrectTotal   *int          `json:"correct_total,omitempty"`    // 用户英文纠错数总数
	EachdayCorrect []int         `json:"eachday_correct,omitempty"`  // 时间区间内每一天纠错数
	GrammarError   *CorrectError `json:"grammar_error,omitempty"`    // 语法错误相关统计信息
	SpellError     *CorrectError `json:"spell_error,omitempty"`      // 拼写错误相关统计信息
	NounError      *CorrectError `json:"noun_error,omitempty"`       // 单复数错误相关统计信息
	VerbTenseError *CorrectError `json:"verb_tense_error,omitempty"` // 时态错误相关统计信息
}

type CorrectInfoBuilder added in v3.0.5

type CorrectInfoBuilder struct {
	// contains filtered or unexported fields
}

func NewCorrectInfoBuilder added in v3.0.5

func NewCorrectInfoBuilder() *CorrectInfoBuilder

func (*CorrectInfoBuilder) Build added in v3.0.5

func (builder *CorrectInfoBuilder) Build() *CorrectInfo

func (*CorrectInfoBuilder) CorrectTotal added in v3.0.5

func (builder *CorrectInfoBuilder) CorrectTotal(correctTotal int) *CorrectInfoBuilder

用户英文纠错数总数

示例值:

func (*CorrectInfoBuilder) EachdayCorrect added in v3.0.5

func (builder *CorrectInfoBuilder) EachdayCorrect(eachdayCorrect []int) *CorrectInfoBuilder

时间区间内每一天纠错数

示例值:

func (*CorrectInfoBuilder) GrammarError added in v3.0.5

func (builder *CorrectInfoBuilder) GrammarError(grammarError *CorrectError) *CorrectInfoBuilder

语法错误相关统计信息

示例值:

func (*CorrectInfoBuilder) NounError added in v3.0.5

func (builder *CorrectInfoBuilder) NounError(nounError *CorrectError) *CorrectInfoBuilder

单复数错误相关统计信息

示例值:

func (*CorrectInfoBuilder) SpellError added in v3.0.5

func (builder *CorrectInfoBuilder) SpellError(spellError *CorrectError) *CorrectInfoBuilder

拼写错误相关统计信息

示例值:

func (*CorrectInfoBuilder) VerbTenseError added in v3.0.5

func (builder *CorrectInfoBuilder) VerbTenseError(verbTenseError *CorrectError) *CorrectInfoBuilder

时态错误相关统计信息

示例值:

type CorrectPair added in v3.0.5

type CorrectPair struct {
	SourceText *string `json:"source_text,omitempty"` // 被纠错的原词
	TargetText *string `json:"target_text,omitempty"` // 纠错建议替换的新词
	Total      *int    `json:"total,omitempty"`       // 纠错对在周期内出现的次数
}

type CorrectPairBuilder added in v3.0.5

type CorrectPairBuilder struct {
	// contains filtered or unexported fields
}

func NewCorrectPairBuilder added in v3.0.5

func NewCorrectPairBuilder() *CorrectPairBuilder

func (*CorrectPairBuilder) Build added in v3.0.5

func (builder *CorrectPairBuilder) Build() *CorrectPair

func (*CorrectPairBuilder) SourceText added in v3.0.5

func (builder *CorrectPairBuilder) SourceText(sourceText string) *CorrectPairBuilder

被纠错的原词

示例值:

func (*CorrectPairBuilder) TargetText added in v3.0.5

func (builder *CorrectPairBuilder) TargetText(targetText string) *CorrectPairBuilder

纠错建议替换的新词

示例值:

func (*CorrectPairBuilder) Total added in v3.0.5

func (builder *CorrectPairBuilder) Total(total int) *CorrectPairBuilder

纠错对在周期内出现的次数

示例值:

type CreateDraftReq

type CreateDraftReq struct {
	Entity *Entity `body:""`
	// contains filtered or unexported fields
}

type CreateDraftReqBuilder

type CreateDraftReqBuilder struct {
	// contains filtered or unexported fields
}

func NewCreateDraftReqBuilder

func NewCreateDraftReqBuilder() *CreateDraftReqBuilder

func (*CreateDraftReqBuilder) Build

func (builder *CreateDraftReqBuilder) Build() *CreateDraftReq

func (*CreateDraftReqBuilder) Entity

func (builder *CreateDraftReqBuilder) Entity(entity *Entity) *CreateDraftReqBuilder

草稿并非百科词条,而是指通过 API 发起创建新词条或更新现有词条的申请。百科管理员审核通过后,草稿将变为新的词条或覆盖已有词条。

func (*CreateDraftReqBuilder) UserIdType

func (builder *CreateDraftReqBuilder) UserIdType(userIdType string) *CreateDraftReqBuilder

此次调用中使用的用户ID的类型

示例值:

type CreateDraftResp

type CreateDraftResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateDraftRespData `json:"data"` // 业务数据
}

func (*CreateDraftResp) Success

func (resp *CreateDraftResp) Success() bool

type CreateDraftRespData

type CreateDraftRespData struct {
	Draft *Draft `json:"draft,omitempty"` // 草稿信息
}

type CreateEntityReq

type CreateEntityReq struct {
	Entity *Entity `body:""`
	// contains filtered or unexported fields
}

type CreateEntityReqBuilder

type CreateEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewCreateEntityReqBuilder

func NewCreateEntityReqBuilder() *CreateEntityReqBuilder

func (*CreateEntityReqBuilder) Build

func (builder *CreateEntityReqBuilder) Build() *CreateEntityReq

func (*CreateEntityReqBuilder) Entity

func (builder *CreateEntityReqBuilder) Entity(entity *Entity) *CreateEntityReqBuilder

通过此接口创建的词条,不需要百科管理员审核可直接写入词库,请慎重使用【租户管理员请慎重审批】。

func (*CreateEntityReqBuilder) UserIdType

func (builder *CreateEntityReqBuilder) UserIdType(userIdType string) *CreateEntityReqBuilder

此次调用中使用的用户ID的类型

示例值:

type CreateEntityResp

type CreateEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateEntityRespData `json:"data"` // 业务数据
}

func (*CreateEntityResp) Success

func (resp *CreateEntityResp) Success() bool

type CreateEntityRespData

type CreateEntityRespData struct {
	Entity *Entity `json:"entity,omitempty"` // 词条信息
}

type DisplayStatus

type DisplayStatus struct {
	AllowHighlight *bool `json:"allow_highlight,omitempty"` // 对应名称是否在消息/云文档高亮
	AllowSearch    *bool `json:"allow_search,omitempty"`    // 对应名称是否在搜索结果中展示
}

type DisplayStatusBuilder

type DisplayStatusBuilder struct {
	// contains filtered or unexported fields
}

func NewDisplayStatusBuilder

func NewDisplayStatusBuilder() *DisplayStatusBuilder

func (*DisplayStatusBuilder) AllowHighlight

func (builder *DisplayStatusBuilder) AllowHighlight(allowHighlight bool) *DisplayStatusBuilder

对应名称是否在消息/云文档高亮

示例值:true

func (*DisplayStatusBuilder) AllowSearch

func (builder *DisplayStatusBuilder) AllowSearch(allowSearch bool) *DisplayStatusBuilder

对应名称是否在搜索结果中展示

示例值:true

func (*DisplayStatusBuilder) Build

func (builder *DisplayStatusBuilder) Build() *DisplayStatus

type DownloadFileReq added in v3.0.3

type DownloadFileReq struct {
	// contains filtered or unexported fields
}

type DownloadFileReqBuilder added in v3.0.3

type DownloadFileReqBuilder struct {
	// contains filtered or unexported fields
}

func NewDownloadFileReqBuilder added in v3.0.3

func NewDownloadFileReqBuilder() *DownloadFileReqBuilder

func (*DownloadFileReqBuilder) Build added in v3.0.3

func (builder *DownloadFileReqBuilder) Build() *DownloadFileReq

func (*DownloadFileReqBuilder) FileToken added in v3.0.3

func (builder *DownloadFileReqBuilder) FileToken(fileToken string) *DownloadFileReqBuilder

需要下载的文件 token

示例值:boxbcEcmKiD3SGHvgqWTpvdc7jc

type DownloadFileResp added in v3.0.3

type DownloadFileResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	File     io.Reader `json:"-"`
	FileName string    `json:"-"`
}

func (*DownloadFileResp) Success added in v3.0.3

func (resp *DownloadFileResp) Success() bool

func (*DownloadFileResp) WriteFile added in v3.0.3

func (resp *DownloadFileResp) WriteFile(fileName string) error

type Draft

type Draft struct {
	DraftId *string `json:"draft_id,omitempty"` // 草稿 ID
	Entity  *Entity `json:"entity,omitempty"`   // 词条信息
}

type DraftBuilder

type DraftBuilder struct {
	// contains filtered or unexported fields
}

func NewDraftBuilder

func NewDraftBuilder() *DraftBuilder

func (*DraftBuilder) Build

func (builder *DraftBuilder) Build() *Draft

func (*DraftBuilder) DraftId

func (builder *DraftBuilder) DraftId(draftId string) *DraftBuilder

草稿 ID

示例值:42322

func (*DraftBuilder) Entity

func (builder *DraftBuilder) Entity(entity *Entity) *DraftBuilder

词条信息

示例值:

type Entity

type Entity struct {
	Id       *string `json:"id,omitempty"`        // 词条 ID (需要更新某个词条时填写,若是创建新词条可不填写)
	MainKeys []*Term `json:"main_keys,omitempty"` // 词条名

	Aliases     []*Term      `json:"aliases,omitempty"`      // 别名
	Description *string      `json:"description,omitempty"`  // 词条释义(纯文本格式)
	Creator     *string      `json:"creator,omitempty"`      // 创建者
	CreateTime  *string      `json:"create_time,omitempty"`  // 词条创建时间
	Updater     *string      `json:"updater,omitempty"`      // 最近一次更新者
	UpdateTime  *string      `json:"update_time,omitempty"`  // 词条最近更新时间
	RelatedMeta *RelatedMeta `json:"related_meta,omitempty"` // 更多相关信息
	Statistics  *Statistics  `json:"statistics,omitempty"`   // 当前词条收到的反馈数据
	OuterInfo   *OuterInfo   `json:"outer_info,omitempty"`   // 外部系统关联数据
	RichText    *string      `json:"rich_text,omitempty"`    // 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分
	Source      *int         `json:"source,omitempty"`       // 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建
}

type EntityBuilder

type EntityBuilder struct {
	// contains filtered or unexported fields
}

func NewEntityBuilder

func NewEntityBuilder() *EntityBuilder

func (*EntityBuilder) Aliases

func (builder *EntityBuilder) Aliases(aliases []*Term) *EntityBuilder

别名

示例值:

func (*EntityBuilder) Build

func (builder *EntityBuilder) Build() *Entity

func (*EntityBuilder) CreateTime

func (builder *EntityBuilder) CreateTime(createTime string) *EntityBuilder

词条创建时间

示例值:1649318125

func (*EntityBuilder) Creator added in v3.0.20

func (builder *EntityBuilder) Creator(creator string) *EntityBuilder

创建者

示例值:ou_30b07b63089ea46518789914dac63d36

func (*EntityBuilder) Description

func (builder *EntityBuilder) Description(description string) *EntityBuilder

词条释义(纯文本格式)

示例值:企业百科是飞书提供的一款知识管理工具,通过企业百科可以帮助企业将分散的知识信息进行聚合,并通过UGC的方式,促进企业知识的保鲜和流通

func (*EntityBuilder) Id

func (builder *EntityBuilder) Id(id string) *EntityBuilder

词条 ID (需要更新某个词条时填写,若是创建新词条可不填写)

示例值:enterprise_40217521

func (*EntityBuilder) MainKeys

func (builder *EntityBuilder) MainKeys(mainKeys []*Term) *EntityBuilder

词条名

示例值:

func (*EntityBuilder) OuterInfo

func (builder *EntityBuilder) OuterInfo(outerInfo *OuterInfo) *EntityBuilder

外部系统关联数据

示例值:

func (*EntityBuilder) RelatedMeta

func (builder *EntityBuilder) RelatedMeta(relatedMeta *RelatedMeta) *EntityBuilder

更多相关信息

示例值:

func (*EntityBuilder) RichText

func (builder *EntityBuilder) RichText(richText string) *EntityBuilder

富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分

示例值:<b>加粗</b><i>斜体</i><p><a href=\"https://feishu.cn\">链接</a></p><p><span>企业百科是飞书提供的一款知识管理工具,通过企业百科可以帮助企业将分散的知识信息进行聚合,并通过UGC的方式,促进企业知识的保鲜和流通</span></p>

func (*EntityBuilder) Source added in v3.0.20

func (builder *EntityBuilder) Source(source int) *EntityBuilder

词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建

示例值:1

func (*EntityBuilder) Statistics

func (builder *EntityBuilder) Statistics(statistics *Statistics) *EntityBuilder

当前词条收到的反馈数据

示例值:

func (*EntityBuilder) UpdateTime

func (builder *EntityBuilder) UpdateTime(updateTime string) *EntityBuilder

词条最近更新时间

示例值:1649318125

func (*EntityBuilder) Updater added in v3.0.20

func (builder *EntityBuilder) Updater(updater string) *EntityBuilder

最近一次更新者

示例值:ou_30b07b63089ea46518789914dac63d36

type EntityWord added in v3.0.8

type EntityWord struct {
	Name    *string  `json:"name,omitempty"`    // 抽取出的词条名
	Aliases []string `json:"aliases,omitempty"` // 词条可能的别名
}

type EntityWordBuilder added in v3.0.8

type EntityWordBuilder struct {
	// contains filtered or unexported fields
}

func NewEntityWordBuilder added in v3.0.8

func NewEntityWordBuilder() *EntityWordBuilder

func (*EntityWordBuilder) Aliases added in v3.0.8

func (builder *EntityWordBuilder) Aliases(aliases []string) *EntityWordBuilder

词条可能的别名

示例值:

func (*EntityWordBuilder) Build added in v3.0.8

func (builder *EntityWordBuilder) Build() *EntityWord

func (*EntityWordBuilder) Name added in v3.0.8

func (builder *EntityWordBuilder) Name(name string) *EntityWordBuilder

抽取出的词条名

示例值:企业百科

type ExtractEntityPathReqBodyBuilder added in v3.0.10

type ExtractEntityPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewExtractEntityPathReqBodyBuilder added in v3.0.10

func NewExtractEntityPathReqBodyBuilder() *ExtractEntityPathReqBodyBuilder

func (*ExtractEntityPathReqBodyBuilder) Build added in v3.0.10

func (*ExtractEntityPathReqBodyBuilder) Text added in v3.0.10

需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容)

示例值:企业百科是一部高效汇聚企业内各类信息,并可由企业成员参与编辑的在线百科全书

type ExtractEntityReq added in v3.0.10

type ExtractEntityReq struct {
	Body *ExtractEntityReqBody `body:""`
	// contains filtered or unexported fields
}

type ExtractEntityReqBody added in v3.0.10

type ExtractEntityReqBody struct {
	Text *string `json:"text,omitempty"` // 需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容)
}

type ExtractEntityReqBodyBuilder added in v3.0.10

type ExtractEntityReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewExtractEntityReqBodyBuilder added in v3.0.10

func NewExtractEntityReqBodyBuilder() *ExtractEntityReqBodyBuilder

func (*ExtractEntityReqBodyBuilder) Build added in v3.0.10

func (*ExtractEntityReqBodyBuilder) Text added in v3.0.10

需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容)

示例值:企业百科是一部高效汇聚企业内各类信息,并可由企业成员参与编辑的在线百科全书

type ExtractEntityReqBuilder added in v3.0.10

type ExtractEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewExtractEntityReqBuilder added in v3.0.10

func NewExtractEntityReqBuilder() *ExtractEntityReqBuilder

func (*ExtractEntityReqBuilder) Body added in v3.0.10

提取文本中可能成为百科词条的词语,且不会过滤已经成为百科词条的词语。同时,会返回推荐的别名。

func (*ExtractEntityReqBuilder) Build added in v3.0.10

func (builder *ExtractEntityReqBuilder) Build() *ExtractEntityReq

type ExtractEntityResp added in v3.0.10

type ExtractEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ExtractEntityRespData `json:"data"` // 业务数据
}

func (*ExtractEntityResp) Success added in v3.0.10

func (resp *ExtractEntityResp) Success() bool

type ExtractEntityRespData added in v3.0.10

type ExtractEntityRespData struct {
	EntityWord []*EntityWord `json:"entity_word,omitempty"` // 文本中可能的成为百科词条的词汇
}

type File added in v3.0.3

type File struct {
	Name *string   `json:"name,omitempty"` // 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp
	File io.Reader `json:"file,omitempty"` // 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片
}

type FileBuilder added in v3.0.3

type FileBuilder struct {
	// contains filtered or unexported fields
}

func NewFileBuilder added in v3.0.3

func NewFileBuilder() *FileBuilder

func (*FileBuilder) Build added in v3.0.3

func (builder *FileBuilder) Build() *File

func (*FileBuilder) File added in v3.0.3

func (builder *FileBuilder) File(file io.Reader) *FileBuilder

二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片

示例值:file binary

func (*FileBuilder) Name added in v3.0.3

func (builder *FileBuilder) Name(name string) *FileBuilder

文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp

示例值:示例图片.png

type GetEntityReq

type GetEntityReq struct {
	// contains filtered or unexported fields
}

type GetEntityReqBuilder

type GetEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewGetEntityReqBuilder

func NewGetEntityReqBuilder() *GetEntityReqBuilder

func (*GetEntityReqBuilder) Build

func (builder *GetEntityReqBuilder) Build() *GetEntityReq

func (*GetEntityReqBuilder) EntityId

func (builder *GetEntityReqBuilder) EntityId(entityId string) *GetEntityReqBuilder

词条 ID

示例值:enterprise_515879

func (*GetEntityReqBuilder) OuterId

func (builder *GetEntityReqBuilder) OuterId(outerId string) *GetEntityReqBuilder

词条在外部系统中对应的唯一 ID

示例值:12345

func (*GetEntityReqBuilder) Provider

func (builder *GetEntityReqBuilder) Provider(provider string) *GetEntityReqBuilder

外部系统

示例值:星云

func (*GetEntityReqBuilder) UserIdType

func (builder *GetEntityReqBuilder) UserIdType(userIdType string) *GetEntityReqBuilder

此次调用中使用的用户ID的类型

示例值:

type GetEntityResp

type GetEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetEntityRespData `json:"data"` // 业务数据
}

func (*GetEntityResp) Success

func (resp *GetEntityResp) Success() bool

type GetEntityRespData

type GetEntityRespData struct {
	Entity *Entity `json:"entity,omitempty"` // 百科词条
}

type HighlightEntityPathReqBodyBuilder

type HighlightEntityPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewHighlightEntityPathReqBodyBuilder

func NewHighlightEntityPathReqBodyBuilder() *HighlightEntityPathReqBodyBuilder

func (*HighlightEntityPathReqBodyBuilder) Build

func (*HighlightEntityPathReqBodyBuilder) Text

需要识别百科词条的内容(不超过1000字)

示例值:企业百科是飞书提供的一款知识管理工具

type HighlightEntityReq

type HighlightEntityReq struct {
	Body *HighlightEntityReqBody `body:""`
	// contains filtered or unexported fields
}

type HighlightEntityReqBody

type HighlightEntityReqBody struct {
	Text *string `json:"text,omitempty"` // 需要识别百科词条的内容(不超过1000字)
}

type HighlightEntityReqBodyBuilder

type HighlightEntityReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewHighlightEntityReqBodyBuilder

func NewHighlightEntityReqBodyBuilder() *HighlightEntityReqBodyBuilder

func (*HighlightEntityReqBodyBuilder) Build

func (*HighlightEntityReqBodyBuilder) Text

需要识别百科词条的内容(不超过1000字)

示例值:企业百科是飞书提供的一款知识管理工具

type HighlightEntityReqBuilder

type HighlightEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewHighlightEntityReqBuilder

func NewHighlightEntityReqBuilder() *HighlightEntityReqBuilder

func (*HighlightEntityReqBuilder) Body

传入一句话,智能识别句中对应的词条,并返回词条位置和 entity_id,可在外部系统中快速实现百科词条智能高亮。

func (*HighlightEntityReqBuilder) Build

type HighlightEntityResp

type HighlightEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *HighlightEntityRespData `json:"data"` // 业务数据
}

func (*HighlightEntityResp) Success

func (resp *HighlightEntityResp) Success() bool

type HighlightEntityRespData

type HighlightEntityRespData struct {
	Phrases []*Phrase `json:"phrases,omitempty"` // 识别到的词条信息
}

type ListClassificationIterator

type ListClassificationIterator struct {
	// contains filtered or unexported fields
}

func (*ListClassificationIterator) Next

func (iterator *ListClassificationIterator) Next() (bool, *Classification, error)

func (*ListClassificationIterator) NextPageToken

func (iterator *ListClassificationIterator) NextPageToken() *string

type ListClassificationReq

type ListClassificationReq struct {
	Limit int // 最多返回多少记录,只有在使用迭代器访问时,才有效
	// contains filtered or unexported fields
}

type ListClassificationReqBuilder

type ListClassificationReqBuilder struct {
	// contains filtered or unexported fields
}

func NewListClassificationReqBuilder

func NewListClassificationReqBuilder() *ListClassificationReqBuilder

func (*ListClassificationReqBuilder) Build

func (*ListClassificationReqBuilder) Limit

最大返回多少记录,当使用迭代器访问时才有效

func (*ListClassificationReqBuilder) PageSize

func (builder *ListClassificationReqBuilder) PageSize(pageSize int) *ListClassificationReqBuilder

分页大小

示例值:20

func (*ListClassificationReqBuilder) PageToken

func (builder *ListClassificationReqBuilder) PageToken(pageToken string) *ListClassificationReqBuilder

分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果

示例值:408ecac018b2e3518db37275e812aad7bb8ad3e755fc886f322ac6c430ba

type ListClassificationResp

type ListClassificationResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListClassificationRespData `json:"data"` // 业务数据
}

func (*ListClassificationResp) Success

func (resp *ListClassificationResp) Success() bool

type ListClassificationRespData

type ListClassificationRespData struct {
	Items     []*Classification `json:"items,omitempty"`      // 分类
	PageToken *string           `json:"page_token,omitempty"` // 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空
}

type ListEntityIterator

type ListEntityIterator struct {
	// contains filtered or unexported fields
}

func (*ListEntityIterator) Next

func (iterator *ListEntityIterator) Next() (bool, *Entity, error)

func (*ListEntityIterator) NextPageToken

func (iterator *ListEntityIterator) NextPageToken() *string

type ListEntityReq

type ListEntityReq struct {
	Limit int // 最多返回多少记录,只有在使用迭代器访问时,才有效
	// contains filtered or unexported fields
}

type ListEntityReqBuilder

type ListEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewListEntityReqBuilder

func NewListEntityReqBuilder() *ListEntityReqBuilder

func (*ListEntityReqBuilder) Build

func (builder *ListEntityReqBuilder) Build() *ListEntityReq

func (*ListEntityReqBuilder) Limit

func (builder *ListEntityReqBuilder) Limit(limit int) *ListEntityReqBuilder

最大返回多少记录,当使用迭代器访问时才有效

func (*ListEntityReqBuilder) PageSize

func (builder *ListEntityReqBuilder) PageSize(pageSize int) *ListEntityReqBuilder

分页大小

示例值:20

func (*ListEntityReqBuilder) PageToken

func (builder *ListEntityReqBuilder) PageToken(pageToken string) *ListEntityReqBuilder

分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果

示例值:b152fa6e6f62a291019a04c3a93f365f8ac641910506ff15ff4cad6534e087cb4ed8fa2c

func (*ListEntityReqBuilder) Provider

func (builder *ListEntityReqBuilder) Provider(provider string) *ListEntityReqBuilder

相关外部系统【可用来过滤词条数据】

示例值:星云

func (*ListEntityReqBuilder) UserIdType

func (builder *ListEntityReqBuilder) UserIdType(userIdType string) *ListEntityReqBuilder

此次调用中使用的用户ID的类型

示例值:

type ListEntityResp

type ListEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListEntityRespData `json:"data"` // 业务数据
}

func (*ListEntityResp) Success

func (resp *ListEntityResp) Success() bool

type ListEntityRespData

type ListEntityRespData struct {
	Entities  []*Entity `json:"entities,omitempty"`   // 词条列表
	PageToken *string   `json:"page_token,omitempty"` // 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空
}

type MatchEntityPathReqBodyBuilder

type MatchEntityPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewMatchEntityPathReqBodyBuilder

func NewMatchEntityPathReqBodyBuilder() *MatchEntityPathReqBodyBuilder

func (*MatchEntityPathReqBodyBuilder) Build

func (*MatchEntityPathReqBodyBuilder) Word

搜索关键词,将与词条名、别名进行精准匹配

示例值:企业百科

type MatchEntityReq

type MatchEntityReq struct {
	Body *MatchEntityReqBody `body:""`
	// contains filtered or unexported fields
}

type MatchEntityReqBody

type MatchEntityReqBody struct {
	Word *string `json:"word,omitempty"` // 搜索关键词,将与词条名、别名进行精准匹配
}

type MatchEntityReqBodyBuilder

type MatchEntityReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewMatchEntityReqBodyBuilder

func NewMatchEntityReqBodyBuilder() *MatchEntityReqBodyBuilder

func (*MatchEntityReqBodyBuilder) Build

func (*MatchEntityReqBodyBuilder) Word

搜索关键词,将与词条名、别名进行精准匹配

示例值:企业百科

type MatchEntityReqBuilder

type MatchEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewMatchEntityReqBuilder

func NewMatchEntityReqBuilder() *MatchEntityReqBuilder

func (*MatchEntityReqBuilder) Body

将关键词与词条名、别名精准匹配,并返回对应的 词条 ID。

func (*MatchEntityReqBuilder) Build

func (builder *MatchEntityReqBuilder) Build() *MatchEntityReq

type MatchEntityResp

type MatchEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *MatchEntityRespData `json:"data"` // 业务数据
}

func (*MatchEntityResp) Success

func (resp *MatchEntityResp) Success() bool

type MatchEntityRespData

type MatchEntityRespData struct {
	Results []*MatchInfo `json:"results,omitempty"` // 搜索结果
}

type MatchInfo

type MatchInfo struct {
	EntityId *string `json:"entity_id,omitempty"` // 词条 ID
	Type     *int    `json:"type,omitempty"`      // 命中的字段
}

type MatchInfoBuilder

type MatchInfoBuilder struct {
	// contains filtered or unexported fields
}

func NewMatchInfoBuilder

func NewMatchInfoBuilder() *MatchInfoBuilder

func (*MatchInfoBuilder) Build

func (builder *MatchInfoBuilder) Build() *MatchInfo

func (*MatchInfoBuilder) EntityId

func (builder *MatchInfoBuilder) EntityId(entityId string) *MatchInfoBuilder

词条 ID

示例值:enterprise_34809584

func (*MatchInfoBuilder) Type

func (builder *MatchInfoBuilder) Type(type_ int) *MatchInfoBuilder

命中的字段

示例值:0

type OuterInfo

type OuterInfo struct {
	Provider *string `json:"provider,omitempty"` // 外部系统(不能包含中横线 "-")
	OuterId  *string `json:"outer_id,omitempty"` // 词条在外部系统中对应的唯一 ID(不能包含中横线 "-")
}

type OuterInfoBuilder

type OuterInfoBuilder struct {
	// contains filtered or unexported fields
}

func NewOuterInfoBuilder

func NewOuterInfoBuilder() *OuterInfoBuilder

func (*OuterInfoBuilder) Build

func (builder *OuterInfoBuilder) Build() *OuterInfo

func (*OuterInfoBuilder) OuterId

func (builder *OuterInfoBuilder) OuterId(outerId string) *OuterInfoBuilder

词条在外部系统中对应的唯一 ID(不能包含中横线 "-")

示例值:client_6539i3498d

func (*OuterInfoBuilder) Provider

func (builder *OuterInfoBuilder) Provider(provider string) *OuterInfoBuilder

外部系统(不能包含中横线 "-")

示例值:星云

type Phrase

type Phrase struct {
	Name      *string  `json:"name,omitempty"`       // 识别到的关键词
	EntityIds []string `json:"entity_ids,omitempty"` // 对应的词条 ID
	Span      *Span    `json:"span,omitempty"`       // 词条所在位置
}

type PhraseBuilder

type PhraseBuilder struct {
	// contains filtered or unexported fields
}

func NewPhraseBuilder

func NewPhraseBuilder() *PhraseBuilder

func (*PhraseBuilder) Build

func (builder *PhraseBuilder) Build() *Phrase

func (*PhraseBuilder) EntityIds

func (builder *PhraseBuilder) EntityIds(entityIds []string) *PhraseBuilder

对应的词条 ID

示例值:

func (*PhraseBuilder) Name

func (builder *PhraseBuilder) Name(name string) *PhraseBuilder

识别到的关键词

示例值:企业百科

func (*PhraseBuilder) Span

func (builder *PhraseBuilder) Span(span *Span) *PhraseBuilder

词条所在位置

示例值:

type Referer

type Referer struct {
	Id    *string `json:"id,omitempty"`    // 对应相关信息 ID
	Title *string `json:"title,omitempty"` // 对应相关信息的描述,如相关联系人的描述、相关链接的标题
	Url   *string `json:"url,omitempty"`   // 链接地址
}

type RefererBuilder

type RefererBuilder struct {
	// contains filtered or unexported fields
}

func NewRefererBuilder

func NewRefererBuilder() *RefererBuilder

func (*RefererBuilder) Build

func (builder *RefererBuilder) Build() *Referer

func (*RefererBuilder) Id

func (builder *RefererBuilder) Id(id string) *RefererBuilder

对应相关信息 ID

示例值:格式请看请求体示例

func (*RefererBuilder) Title

func (builder *RefererBuilder) Title(title string) *RefererBuilder

对应相关信息的描述,如相关联系人的描述、相关链接的标题

示例值:企业百科帮助中心

func (*RefererBuilder) Url

func (builder *RefererBuilder) Url(url string) *RefererBuilder

链接地址

示例值:https://www.feishu.cn/hc/zh-CN

type RelatedMeta

type RelatedMeta struct {
	Users           []*Referer        `json:"users,omitempty"`           // 相关联系人
	Chats           []*Referer        `json:"chats,omitempty"`           // 相关服务中的相关公开群
	Docs            []*Referer        `json:"docs,omitempty"`            // 相关云文档
	Oncalls         []*Referer        `json:"oncalls,omitempty"`         // 相关服务中的相关值班号
	Links           []*Referer        `json:"links,omitempty"`           // 相关链接
	Abbreviations   []*Abbreviation   `json:"abbreviations,omitempty"`   // 相关词条
	Classifications []*Classification `json:"classifications,omitempty"` // 当前词条所属分类;词条只能属于二级分类,且每个一级分类下只能选择一个二级分类。
	Images          []*BaikeImage     `json:"images,omitempty"`          // 上传的图片
}

type RelatedMetaBuilder

type RelatedMetaBuilder struct {
	// contains filtered or unexported fields
}

func NewRelatedMetaBuilder

func NewRelatedMetaBuilder() *RelatedMetaBuilder

func (*RelatedMetaBuilder) Abbreviations

func (builder *RelatedMetaBuilder) Abbreviations(abbreviations []*Abbreviation) *RelatedMetaBuilder

相关词条

示例值:

func (*RelatedMetaBuilder) Build

func (builder *RelatedMetaBuilder) Build() *RelatedMeta

func (*RelatedMetaBuilder) Chats

func (builder *RelatedMetaBuilder) Chats(chats []*Referer) *RelatedMetaBuilder

相关服务中的相关公开群

示例值:

func (*RelatedMetaBuilder) Classifications

func (builder *RelatedMetaBuilder) Classifications(classifications []*Classification) *RelatedMetaBuilder

当前词条所属分类;词条只能属于二级分类,且每个一级分类下只能选择一个二级分类。

示例值:

func (*RelatedMetaBuilder) Docs

func (builder *RelatedMetaBuilder) Docs(docs []*Referer) *RelatedMetaBuilder

相关云文档

示例值:

func (*RelatedMetaBuilder) Images added in v3.0.3

func (builder *RelatedMetaBuilder) Images(images []*BaikeImage) *RelatedMetaBuilder

上传的图片

示例值:

func (builder *RelatedMetaBuilder) Links(links []*Referer) *RelatedMetaBuilder

相关链接

示例值:

func (*RelatedMetaBuilder) Oncalls

func (builder *RelatedMetaBuilder) Oncalls(oncalls []*Referer) *RelatedMetaBuilder

相关服务中的相关值班号

示例值:

func (*RelatedMetaBuilder) Users

func (builder *RelatedMetaBuilder) Users(users []*Referer) *RelatedMetaBuilder

相关联系人

示例值:

type SearchEntityIterator

type SearchEntityIterator struct {
	// contains filtered or unexported fields
}

func (*SearchEntityIterator) Next

func (iterator *SearchEntityIterator) Next() (bool, *Entity, error)

func (*SearchEntityIterator) NextPageToken

func (iterator *SearchEntityIterator) NextPageToken() *string

type SearchEntityPathReqBodyBuilder

type SearchEntityPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewSearchEntityPathReqBodyBuilder

func NewSearchEntityPathReqBodyBuilder() *SearchEntityPathReqBodyBuilder

func (*SearchEntityPathReqBodyBuilder) Build

func (*SearchEntityPathReqBodyBuilder) ClassificationFilter added in v3.0.20

func (builder *SearchEntityPathReqBodyBuilder) ClassificationFilter(classificationFilter *ClassificationFilter) *SearchEntityPathReqBodyBuilder

分类筛选

示例值:

func (*SearchEntityPathReqBodyBuilder) Creators added in v3.0.20

创建者

示例值:ou_30b07b63089ea46518789914dac63d36

func (*SearchEntityPathReqBodyBuilder) Query

搜索关键词

示例值:百科

func (*SearchEntityPathReqBodyBuilder) Sources added in v3.0.20

词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建

示例值:

type SearchEntityReq

type SearchEntityReq struct {
	Body  *SearchEntityReqBody `body:""`
	Limit int                  // 最多返回多少记录,只有在使用迭代器访问时,才有效
	// contains filtered or unexported fields
}

type SearchEntityReqBody

type SearchEntityReqBody struct {
	Query                *string               `json:"query,omitempty"`                 // 搜索关键词
	ClassificationFilter *ClassificationFilter `json:"classification_filter,omitempty"` // 分类筛选
	Sources              []int                 `json:"sources,omitempty"`               // 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建
	Creators             []string              `json:"creators,omitempty"`              // 创建者
}

type SearchEntityReqBodyBuilder

type SearchEntityReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewSearchEntityReqBodyBuilder

func NewSearchEntityReqBodyBuilder() *SearchEntityReqBodyBuilder

func (*SearchEntityReqBodyBuilder) Build

func (*SearchEntityReqBodyBuilder) ClassificationFilter added in v3.0.20

func (builder *SearchEntityReqBodyBuilder) ClassificationFilter(classificationFilter *ClassificationFilter) *SearchEntityReqBodyBuilder

分类筛选

示例值:

func (*SearchEntityReqBodyBuilder) Creators added in v3.0.20

func (builder *SearchEntityReqBodyBuilder) Creators(creators []string) *SearchEntityReqBodyBuilder

创建者

示例值:ou_30b07b63089ea46518789914dac63d36

func (*SearchEntityReqBodyBuilder) Query

搜索关键词

示例值:百科

func (*SearchEntityReqBodyBuilder) Sources added in v3.0.20

func (builder *SearchEntityReqBodyBuilder) Sources(sources []int) *SearchEntityReqBodyBuilder

词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建

示例值:

type SearchEntityReqBuilder

type SearchEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewSearchEntityReqBuilder

func NewSearchEntityReqBuilder() *SearchEntityReqBuilder

func (*SearchEntityReqBuilder) Body

传入关键词,与词条名、别名、释义等信息进行模糊匹配,返回搜到的词条信息。

func (*SearchEntityReqBuilder) Build

func (builder *SearchEntityReqBuilder) Build() *SearchEntityReq

func (*SearchEntityReqBuilder) Limit

func (builder *SearchEntityReqBuilder) Limit(limit int) *SearchEntityReqBuilder

最大返回多少记录,当使用迭代器访问时才有效

func (*SearchEntityReqBuilder) PageSize

func (builder *SearchEntityReqBuilder) PageSize(pageSize int) *SearchEntityReqBuilder

每页返回的词条量

示例值:10

func (*SearchEntityReqBuilder) PageToken

func (builder *SearchEntityReqBuilder) PageToken(pageToken string) *SearchEntityReqBuilder

分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果

示例值:b152fa6e6f62a291019a04c3a93f365f8ac641910506ff15ff4cad6534e087cb4ed8fa2c

func (*SearchEntityReqBuilder) UserIdType

func (builder *SearchEntityReqBuilder) UserIdType(userIdType string) *SearchEntityReqBuilder

此次调用中使用的用户ID的类型

示例值:

type SearchEntityResp

type SearchEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *SearchEntityRespData `json:"data"` // 业务数据
}

func (*SearchEntityResp) Success

func (resp *SearchEntityResp) Success() bool

type SearchEntityRespData

type SearchEntityRespData struct {
	Entities  []*Entity `json:"entities,omitempty"`   // 搜索结果
	PageToken *string   `json:"page_token,omitempty"` // 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空
}

type Span

type Span struct {
	Start *int `json:"start,omitempty"` // 关键词开始位置,从 0 开始计数(编码格式采用 utf-8)
	End   *int `json:"end,omitempty"`   // 关键词结束位置,从 0 开始计数(编码格式采用 utf-8)
}

type SpanBuilder

type SpanBuilder struct {
	// contains filtered or unexported fields
}

func NewSpanBuilder

func NewSpanBuilder() *SpanBuilder

func (*SpanBuilder) Build

func (builder *SpanBuilder) Build() *Span

func (*SpanBuilder) End

func (builder *SpanBuilder) End(end int) *SpanBuilder

关键词结束位置,从 0 开始计数(编码格式采用 utf-8)

示例值:4

func (*SpanBuilder) Start

func (builder *SpanBuilder) Start(start int) *SpanBuilder

关键词开始位置,从 0 开始计数(编码格式采用 utf-8)

示例值:0

type StatisticalReport added in v3.0.5

type StatisticalReport struct {
	DateInterval *int         `json:"date_interval,omitempty"` // 请求时间区间
	WordInfo     *WordInfo    `json:"word_info,omitempty"`     // 词汇量相关数据
	CorrectInfo  *CorrectInfo `json:"correct_info,omitempty"`  // 纠错相关数据
	UpdateDate   *string      `json:"update_date,omitempty"`   // 天维度的时间戳,用于确认数据最近一次更新时间
}

type StatisticalReportBuilder added in v3.0.5

type StatisticalReportBuilder struct {
	// contains filtered or unexported fields
}

func NewStatisticalReportBuilder added in v3.0.5

func NewStatisticalReportBuilder() *StatisticalReportBuilder

func (*StatisticalReportBuilder) Build added in v3.0.5

func (builder *StatisticalReportBuilder) Build() *StatisticalReport

func (*StatisticalReportBuilder) CorrectInfo added in v3.0.5

func (builder *StatisticalReportBuilder) CorrectInfo(correctInfo *CorrectInfo) *StatisticalReportBuilder

纠错相关数据

示例值:

func (*StatisticalReportBuilder) DateInterval added in v3.0.5

func (builder *StatisticalReportBuilder) DateInterval(dateInterval int) *StatisticalReportBuilder

请求时间区间

示例值:请求时间区间

func (*StatisticalReportBuilder) UpdateDate added in v3.0.5

func (builder *StatisticalReportBuilder) UpdateDate(updateDate string) *StatisticalReportBuilder

天维度的时间戳,用于确认数据最近一次更新时间

示例值:“20221101”

func (*StatisticalReportBuilder) WordInfo added in v3.0.5

func (builder *StatisticalReportBuilder) WordInfo(wordInfo *WordInfo) *StatisticalReportBuilder

词汇量相关数据

示例值:

type Statistics

type Statistics struct {
	LikeCount    *int `json:"like_count,omitempty"`    // 累计点赞
	DislikeCount *int `json:"dislike_count,omitempty"` // 当前词条版本收到的负反馈数量
}

type StatisticsBuilder

type StatisticsBuilder struct {
	// contains filtered or unexported fields
}

func NewStatisticsBuilder

func NewStatisticsBuilder() *StatisticsBuilder

func (*StatisticsBuilder) Build

func (builder *StatisticsBuilder) Build() *Statistics

func (*StatisticsBuilder) DislikeCount

func (builder *StatisticsBuilder) DislikeCount(dislikeCount int) *StatisticsBuilder

当前词条版本收到的负反馈数量

示例值:3

func (*StatisticsBuilder) LikeCount

func (builder *StatisticsBuilder) LikeCount(likeCount int) *StatisticsBuilder

累计点赞

示例值:55

type Term

type Term struct {
	Key           *string        `json:"key,omitempty"`            // 名称的值
	DisplayStatus *DisplayStatus `json:"display_status,omitempty"` // 名称展示范围
}

type TermBuilder

type TermBuilder struct {
	// contains filtered or unexported fields
}

func NewTermBuilder

func NewTermBuilder() *TermBuilder

func (*TermBuilder) Build

func (builder *TermBuilder) Build() *Term

func (*TermBuilder) DisplayStatus

func (builder *TermBuilder) DisplayStatus(displayStatus *DisplayStatus) *TermBuilder

名称展示范围

示例值:

func (*TermBuilder) Key

func (builder *TermBuilder) Key(key string) *TermBuilder

名称的值

示例值:企业百科

type UpdateDraftReq

type UpdateDraftReq struct {
	Entity *Entity `body:""`
	// contains filtered or unexported fields
}

type UpdateDraftReqBuilder

type UpdateDraftReqBuilder struct {
	// contains filtered or unexported fields
}

func NewUpdateDraftReqBuilder

func NewUpdateDraftReqBuilder() *UpdateDraftReqBuilder

func (*UpdateDraftReqBuilder) Build

func (builder *UpdateDraftReqBuilder) Build() *UpdateDraftReq

func (*UpdateDraftReqBuilder) DraftId

func (builder *UpdateDraftReqBuilder) DraftId(draftId string) *UpdateDraftReqBuilder

草稿 ID

示例值:5347

func (*UpdateDraftReqBuilder) Entity

func (builder *UpdateDraftReqBuilder) Entity(entity *Entity) *UpdateDraftReqBuilder

根据 draft_id 更新草稿内容,已审批的草稿无法编辑

func (*UpdateDraftReqBuilder) UserIdType

func (builder *UpdateDraftReqBuilder) UserIdType(userIdType string) *UpdateDraftReqBuilder

此次调用中使用的用户ID的类型

示例值:

type UpdateDraftResp

type UpdateDraftResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *UpdateDraftRespData `json:"data"` // 业务数据
}

func (*UpdateDraftResp) Success

func (resp *UpdateDraftResp) Success() bool

type UpdateDraftRespData

type UpdateDraftRespData struct {
	Draft *Draft `json:"draft,omitempty"` // 草稿
}

type UpdateEntityReq

type UpdateEntityReq struct {
	Entity *Entity `body:""`
	// contains filtered or unexported fields
}

type UpdateEntityReqBuilder

type UpdateEntityReqBuilder struct {
	// contains filtered or unexported fields
}

func NewUpdateEntityReqBuilder

func NewUpdateEntityReqBuilder() *UpdateEntityReqBuilder

func (*UpdateEntityReqBuilder) Build

func (builder *UpdateEntityReqBuilder) Build() *UpdateEntityReq

func (*UpdateEntityReqBuilder) Entity

func (builder *UpdateEntityReqBuilder) Entity(entity *Entity) *UpdateEntityReqBuilder

通过此接口更新已有的词条,不需要百科管理员审核可直接写入词库,请慎重使用【租户管理员请慎重审批】。

func (*UpdateEntityReqBuilder) EntityId

func (builder *UpdateEntityReqBuilder) EntityId(entityId string) *UpdateEntityReqBuilder

实体词 ID

示例值:enterprise_40217521

func (*UpdateEntityReqBuilder) UserIdType

func (builder *UpdateEntityReqBuilder) UserIdType(userIdType string) *UpdateEntityReqBuilder

此次调用中使用的用户ID的类型

示例值:

type UpdateEntityResp

type UpdateEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *UpdateEntityRespData `json:"data"` // 业务数据
}

func (*UpdateEntityResp) Success

func (resp *UpdateEntityResp) Success() bool

type UpdateEntityRespData

type UpdateEntityRespData struct {
	Entity *Entity `json:"entity,omitempty"` // 词条信息
}

type UploadFileReq added in v3.0.3

type UploadFileReq struct {
	File *File `body:""`
	// contains filtered or unexported fields
}

type UploadFileReqBuilder added in v3.0.3

type UploadFileReqBuilder struct {
	// contains filtered or unexported fields
}

func NewUploadFileReqBuilder added in v3.0.3

func NewUploadFileReqBuilder() *UploadFileReqBuilder

func (*UploadFileReqBuilder) Build added in v3.0.3

func (builder *UploadFileReqBuilder) Build() *UploadFileReq

func (*UploadFileReqBuilder) File added in v3.0.3

func (builder *UploadFileReqBuilder) File(file *File) *UploadFileReqBuilder

百科词条图片资源上传。

type UploadFileResp added in v3.0.3

type UploadFileResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *UploadFileRespData `json:"data"` // 业务数据
}

func (*UploadFileResp) Success added in v3.0.3

func (resp *UploadFileResp) Success() bool

type UploadFileRespData added in v3.0.3

type UploadFileRespData struct {
	FileToken *string `json:"file_token,omitempty"` // 文件 token
}

type WordInfo added in v3.0.5

type WordInfo struct {
	InputTotal                   *int     `json:"input_total,omitempty"`                       // 用户输入的总词汇量
	DedupInputTotal              *int     `json:"dedup_input_total,omitempty"`                 // 用户输入的去重后的总词汇量
	EachdayInput                 []int    `json:"eachday_input,omitempty"`                     // 时间区间内每一天发送的英文词数,时间是由远到近。以七天数据为例:下标6为昨天,下标5位前天以此类推
	EachdayDedupInput            []int    `json:"eachday_dedup_input,omitempty"`               // 时间区间内每一天发送的归一化去重后的英文词数,时间是由远到近。以七天数据为例:下标6为昨天,下标5位前天以此类推
	SendMessageTotal             *int     `json:"send_message_total,omitempty"`                // 发送的消息总数
	SendEnMessageTotal           *int     `json:"send_en_message_total,omitempty"`             // 发送的英语消息总数
	ReceiveMessageTotal          *int     `json:"receive_message_total,omitempty"`             // 接收消息的数量
	ReceiveEnMessageTotal        *int     `json:"receive_en_message_total,omitempty"`          // 接收英文消息的数量
	HistoryWordsTotal            *int     `json:"history_words_total,omitempty"`               // 历史总计英语词数(包含新增)
	NewWordsTotal                *int     `json:"new_words_total,omitempty"`                   // 新增英语词数
	EachdaySendEnMessage         []int    `json:"eachday_send_en_message,omitempty"`           // 时间区间内每一天发送的英语消息数
	EachdaySendMessage           []int    `json:"eachday_send_message,omitempty"`              // 时间区间内每一天发送的消息数
	EachdayReceiveEnMessage      []int    `json:"eachday_receive_en_message,omitempty"`        // 时间区间内每一天接收的英文消息数
	EachdayReceiveMessage        []int    `json:"eachday_receive_message,omitempty"`           // 时间区间内每一天接收的英文消息数
	SendEngMessageRateRingGrowth *float64 `json:"send_eng_message_rate_ring_growth,omitempty"` // 发送消息占比环比增长变化
	SendEngWordsRingGrowth       *int     `json:"send_eng_words_ring_growth,omitempty"`        // 发送英文单词数环比增长变化
}

type WordInfoBuilder added in v3.0.5

type WordInfoBuilder struct {
	// contains filtered or unexported fields
}

func NewWordInfoBuilder added in v3.0.5

func NewWordInfoBuilder() *WordInfoBuilder

func (*WordInfoBuilder) Build added in v3.0.5

func (builder *WordInfoBuilder) Build() *WordInfo

func (*WordInfoBuilder) DedupInputTotal added in v3.0.5

func (builder *WordInfoBuilder) DedupInputTotal(dedupInputTotal int) *WordInfoBuilder

用户输入的去重后的总词汇量

示例值:50

func (*WordInfoBuilder) EachdayDedupInput added in v3.0.5

func (builder *WordInfoBuilder) EachdayDedupInput(eachdayDedupInput []int) *WordInfoBuilder

时间区间内每一天发送的归一化去重后的英文词数,时间是由远到近。以七天数据为例:下标6为昨天,下标5位前天以此类推

示例值:

func (*WordInfoBuilder) EachdayInput added in v3.0.5

func (builder *WordInfoBuilder) EachdayInput(eachdayInput []int) *WordInfoBuilder

时间区间内每一天发送的英文词数,时间是由远到近。以七天数据为例:下标6为昨天,下标5位前天以此类推

示例值:

func (*WordInfoBuilder) EachdayReceiveEnMessage added in v3.0.13

func (builder *WordInfoBuilder) EachdayReceiveEnMessage(eachdayReceiveEnMessage []int) *WordInfoBuilder

时间区间内每一天接收的英文消息数

示例值:

func (*WordInfoBuilder) EachdayReceiveMessage added in v3.0.13

func (builder *WordInfoBuilder) EachdayReceiveMessage(eachdayReceiveMessage []int) *WordInfoBuilder

时间区间内每一天接收的英文消息数

示例值:

func (*WordInfoBuilder) EachdaySendEnMessage added in v3.0.13

func (builder *WordInfoBuilder) EachdaySendEnMessage(eachdaySendEnMessage []int) *WordInfoBuilder

时间区间内每一天发送的英语消息数

示例值:

func (*WordInfoBuilder) EachdaySendMessage added in v3.0.13

func (builder *WordInfoBuilder) EachdaySendMessage(eachdaySendMessage []int) *WordInfoBuilder

时间区间内每一天发送的消息数

示例值:

func (*WordInfoBuilder) HistoryWordsTotal added in v3.0.5

func (builder *WordInfoBuilder) HistoryWordsTotal(historyWordsTotal int) *WordInfoBuilder

历史总计英语词数(包含新增)

示例值:300

func (*WordInfoBuilder) InputTotal added in v3.0.5

func (builder *WordInfoBuilder) InputTotal(inputTotal int) *WordInfoBuilder

用户输入的总词汇量

示例值:100

func (*WordInfoBuilder) NewWordsTotal added in v3.0.5

func (builder *WordInfoBuilder) NewWordsTotal(newWordsTotal int) *WordInfoBuilder

新增英语词数

示例值:20

func (*WordInfoBuilder) ReceiveEnMessageTotal added in v3.0.5

func (builder *WordInfoBuilder) ReceiveEnMessageTotal(receiveEnMessageTotal int) *WordInfoBuilder

接收英文消息的数量

示例值:100

func (*WordInfoBuilder) ReceiveMessageTotal added in v3.0.5

func (builder *WordInfoBuilder) ReceiveMessageTotal(receiveMessageTotal int) *WordInfoBuilder

接收消息的数量

示例值:500

func (*WordInfoBuilder) SendEnMessageTotal added in v3.0.5

func (builder *WordInfoBuilder) SendEnMessageTotal(sendEnMessageTotal int) *WordInfoBuilder

发送的英语消息总数

示例值:150

func (*WordInfoBuilder) SendEngMessageRateRingGrowth added in v3.0.13

func (builder *WordInfoBuilder) SendEngMessageRateRingGrowth(sendEngMessageRateRingGrowth float64) *WordInfoBuilder

发送消息占比环比增长变化

示例值:2.1

func (*WordInfoBuilder) SendEngWordsRingGrowth added in v3.0.13

func (builder *WordInfoBuilder) SendEngWordsRingGrowth(sendEngWordsRingGrowth int) *WordInfoBuilder

发送英文单词数环比增长变化

示例值:9

func (*WordInfoBuilder) SendMessageTotal added in v3.0.5

func (builder *WordInfoBuilder) SendMessageTotal(sendMessageTotal int) *WordInfoBuilder

发送的消息总数

示例值:200

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL