larkblock

package
v3.0.33-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEntityPathReqBodyBuilder

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

func NewCreateEntityPathReqBodyBuilder

func NewCreateEntityPathReqBodyBuilder() *CreateEntityPathReqBodyBuilder

func (*CreateEntityPathReqBodyBuilder) BlockTypeId

func (builder *CreateEntityPathReqBodyBuilder) BlockTypeId(blockTypeId string) *CreateEntityPathReqBodyBuilder

block 类型ID

示例值:blk_614c1c952f800014b27f87d6

func (*CreateEntityPathReqBodyBuilder) Build

func (*CreateEntityPathReqBodyBuilder) Extra

扩展字段

示例值:{}

func (*CreateEntityPathReqBodyBuilder) I18nPreview

func (builder *CreateEntityPathReqBodyBuilder) I18nPreview(i18nPreview string) *CreateEntityPathReqBodyBuilder

国际化预览

示例值:{"cn":"这是一个block","va": "this is a block"}

func (*CreateEntityPathReqBodyBuilder) I18nSummary

func (builder *CreateEntityPathReqBodyBuilder) I18nSummary(i18nSummary string) *CreateEntityPathReqBodyBuilder

国际化概括

示例值:{"cn":"这是一个block","va": "this is a block"}

func (*CreateEntityPathReqBodyBuilder) Owner

所有者

示例值:ou_fa7aa170f92d1615de63371ac425a767

func (*CreateEntityPathReqBodyBuilder) Preview

预览

示例值:{"cn":"这是一个block"}

func (*CreateEntityPathReqBodyBuilder) SourceData

func (builder *CreateEntityPathReqBodyBuilder) SourceData(sourceData string) *CreateEntityPathReqBodyBuilder

内容

示例值:{"data":"业务数据"}

func (builder *CreateEntityPathReqBodyBuilder) SourceLink(sourceLink string) *CreateEntityPathReqBodyBuilder

block原链接

示例值:{"_data":"https://docs.feishu.cn/block/78","_version":1}

func (*CreateEntityPathReqBodyBuilder) SourceMeta

func (builder *CreateEntityPathReqBodyBuilder) SourceMeta(sourceMeta string) *CreateEntityPathReqBodyBuilder

元数据

示例值:{"id":7090084015725608979}

func (*CreateEntityPathReqBodyBuilder) Summary

概括

示例值:{"cn":"这是一个block"}

func (*CreateEntityPathReqBodyBuilder) Title

标题

示例值:已阅block

func (*CreateEntityPathReqBodyBuilder) Version

版本号(自增值)

示例值:1

type CreateEntityReq

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

type CreateEntityReqBody

type CreateEntityReqBody struct {
	Title       *string `json:"title,omitempty"`         // 标题
	BlockTypeId *string `json:"block_type_id,omitempty"` // block 类型ID
	SourceData  *string `json:"source_data,omitempty"`   // 内容
	SourceMeta  *string `json:"source_meta,omitempty"`   // 元数据
	Version     *string `json:"version,omitempty"`       // 版本号(自增值)
	SourceLink  *string `json:"source_link,omitempty"`   // block原链接
	Owner       *string `json:"owner,omitempty"`         // 所有者
	Extra       *string `json:"extra,omitempty"`         // 扩展字段
	I18nSummary *string `json:"i18n_summary,omitempty"`  // 国际化概括
	I18nPreview *string `json:"i18n_preview,omitempty"`  // 国际化预览
	Summary     *string `json:"summary,omitempty"`       // 概括
	Preview     *string `json:"preview,omitempty"`       // 预览
}

type CreateEntityReqBodyBuilder

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

func NewCreateEntityReqBodyBuilder

func NewCreateEntityReqBodyBuilder() *CreateEntityReqBodyBuilder

func (*CreateEntityReqBodyBuilder) BlockTypeId

func (builder *CreateEntityReqBodyBuilder) BlockTypeId(blockTypeId string) *CreateEntityReqBodyBuilder

block 类型ID

示例值:blk_614c1c952f800014b27f87d6

func (*CreateEntityReqBodyBuilder) Build

func (*CreateEntityReqBodyBuilder) Extra

扩展字段

示例值:{}

func (*CreateEntityReqBodyBuilder) I18nPreview

func (builder *CreateEntityReqBodyBuilder) I18nPreview(i18nPreview string) *CreateEntityReqBodyBuilder

国际化预览

示例值:{"cn":"这是一个block","va": "this is a block"}

func (*CreateEntityReqBodyBuilder) I18nSummary

func (builder *CreateEntityReqBodyBuilder) I18nSummary(i18nSummary string) *CreateEntityReqBodyBuilder

