notion_scribe 0.2.0 → 0.4.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 +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bd214887b39fb553f03f1744623d9daac170fa179599dd6e225cf85157eb768
4
- data.tar.gz: 6cc782616e45b134e8e9888e50af7dd7ac26127b596ffb5276f42fb979b41e32
3
+ metadata.gz: c237c67e41582dd13e9e16028a1a6f70fbf7d6c4076a7db9ce67e6bc1b5f08d0
4
+ data.tar.gz: 063bf8b07dccf0b95445eefcec3d6a3b780c3e16caa3c045d9b827c72e814cf5
5
5
  SHA512:
6
- metadata.gz: 271fae981bc7efc3fc7cb5fd786b6a050b73bdcc5c63de08f069d906bc882381c12246d72d1713b95dec661a19f04fd549d0cbbd8917eaca83f7004fe39a0033
7
- data.tar.gz: b2ff20b44dbe28b870c54e21be78753af54147799692f484247574044467092f94327a382ae97cf367d91ecdbd642dfce1086513880408d6cc96d38535d5549e
6
+ metadata.gz: '048ff3a0cc759586a8af9142a327d8ec74ad2de9d84d136e308733b9bfd9c85ffb8f54331f902909c11334419cb9a1e9997078f9a4b9a11dae734c3eb4c8f572'
7
+ data.tar.gz: 7c87a1a660f6a71b364778173e9e69eab7eef917589dda4d2f0f5a471b0f73688d9eb14fcfb30f4ec24aeab75e64979d47a7b7cecff4ec42340ce993467a7809
@@ -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.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Azzen Abidi
@@ -40,9 +40,9 @@ homepage: https://github.com/azzenabidi/notion_scribe
40
40
  licenses:
41
41
  - MIT
42
42
  metadata:
43
- homepage_uri: https://github.com/azzenabidi/notion_scribe
44
- source_code_uri: https://github.com/azzenabidi/notion_scribe
45
- documentation_uri: https://github.com/azzenabidi/notion_scribe
43
+ homepage_uri: https://github.com/azzenabidi/NotionScribe
44
+ source_code_uri: https://github.com/azzenabidi/NotionScribe
45
+ documentation_uri: https://github.com/azzenabidi/NotionScribe
46
46
  post_install_message:
47
47
  rdoc_options: []
48
48
  require_paths: