aboutsummaryrefslogtreecommitdiff
path: root/src/models/tests
diff options
context:
space:
mode:
authorGravatar Mark Cola <mark@doomsdaytuna.com> 2023-02-26 03:08:54 +1100
committerGravatar GitHub <noreply@github.com> 2023-02-25 08:08:54 -0800
commit1ba9846bad1d5c927e0d7658a59097992ef56b60 (patch)
treec1466c8e6ffc7162c864ff2a6e7c34c512e3c8f4 /src/models/tests
parent97764fb864ae1ab6046749fe5cabe00f508b0c61 (diff)
downloadnotion-1ba9846bad1d5c927e0d7658a59097992ef56b60.tar.gz
notion-1ba9846bad1d5c927e0d7658a59097992ef56b60.tar.zst
notion-1ba9846bad1d5c927e0d7658a59097992ef56b60.zip
Add new CreateBlock children to page creation (#49)
* extract block to mod * add CreateBlock struct, implement Into<CreateBlock> for Block, and add children to PageCreateRequest * move tests into block mod and fix up use
Diffstat (limited to 'src/models/tests')
-rw-r--r--src/models/tests/callout.json43
-rw-r--r--src/models/tests/emoji_object.json4
-rw-r--r--src/models/tests/external_file_object.json6
-rw-r--r--src/models/tests/file_object.json7
-rw-r--r--src/models/tests/heading_1.json175
-rw-r--r--src/models/tests/rich_text_mention_date_with_end_and_time.json2
6 files changed, 1 insertions, 236 deletions
diff --git a/src/models/tests/callout.json b/src/models/tests/callout.json
deleted file mode 100644
index e4d884d..0000000
--- a/src/models/tests/callout.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "object": "block",
- "id": "00e8829a-a7b8-4075-884a-8f53be145d2f",
- "created_time": "2022-05-13T20:08:00.000Z",
- "last_edited_time": "2022-05-13T20:08:00.000Z",
- "created_by": {
- "object": "user",
- "id": "e2507360-468c-4e0f-a928-7bbcbbb45353"
- },
- "last_edited_by": {
- "object": "user",
- "id": "e2507360-468c-4e0f-a928-7bbcbbb45353"
- },
- "has_children": true,
- "archived": false,
- "type": "callout",
- "callout": {
- "rich_text": [
- {
- "type": "text",
- "text": {
- "content": "Test callout",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": false,
- "underline": false,
- "code": false,
- "color": "default"
- },
- "plain_text": "Test callout",
- "href": null
- }
- ],
- "icon": {
- "type": "emoji",
- "emoji": "💡"
- },
- "color": "green"
- }
-} \ No newline at end of file
diff --git a/src/models/tests/emoji_object.json b/src/models/tests/emoji_object.json
deleted file mode 100644
index 1fb3b56..0000000
--- a/src/models/tests/emoji_object.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "type": "emoji",
- "emoji": "💡"
-} \ No newline at end of file
diff --git a/src/models/tests/external_file_object.json b/src/models/tests/external_file_object.json
deleted file mode 100644
index b5d4b85..0000000
--- a/src/models/tests/external_file_object.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "type": "external",
- "external": {
- "url": "https://nerdist.com/wp-content/uploads/2020/07/maxresdefault.jpg"
- }
-} \ No newline at end of file
diff --git a/src/models/tests/file_object.json b/src/models/tests/file_object.json
deleted file mode 100644
index 650cf9b..0000000
--- a/src/models/tests/file_object.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "type": "file",
- "file": {
- "url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/2703e742-ace5-428c-a74d-1c587ceddc32/DiRT_Rally.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220513%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220513T201035Z&X-Amz-Expires=3600&X-Amz-Signature=714b49bde0b499fb8f3aae1a88a8cbd374f2b09c1d128e91cac49e85ce0e00fb&X-Amz-SignedHeaders=host&x-id=GetObject",
- "expiry_time": "2022-05-13T21:10:35.817Z"
- }
-} \ No newline at end of file
diff --git a/src/models/tests/heading_1.json b/src/models/tests/heading_1.json
deleted file mode 100644
index ab2d7e1..0000000
--- a/src/models/tests/heading_1.json
+++ /dev/null
@@ -1,175 +0,0 @@
-{
- "object": "block",
- "id": "9e891834-6a03-475c-a2b8-421e17f0f3aa",
- "created_time": "2022-05-12T21:15:00.000Z",
- "last_edited_time": "2022-05-12T22:10:00.000Z",
- "created_by": {
- "object": "user",
- "id": "6419f912-5293-4ea8-b2c8-9c3ce44f90e3"
- },
- "last_edited_by": {
- "object": "user",
- "id": "6419f912-5293-4ea8-b2c8-9c3ce44f90e3"
- },
- "has_children": false,
- "archived": false,
- "type": "heading_1",
- "heading_1": {
- "rich_text": [
- {
- "type": "text",
- "text": {
- "content": "This",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": false,
- "underline": false,
- "code": true,
- "color": "default"
- },
- "plain_text": "This",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": " ",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": false,
- "underline": false,
- "code": false,
- "color": "default"
- },
- "plain_text": " ",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": "is",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": false,
- "underline": true,
- "code": false,
- "color": "default"
- },
- "plain_text": "is",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": " ",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": false,
- "underline": false,
- "code": false,
- "color": "default"
- },
- "plain_text": " ",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": "a",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": true,
- "strikethrough": false,
- "underline": true,
- "code": false,
- "color": "default"
- },
- "plain_text": "a",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": " ",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": false,
- "underline": false,
- "code": false,
- "color": "default"
- },
- "plain_text": " ",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": "Heading",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": true,
- "strikethrough": false,
- "underline": false,
- "code": false,
- "color": "default"
- },
- "plain_text": "Heading",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": " ",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": false,
- "underline": false,
- "code": false,
- "color": "default"
- },
- "plain_text": " ",
- "href": null
- },
- {
- "type": "text",
- "text": {
- "content": "1",
- "link": null
- },
- "annotations": {
- "bold": false,
- "italic": false,
- "strikethrough": true,
- "underline": false,
- "code": false,
- "color": "default"
- },
- "plain_text": "1",
- "href": null
- }
- ],
- "color": "default"
- }
-} \ No newline at end of file
diff --git a/src/models/tests/rich_text_mention_date_with_end_and_time.json b/src/models/tests/rich_text_mention_date_with_end_and_time.json
index 2070207..1f22c3c 100644
--- a/src/models/tests/rich_text_mention_date_with_end_and_time.json
+++ b/src/models/tests/rich_text_mention_date_with_end_and_time.json
@@ -18,4 +18,4 @@
},
"plain_text": "2022-04-16T12:00:00.000-04:00 → 2022-04-16T12:00:00.000-04:00",
"href": null
-} \ No newline at end of file
+}