notion_scribe 0.3.0 → 0.5.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/notion_template.rb +3 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 544a2ccc8814f0a86e75bda2deadb7981bdba383912487e7558e9f49ebcfe971
4
- data.tar.gz: 68d29e62744a356c93de4e3c638f2449508085caf497e04a33a8907ba0372177
3
+ metadata.gz: 252aa1e4a40bd670c751fabb8e8a41e64ceedbbaf034ec3f819b3df21eea678e
4
+ data.tar.gz: '09b457501d6a922120741be10db7bebc96f0be6bdbc56c4cd5e260ead88f9a71'
5
5
  SHA512:
6
- metadata.gz: 4f70b0a85ef9732bd2bbfbe631ccb8ae188c974e352f464b78be84c20f0b9b7f42ddb98d30cc3e59190bc83c867ff5272a835bd065226f444fc94dac06fd9b04
7
- data.tar.gz: 4b9acc20e31af888b2f5528b1ad02f3fc23ade63076d3aabc38adc9af109f0bd8301f5003875cdb74b87ae615d6571eeb0aff49e8b98894dc2abad1f1cd09a5a
6
+ metadata.gz: a725f8deff4cd4b91178e0f4923cc0f5ff07057e7301709308d82a5a4aa65cd02e7dc7ee083d7084978d5b4177dc99684f33295e3d4177bf2166260535834e0d
7
+ data.tar.gz: fd18cef07df39f02450d66ef8697aec40f95db9dc4371c7485b4d30a2fb25d2bf3933264bc6f2fb28debe460592865197e7b2fa6a36942e00f6f2dbca46af60f
@@ -1,8 +1,9 @@
1
1
  class NotionTemplate
2
- def initialize(client, title, &block)
2
+ def initialize(client, title, parent_id:, &block)
3
3
  @client = client
4
4
  @title = title
5
5
  @blocks = []
6
+ @parent_id = parent_id
6
7
  instance_eval(&block)
7
8
  send_to_notion
8
9
  end
@@ -182,7 +183,7 @@ class NotionTemplate
182
183
 
183
184
  def send_to_notion
184
185
  page_content = {
185
- parent: { page_id: "PAGE_ID_HERE" }, # or database_id as necessary
186
+ parent: { page_id: @parent_id }, # Using the dynamic parent_id
186
187
  properties: {
187
188
  title: [
188
189
  {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notion_scribe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Azzen Abidi
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.7
19
+ version: '0.22'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.13.7
26
+ version: '0.22'
27
27
  description: This gem allows users to create and customize Notion pages with a simple
28
28
  Ruby DSL.
29
29
  email: