<aside> π Links (Controller base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> βΉοΈ β Table of Contents
</aside>
Some properties and Database title have an array of RichTextObject. RichTextArray
is the delegate class for the array of RichTextObject. Moreover, some methods of TitleProperty, RichTextProperty and Database.title delegate to the included RichTextArray.
[PARAM] key keyword for JSON
[PARAM(optional)] text_info
<aside> π The following objects are used for this argument.
RichTextArray can be created by a String, some Strings, a RichTextObject and some RichTextObjects. RichTextArray has Array of RichTextObjects. String values will convert to simple TextObjects. If string_contes is already RichTextArray, this method returns the given the RichTextArray.
nullString = RichTextArray.rich_text_array "title"
aString = RichTextArray.rich_text_array "title", "A string"
twoStrings = RichTextArray.rich_text_array "title", %W[ABC\\\\n DEF]
aTextObject = RichTextArray.rich_text_array "title", TextObject.new("A TextObject")
textMentionObjects = RichTextArray.rich_text_array "title", [TextObject.new("A TextObject"), MentionObject.new(user_id: "ABC")]
richTextArray = RichTextArray.rich_text_array "title", textMentionObjects # richTextArray == textMentionObjects
<<
appends a text or RichTextObject. String value will convert to simple TextObject.
db.database_title << "title"
db.database_title << MentionObject.new(user_id: "AAA")
self[pos]
returns a RichTextObject.