👉
Links (Object base class)
1. Singleton methods
user_object(user_id_or_uo)
- [PARAM] user_id_or_uo
- user_id (String)
- existing UserObject
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.
2. Instance methods
user_id=(str)
- [PARAM] str
str like as “🎂” (String)
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>