国际化概括

示例值:{"cn":"这是一个block","va": "this is a block"}

func (*CreateEntityReqBodyBuilder) Owner

所有者

示例值:ou_fa7aa170f92d1615de63371ac425a767

func (*CreateEntityReqBodyBuilder) Preview

预览

示例值:{"cn":"这是一个block"}

func (*CreateEntityReqBodyBuilder) SourceData

func (builder *CreateEntityReqBodyBuilder) SourceData(sourceData string) *CreateEntityReqBodyBuilder

内容

示例值:{"data":"业务数据"}

func (builder *CreateEntityReqBodyBuilder) SourceLink(sourceLink string) *CreateEntityReqBodyBuilder

block原链接

示例值:{"_data":"https://docs.feishu.cn/block/78","_version":1}

func (*CreateEntityReqBodyBuilder) SourceMeta

func (builder *CreateEntityReqBodyBuilder) SourceMeta(sourceMeta string) *CreateEntityReqBodyBuilder

元数据

示例值:{"id":7090084015725608979}

func (*CreateEntityReqBodyBuilder) Summary

概括

示例值:{"cn":"这是一个block"}

func (*CreateEntityReqBodyBuilder) Title

标题

示例值:已阅block

func (*CreateEntityReqBodyBuilder) Version

版本号(自增值)

示例值:1

type CreateEntityReqBuilder

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

func NewCreateEntityReqBuilder

func NewCreateEntityReqBuilder() *CreateEntityReqBuilder

func (*CreateEntityReqBuilder) Body

开发者可以通过该接口将部分或全部数据存放于 BlockEntity。

func (*CreateEntityReqBuilder) Build

func (builder *CreateEntityReqBuilder) Build() *CreateEntityReq

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 CreateMessageReq

type CreateMessageReq struct {
	Message *Message `body:""`
	// contains filtered or unexported fields
}

type CreateMessageReqBuilder

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

func NewCreateMessageReqBuilder

func NewCreateMessageReqBuilder() *CreateMessageReqBuilder

func (*CreateMessageReqBuilder) Build

func (builder *CreateMessageReqBuilder) Build() *CreateMessageReq

func (*CreateMessageReqBuilder) Message

func (builder *CreateMessageReqBuilder) Message(message *Message) *CreateMessageReqBuilder

根据BlockID向指定用户列表推送协同数据。

type CreateMessageResp

type CreateMessageResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (*CreateMessageResp) Success

func (resp *CreateMessageResp) Success() bool

type DepartmentId added in v3.0.29

type DepartmentId struct {
	DepartmentId     *string `json:"department_id,omitempty"`      //
	OpenDepartmentId *string `json:"open_department_id,omitempty"` //
}

type DepartmentIdBuilder added in v3.0.29

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

func NewDepartmentIdBuilder added in v3.0.29

func NewDepartmentIdBuilder() *DepartmentIdBuilder

func (*DepartmentIdBuilder) Build added in v3.0.29

func (builder *DepartmentIdBuilder) Build() *DepartmentId

func (*DepartmentIdBuilder) DepartmentId added in v3.0.29

func (builder *DepartmentIdBuilder) DepartmentId(departmentId string) *DepartmentIdBuilder

示例值:

func (*DepartmentIdBuilder) OpenDepartmentId added in v3.0.29

func (builder *DepartmentIdBuilder) OpenDepartmentId(openDepartmentId string) *DepartmentIdBuilder

示例值:

type Entity

type Entity struct {
	BlockId     *string `json:"block_id,omitempty"`      // block 唯一标识
	Title       *string `json:"title,omitempty"`         // 标题
	BlockTypeId *string `json:"block_type_id,omitempty"` // block 类型ID
	SourceData  *string `json:"source_data,omitempty"`   // 业务数据 json
	SourceMeta  *string `json:"source_meta,omitempty"`   // 元数据 json
	Version     *string `json:"version,omitempty"`       // 版本号(自增)
	SourceLink  *string `json:"source_link,omitempty"`   // 链接
	Summary     *string `json:"summary,omitempty"`       // 总括
	Preview     *string `json:"preview,omitempty"`       // 预览
	I18nSummay  *string `json:"i18n_summay,omitempty"`   // 综述 json
	I18nPreview *string `json:"i18n_preview,omitempty"`  // 预览 json
	Owner       *string `json:"owner,omitempty"`         // 所有者
	Extra       *string `json:"extra,omitempty"`         // 扩展字段 json
}

type EntityBuilder

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

func NewEntityBuilder

func NewEntityBuilder() *EntityBuilder

