notion 1.0.1 → 1.0.2

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.
@@ -0,0 +1,16 @@
1
+ module NotionAPI
2
+
3
+ # Toggle block: best for storing children blocks
4
+ class ToggleBlock < BlockTemplate
5
+ @notion_type = 'toggle'
6
+ @type = 'toggle'
7
+
8
+ def type
9
+ NotionAPI::ToggleBlock.notion_type
10
+ end
11
+
12
+ class << self
13
+ attr_reader :notion_type, :type
14
+ end
15
+ end
16
+ end
@@ -127,7 +127,7 @@ module Utils
127
127
  }
128
128
  end
129
129
 
130
- def self.duplicate(block_type, block_title, block_id, new_block_id, user_notion_id, contents)
130
+ def self.duplicate(block_type, block_title, block_id, new_block_id, user_notion_id, contents, properties, formatting)
131
131
  # ! payload for duplicating a block. Most properties should be
132
132
  # ! inherited from the block class the method is invoked on.
133
133
  # ! block_type -> type of block that is being duplicated : ``cls``
@@ -150,9 +150,8 @@ module Utils
150
150
  id: new_block_id,
151
151
  version: 10,
152
152
  type: block_type,
153
- properties: {
154
- title: [[block_title]],
155
- },
153
+ properties: properties,
154
+ format: formatting,
156
155
  content: contents, # root-level blocks
157
156
  created_time: timestamp,
158
157
  last_edited_time: timestamp,
@@ -274,6 +273,14 @@ module Utils
274
273
  },
275
274
  }
276
275
  end
276
+ def self.add_emoji_icon(block_id, icon)
277
+ {
278
+ id: block_id,
279
+ table:"block",
280
+ path:["format","page_icon"],
281
+ command:"set","args": icon
282
+ }
283
+ end
277
284
  end
278
285
 
279
286
  class CollectionViewComponents
@@ -1,3 +1,3 @@
1
1
  module NotionAPI
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Murphy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-27 00:00:00.000000000 Z
11
+ date: 2020-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -113,6 +113,25 @@ files:
113
113
  - lib/notion_api/client.rb
114
114
  - lib/notion_api/core.rb
115
115
  - lib/notion_api/markdown.rb
116
+ - lib/notion_api/notion_types/bulleted_block.rb
117
+ - lib/notion_api/notion_types/callout_block.rb
118
+ - lib/notion_api/notion_types/code_block.rb
119
+ - lib/notion_api/notion_types/collection_view_blocks.rb
120
+ - lib/notion_api/notion_types/column_list_block.rb
121
+ - lib/notion_api/notion_types/divider_block.rb
122
+ - lib/notion_api/notion_types/header_block.rb
123
+ - lib/notion_api/notion_types/image_block.rb
124
+ - lib/notion_api/notion_types/latex_block.rb
125
+ - lib/notion_api/notion_types/numbered_block.rb
126
+ - lib/notion_api/notion_types/page_block.rb
127
+ - lib/notion_api/notion_types/quote_block.rb
128
+ - lib/notion_api/notion_types/sub_header_block.rb
129
+ - lib/notion_api/notion_types/sub_sub_header.rb
130
+ - lib/notion_api/notion_types/table_of_contents_block.rb
131
+ - lib/notion_api/notion_types/template.rb
132
+ - lib/notion_api/notion_types/text_block.rb
133
+ - lib/notion_api/notion_types/todo_block.rb
134
+ - lib/notion_api/notion_types/toggle_block.rb
116
135
  - lib/notion_api/utils.rb
117
136
  - lib/notion_api/version.rb
118
137
  homepage: https://danmurphy1217.github.io/notion-ruby/