notion_ruby_mapping 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eebf655e3f67cf1b8efd0b2e143550004b3d6277bb5bc9071d496c2814df2538
|
4
|
+
data.tar.gz: e940233fed8804f92318434feaa99160f7ce3288b2e68e45eb09e3f4763f6efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa4de2b82ccb55272ae93e36900036a666b5197671aedc7b54fe141d4a9bdfaaa7acd180765bf2e3948bf8dd2030f0e05aa4adfa4bd9539eb152c7e64f42ccb8
|
7
|
+
data.tar.gz: 8f91372152624213a0fdde007c8d8a6fe3a0a9b76a9d17b0c8b123020aac498ab0a1f5e6a5187170c7666a87b21ddb2f2f0c68911074941b0918a2320a545d19
|
@@ -65,6 +65,26 @@ module NotionRubyMapping
|
|
65
65
|
@database_title ||= RichTextArray.new "title", json: (self["title"]), will_update: new_record?
|
66
66
|
end
|
67
67
|
|
68
|
+
# @return [NotionRubyMapping::RichTextArray]
|
69
|
+
def description
|
70
|
+
RichTextArray.new "description", json: self["description"]
|
71
|
+
end
|
72
|
+
|
73
|
+
# @param [RichTextArray, String, Array<String>, RichTextObject, Array<RichTextObject>] text_info
|
74
|
+
def description=(text_info)
|
75
|
+
@payload.description = text_info
|
76
|
+
end
|
77
|
+
|
78
|
+
# @return [Boolean]
|
79
|
+
def is_inline
|
80
|
+
self["is_inline"]
|
81
|
+
end
|
82
|
+
|
83
|
+
# @param [Boolean] flag
|
84
|
+
def is_inline=(flag)
|
85
|
+
@payload.is_inline = flag
|
86
|
+
end
|
87
|
+
|
68
88
|
# @return [Hash] created json for property schemas (for create database)
|
69
89
|
def property_schema_json
|
70
90
|
@payload.property_schema_json @property_cache, database_title
|
@@ -18,6 +18,16 @@ module NotionRubyMapping
|
|
18
18
|
@json = {}
|
19
19
|
end
|
20
20
|
|
21
|
+
def description=(text_objects)
|
22
|
+
rta = RichTextArray.rich_text_array "description", text_objects
|
23
|
+
@json.merge!(rta.update_property_schema_json true)
|
24
|
+
end
|
25
|
+
|
26
|
+
# @param [Boolean] flag
|
27
|
+
def is_inline=(flag)
|
28
|
+
@json["is_inline"] = flag
|
29
|
+
end
|
30
|
+
|
21
31
|
# @param [Hash] json
|
22
32
|
def merge_property(json)
|
23
33
|
@json["properties"] ||= {}
|
@@ -72,6 +72,7 @@ module NotionRubyMapping
|
|
72
72
|
map(&:text).join ""
|
73
73
|
end
|
74
74
|
|
75
|
+
# @param [RichTextArray, String, Array<String>, RichTextObject, Array<RichTextObject>] text_info
|
75
76
|
def rich_text_objects=(text_info)
|
76
77
|
@will_update = true
|
77
78
|
@rich_text_objects = if text_info.is_a? RichTextArray
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notion_ruby_mapping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroyuki KOBAYASHI
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|