<aside> 👉 Links (Object base class)

CommentObject

FileObject

UserObject

EmojiObject

MentionObject

EquationObject

TextObject

Notion Ruby Mapping Public API Reference

</aside>

<aside> ℹī¸ ↑ Table of Contents

</aside>

1. Singleton methods

user_object(user_id_or_uo)

uo = UserObject.user_object "a_user_id"
=> #<NotionRubyMapping::UserObject:0x000000010465e348 @json={}, @user_id="a_user_id", @will_update=false>

uo2 = UserObject.text_object uo
=> #<NotionRubyMapping::UserObject:0x000000010465e348 @json={}, @user_id="a_user_id", @will_update=false>
# to and to2 are equal objects.

↑ Table of Contents

2. Instance methods

user_id=(str)

user_id= sets str to user_id, and set will_update flag to true.

uo = UserObject.user_object "a_user_id"
=> #<NotionRubyMapping::UserObject:0x000000010465e348 @json={}, @user_id="a_user_id", @will_update=false>

uo.user_id = "new_user_id"
=> "new_user_id"
uo
=> #<NotionRubyMapping::UserObject:0x000000010465e348 @json={}, @user_id="new_user_id", @will_update=true>

↑ Table of Contents