Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions service/comment/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ type CreateCommentReq struct {
apiReq *core.APIReq
}
type CreateCommentReqBody struct {
Content string `json:"content"`
Content string `json:"content"`
RichText []interface{} `json:"rich_text"`
}

type CreateCommentResp struct {
Expand Down Expand Up @@ -67,6 +68,10 @@ func (builder *CreateCommentReqBuilder) Content(content string) *CreateCommentRe
builder.body.Content = content
return builder
}
func (builder *CreateCommentReqBuilder) RichText(richText []interface{}) *CreateCommentReqBuilder {
builder.body.RichText = richText
return builder
}
func (builder *CreateCommentReqBuilder) Build() *CreateCommentReq {
req := &CreateCommentReq{}
req.apiReq = builder.apiReq
Expand Down Expand Up @@ -171,7 +176,8 @@ type UpdateCommentReq struct {
apiReq *core.APIReq
}
type UpdateCommentReqBody struct {
Content string `json:"content"`
Content string `json:"content"`
RichText []interface{} `json:"rich_text"`
}

type UpdateCommentResp struct {
Expand Down Expand Up @@ -213,6 +219,10 @@ func (builder *UpdateCommentReqBuilder) Content(content string) *UpdateCommentRe
builder.body.Content = content
return builder
}
func (builder *UpdateCommentReqBuilder) RichText(richText []interface{}) *UpdateCommentReqBuilder {
builder.body.RichText = richText
return builder
}
func (builder *UpdateCommentReqBuilder) Build() *UpdateCommentReq {
req := &UpdateCommentReq{}
req.apiReq = builder.apiReq
Expand Down