-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hkob/development
add 'after' option to append_block_chidren, etc
- Loading branch information
Showing
15 changed files
with
306 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
module NotionRubyMapping | ||
VERSION = "0.8.1" | ||
VERSION = "0.8.2" | ||
NOTION_VERSION = "2022-06-28" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"object": "list", | ||
"results": [ | ||
{ | ||
"object": "block", | ||
"id": "67c0e9bd-bbe4-456c-8731-27763d7fa580", | ||
"parent": { | ||
"type": "block_id", | ||
"block_id": "03f6460c-2673-4af4-84b9-5de15082d84e" | ||
}, | ||
"created_time": "2023-07-12T12:20:00.000Z", | ||
"last_edited_time": "2023-07-12T12:20:00.000Z", | ||
"created_by": { | ||
"object": "user", | ||
"id": "40673a87-d8ed-41e0-aa55-7f0e8ace24cd" | ||
}, | ||
"last_edited_by": { | ||
"object": "user", | ||
"id": "40673a87-d8ed-41e0-aa55-7f0e8ace24cd" | ||
}, | ||
"has_children": false, | ||
"archived": false, | ||
"type": "numbered_list_item", | ||
"numbered_list_item": { | ||
"rich_text": [ | ||
{ | ||
"type": "text", | ||
"text": { | ||
"content": "Middle block", | ||
"link": null | ||
}, | ||
"annotations": { | ||
"bold": false, | ||
"italic": false, | ||
"strikethrough": false, | ||
"underline": false, | ||
"code": false, | ||
"color": "default" | ||
}, | ||
"plain_text": "Middle block", | ||
"href": null | ||
} | ||
], | ||
"color": "default" | ||
} | ||
}, | ||
{ | ||
"object": "block", | ||
"id": "28b314c5-d2b5-4df8-8760-95b67a673d69", | ||
"parent": { | ||
"type": "block_id", | ||
"block_id": "03f6460c-2673-4af4-84b9-5de15082d84e" | ||
}, | ||
"created_time": "2023-07-12T09:44:00.000Z", | ||
"last_edited_time": "2023-07-12T09:44:00.000Z", | ||
"created_by": { | ||
"object": "user", | ||
"id": "2200a911-6a96-44bb-bd38-6bfb1e01b9f6" | ||
}, | ||
"last_edited_by": { | ||
"object": "user", | ||
"id": "2200a911-6a96-44bb-bd38-6bfb1e01b9f6" | ||
}, | ||
"has_children": false, | ||
"archived": false, | ||
"type": "numbered_list_item", | ||
"numbered_list_item": { | ||
"rich_text": [ | ||
{ | ||
"type": "text", | ||
"text": { | ||
"content": "Last block", | ||
"link": null | ||
}, | ||
"annotations": { | ||
"bold": false, | ||
"italic": false, | ||
"strikethrough": false, | ||
"underline": false, | ||
"code": false, | ||
"color": "default" | ||
}, | ||
"plain_text": "Last block", | ||
"href": null | ||
} | ||
], | ||
"color": "default" | ||
} | ||
} | ||
], | ||
"next_cursor": null, | ||
"has_more": false, | ||
"type": "block", | ||
"block": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
curl -X PATCH 'https://api.notion.com/v1/blocks/03f6460c26734af484b95de15082d84e/children' \ | ||
-H 'Notion-Version: 2022-06-28' \ | ||
-H 'Authorization: Bearer '"$NOTION_API_KEY"'' \ | ||
-H 'Content-Type: application/json' \ | ||
--data '{"children":[{"type":"numbered_list_item","object":"block","numbered_list_item":{"rich_text":[{"type":"text","text":{"content":"Middle block","link":null},"plain_text":"Middle block","href":null}],"color":"default"}}], "after": "263f125b179e4e4f996a1eff812d9d3d"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"object": "block", | ||
"id": "03f6460c-2673-4af4-84b9-5de15082d84e", | ||
"parent": { | ||
"type": "page_id", | ||
"page_id": "c01166c6-13ae-45cb-b968-18b4ef2f5a77" | ||
}, | ||
"created_time": "2023-07-11T23:24:00.000Z", | ||
"last_edited_time": "2023-07-12T12:20:00.000Z", | ||
"created_by": { | ||
"object": "user", | ||
"id": "2200a911-6a96-44bb-bd38-6bfb1e01b9f6" | ||
}, | ||
"last_edited_by": { | ||
"object": "user", | ||
"id": "40673a87-d8ed-41e0-aa55-7f0e8ace24cd" | ||
}, | ||
"has_children": true, | ||
"archived": false, | ||
"type": "callout", | ||
"callout": { | ||
"rich_text": [ | ||
{ | ||
"type": "text", | ||
"text": { | ||
"content": "Append after test callout", | ||
"link": null | ||
}, | ||
"annotations": { | ||
"bold": false, | ||
"italic": false, | ||
"strikethrough": false, | ||
"underline": false, | ||
"code": false, | ||
"color": "default" | ||
}, | ||
"plain_text": "Append after test callout", | ||
"href": null | ||
} | ||
], | ||
"icon": { | ||
"type": "emoji", | ||
"emoji": "💡" | ||
}, | ||
"color": "gray_background" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl 'https://api.notion.com/v1/blocks/03f6460c26734af484b95de15082d84e' \ | ||
-H 'Authorization: Bearer '"$NOTION_API_KEY"'' \ | ||
-H 'Notion-Version: 2022-06-28' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"object": "block", | ||
"id": "263f125b-179e-4e4f-996a-1eff812d9d3d", | ||
"parent": { | ||
"type": "block_id", | ||
"block_id": "03f6460c-2673-4af4-84b9-5de15082d84e" | ||
}, | ||
"created_time": "2023-07-12T09:42:00.000Z", | ||
"last_edited_time": "2023-07-12T09:44:00.000Z", | ||
"created_by": { | ||
"object": "user", | ||
"id": "2200a911-6a96-44bb-bd38-6bfb1e01b9f6" | ||
}, | ||
"last_edited_by": { | ||
"object": "user", | ||
"id": "2200a911-6a96-44bb-bd38-6bfb1e01b9f6" | ||
}, | ||
"has_children": false, | ||
"archived": false, | ||
"type": "numbered_list_item", | ||
"numbered_list_item": { | ||
"rich_text": [ | ||
{ | ||
"type": "text", | ||
"text": { | ||
"content": "First block", | ||
"link": null | ||
}, | ||
"annotations": { | ||
"bold": false, | ||
"italic": false, | ||
"strikethrough": false, | ||
"underline": false, | ||
"code": false, | ||
"color": "default" | ||
}, | ||
"plain_text": "First block", | ||
"href": null | ||
} | ||
], | ||
"color": "default" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl 'https://api.notion.com/v1/blocks/263f125b179e4e4f996a1eff812d9d3d' \ | ||
-H 'Authorization: Bearer '"$NOTION_API_KEY"'' \ | ||
-H 'Notion-Version: 2022-06-28' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.