<aside> 👉

Links (Object base class)

CommentObject

FileObject

TextObject

EmojiObject

FileUploadObject

UserObject

EquationObject

MentionObject

Notion Ruby Mapping Public API Reference

</aside>

<aside> â„šī¸

↑ Table of Contents

</aside>

1. Class methods

self.find(comment_id) → CommentObject

CommentObject.find(comment_id) creates a CommentObject with retrieving comment API. The created object has comment information generated from the JSON response.

co = CommentObject.find "37921658-0840-45ae-924a-d9ce1d60375b"
# => #<NotionRubyMapping::CommentObject:...>
co.full_text
# => "comment for edit text"

2. Instance methods

full_text → String

full_text returns the concatenated plain text of rich text objects.

co = CommentObject.new text_objects: "ABC"
# => #<NotionRubyMapping::CommentObject:...
co.full_text
# => "ABC"

rich_text_objects=(text_objects) → String

rich_text_objects= updates comment by rich text.

co = CommentObject.find "37921658-0840-45ae-924a-d9ce1d60375b"
co.rich_text_objects = "update comment by rich text"
co.save
co.full_text
# => "update comment by rich text"

markdown=(markdown) → String

markdown= updates comment by markdown.

co = CommentObject.find "37921658-0840-45ae-924a-d9ce1d60375b"
co.markdown = "update comment by markdown"
co.save
co.full_text
# => "update comment by markdown"