notion_ruby_mapping 0.8.2 → 0.8.3
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: 88063ea97ad5859285370907bf40121b34718e0acae70f88b564fb35f646b416
|
4
|
+
data.tar.gz: 163da74c41fe90ac6209ffe80262ebcac6f8e54f0ebcba14739d3e6fd1feb6dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e49c0bf7bcff56d1657cc2668d407fcd3e79724526c46ab58f0845fbf5d18322eec830801eec5e6f06c3a6b9c489f7f2f9bff237331b9cbbc94698ef9af93a6
|
7
|
+
data.tar.gz: 4b1e62e1a61ac2cd7274a2cd8abb4aaa1f331fe8cd3e624031ba428ce8d619926dbae6806d20d30648301212ad44d21b7d0d737a055238575d873ece9d2cd6aa
|
@@ -94,7 +94,7 @@ module NotionRubyMapping
|
|
94
94
|
json: @nc.retrieve_comments_request(@id, query),
|
95
95
|
query: query).each do |comment|
|
96
96
|
dt_id = comment.discussion_id
|
97
|
-
dt = ans[dt_id] ||= DiscussionThread.new
|
97
|
+
dt = ans[dt_id] ||= DiscussionThread.new(dt_id)
|
98
98
|
dt.comments << comment
|
99
99
|
end
|
100
100
|
ans
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NotionRubyMapping
|
4
|
+
# Button property
|
5
|
+
class ButtonProperty < Property
|
6
|
+
TYPE = "button"
|
7
|
+
|
8
|
+
### Public announced methods
|
9
|
+
|
10
|
+
## Common methods
|
11
|
+
|
12
|
+
# @return [Boolean, Hash, nil]
|
13
|
+
def button
|
14
|
+
@json
|
15
|
+
end
|
16
|
+
|
17
|
+
# @param [String] name Property name
|
18
|
+
# @param [Boolean, Hash] json
|
19
|
+
def initialize(name, will_update: false, base_type: :page, property_id: nil, property_cache: nil, json: nil)
|
20
|
+
super name, will_update: will_update, base_type: base_type, property_id: property_id,
|
21
|
+
property_cache: property_cache
|
22
|
+
@json = json
|
23
|
+
end
|
24
|
+
|
25
|
+
## Page property only methods
|
26
|
+
|
27
|
+
# @return [Hash]
|
28
|
+
def property_values_json
|
29
|
+
assert_page_property __method__
|
30
|
+
{@name => {"button" => @json, "type" => "button"}}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/notion_ruby_mapping.rb
CHANGED
@@ -20,7 +20,7 @@ require_relative "notion_ruby_mapping/version"
|
|
20
20
|
date_property email_property files_property formula_property last_edited_by_property
|
21
21
|
last_edited_time_property multi_select_property number_property people_property phone_number_property
|
22
22
|
relation_property text_property rich_text_property rollup_property select_property status_property
|
23
|
-
title_property unique_id_property url_property],
|
23
|
+
title_property unique_id_property url_property button_property],
|
24
24
|
}.each do |key, values|
|
25
25
|
values.each do |klass|
|
26
26
|
require_relative "notion_ruby_mapping/#{key}/#{klass}"
|
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.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroyuki KOBAYASHI
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -231,6 +231,7 @@ files:
|
|
231
231
|
- lib/notion_ruby_mapping/objects/rich_text_object.rb
|
232
232
|
- lib/notion_ruby_mapping/objects/text_object.rb
|
233
233
|
- lib/notion_ruby_mapping/objects/user_object.rb
|
234
|
+
- lib/notion_ruby_mapping/properties/button_property.rb
|
234
235
|
- lib/notion_ruby_mapping/properties/checkbox_property.rb
|
235
236
|
- lib/notion_ruby_mapping/properties/created_by_property.rb
|
236
237
|
- lib/notion_ruby_mapping/properties/created_time_property.rb
|
@@ -279,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
280
|
- !ruby/object:Gem::Version
|
280
281
|
version: '0'
|
281
282
|
requirements: []
|
282
|
-
rubygems_version: 3.
|
283
|
+
rubygems_version: 3.5.3
|
283
284
|
signing_key:
|
284
285
|
specification_version: 4
|
285
286
|
summary: Notion Ruby mapping tool
|