func (*EntityBuilder) BlockId

func (builder *EntityBuilder) BlockId(blockId string) *EntityBuilder

block 唯一标识

示例值:7794641623571830467

func (*EntityBuilder) BlockTypeId

func (builder *EntityBuilder) BlockTypeId(blockTypeId string) *EntityBuilder

block 类型ID

示例值:blk_6204893fee000013739f5359

func (*EntityBuilder) Build

func (builder *EntityBuilder) Build() *Entity

func (*EntityBuilder) Extra

func (builder *EntityBuilder) Extra(extra string) *EntityBuilder

扩展字段 json

示例值:{}

func (*EntityBuilder) I18nPreview

func (builder *EntityBuilder) I18nPreview(i18nPreview string) *EntityBuilder

预览 json

示例值:{"cn":"这是一个block","va": "this is a block"}

func (*EntityBuilder) I18nSummay

func (builder *EntityBuilder) I18nSummay(i18nSummay string) *EntityBuilder

综述 json

示例值:{"cn":"这是一个block","va": "this is a block"}

func (*EntityBuilder) Owner

func (builder *EntityBuilder) Owner(owner string) *EntityBuilder

所有者

示例值:ou_fa7aa170f92d1615de63371ac425a767

func (*EntityBuilder) Preview

func (builder *EntityBuilder) Preview(preview string) *EntityBuilder

预览

示例值:{"cn":"这是一个block"}

func (*EntityBuilder) SourceData

func (builder *EntityBuilder) SourceData(sourceData string) *EntityBuilder

业务数据 json

示例值:{"data":"业务数据"}

func (builder *EntityBuilder) SourceLink(sourceLink string) *EntityBuilder

链接

示例值:{}

func (*EntityBuilder) SourceMeta

func (builder *EntityBuilder) SourceMeta(sourceMeta string) *EntityBuilder

元数据 json

示例值:{"bizId":"7094067849152430100"}

func (*EntityBuilder) Summary

func (builder *EntityBuilder) Summary(summary string) *EntityBuilder

总括

示例值:{"cn":"这是一个block"}

func (*EntityBuilder) Title

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

标题

示例值:已阅 block

func (*EntityBuilder) Version

func (builder *EntityBuilder) Version(version string) *EntityBuilder

版本号(自增)

示例值:1651716489253602

type Message

type Message struct {
	Body     *string  `json:"body,omitempty"`     // 协同数据内容
	Version  *string  `json:"version,omitempty"`  // 版本号(自增)
	BlockId  *string  `json:"block_id,omitempty"` // entity实体ID
	Resource *string  `json:"resource,omitempty"` // 业务来源
	OpenIds  []string `json:"open_ids,omitempty"` // 推送用户列表
}

type MessageBuilder

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

func NewMessageBuilder

func NewMessageBuilder() *MessageBuilder

func (*MessageBuilder) BlockId

func (builder *MessageBuilder) BlockId(blockId string) *MessageBuilder

entity实体ID

示例值:8116040162664047375

func (*MessageBuilder) Body

func (builder *MessageBuilder) Body(body string) *MessageBuilder

协同数据内容

示例值:{"id":"7094066727704592403","token":"test_123456789"}

func (*MessageBuilder) Build

func (builder *MessageBuilder) Build() *Message

func (*MessageBuilder) OpenIds

func (builder *MessageBuilder) OpenIds(openIds []string) *MessageBuilder

推送用户列表

示例值:["ou_fa7aa170f92d1615de63371ac425a767"]

func (*MessageBuilder) Resource

func (builder *MessageBuilder) Resource(resource string) *MessageBuilder

业务来源

示例值:read_block

func (*MessageBuilder) Version

func (builder *MessageBuilder) Version(version string) *MessageBuilder

版本号(自增)

示例值:1637565292196

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) BlockId

func (builder *UpdateEntityReqBuilder) BlockId(blockId string) *UpdateEntityReqBuilder

block唯一标识

示例值:7794641623571830467

func (*UpdateEntityReqBuilder) Build

func (builder *UpdateEntityReqBuilder) Build() *UpdateEntityReq

func (*UpdateEntityReqBuilder) Entity

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

开发者通过该接口可以更新存储在BlockEntity中的数据,并实时推送到端侧。

type UpdateEntityResp

type UpdateEntityResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (*UpdateEntityResp) Success

func (resp *UpdateEntityResp) Success() bool

type V2 added in v3.1.0

type V2 struct {
	Entity  *entity  // 服务端 API
	Message *message // 服务端 API
}

func New added in v3.1.0

func New(config *larkcore.Config) *V2

Jump to

Keyboard shortcuts

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