-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
is_*_rich_text_item_response
helpers
- Loading branch information
Showing
6 changed files
with
464 additions
and
0 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
132 changes: 132 additions & 0 deletions
132
tests/cassettes/test_is_equation_rich_text_item_response.yaml
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,132 @@ | ||
interactions: | ||
- request: | ||
body: '{"parent": {"page_id": "95ba0116-6776-4c19-9e45-54e77415f03b"}, "properties": | ||
{"title": [{"text": {"content": "Test 2023-11-04 15:00:23.538078"}}]}, "children": | ||
[]}' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '164' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: POST | ||
uri: https://api.notion.com/v1/pages | ||
response: | ||
content: '{"object":"page","id":"cd594ab2-60e6-4080-bc1a-10e2b4ff7791","created_time":"2023-11-04T14:00:00.000Z","last_edited_time":"2023-11-04T14:00:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"cover":null,"icon":null,"parent":{"type":"page_id","page_id":"95ba0116-6776-4c19-9e45-54e77415f03b"},"archived":false,"properties":{"title":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"Test | ||
2023-11-04 15:00:23.538078","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Test | ||
2023-11-04 15:00:23.538078","href":null}]}},"url":"https://www.notion.so/Test-2023-11-04-15-00-23-538078-cd594ab260e64080bc1a10e2b4ff7791","public_url":null,"request_id":"52f4fe8a-e18a-4308-9059-510d5494cbd6"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '{"children": [{"paragraph": {"rich_text": [{"equation": {"expression": | ||
"E = mc^2"}}]}}]}' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '88' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: PATCH | ||
uri: https://api.notion.com/v1/blocks/cd594ab2-60e6-4080-bc1a-10e2b4ff7791/children | ||
response: | ||
content: '{"object":"list","results":[{"object":"block","id":"3fa611db-c220-4be9-bed8-39294e4e6058","parent":{"type":"page_id","page_id":"cd594ab2-60e6-4080-bc1a-10e2b4ff7791"},"created_time":"2023-11-04T14:00:00.000Z","last_edited_time":"2023-11-04T14:00:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":false,"type":"paragraph","paragraph":{"rich_text":[{"type":"equation","equation":{"expression":"E | ||
= mc^2"},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"E | ||
= mc^2","href":null}],"color":"default"}}],"next_cursor":null,"has_more":false,"type":"block","block":{},"request_id":"5c6b693f-ac6b-4b2b-b2d0-d459867f3fec"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: GET | ||
uri: https://api.notion.com/v1/blocks/3fa611db-c220-4be9-bed8-39294e4e6058 | ||
response: | ||
content: '{"object":"block","id":"3fa611db-c220-4be9-bed8-39294e4e6058","parent":{"type":"page_id","page_id":"cd594ab2-60e6-4080-bc1a-10e2b4ff7791"},"created_time":"2023-11-04T14:00:00.000Z","last_edited_time":"2023-11-04T14:00:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":false,"type":"paragraph","paragraph":{"rich_text":[{"type":"equation","equation":{"expression":"E | ||
= mc^2"},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"E | ||
= mc^2","href":null}],"color":"default"},"request_id":"8565fe0a-6cb1-4419-a573-5e1734e0a20b"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: DELETE | ||
uri: https://api.notion.com/v1/blocks/3fa611db-c220-4be9-bed8-39294e4e6058 | ||
response: | ||
content: '{"object":"block","id":"3fa611db-c220-4be9-bed8-39294e4e6058","parent":{"type":"page_id","page_id":"cd594ab2-60e6-4080-bc1a-10e2b4ff7791"},"created_time":"2023-11-04T14:00:00.000Z","last_edited_time":"2023-11-04T14:00:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":true,"type":"paragraph","paragraph":{"rich_text":[{"type":"equation","equation":{"expression":"E | ||
= mc^2"},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"E | ||
= mc^2","href":null}],"color":"default"},"request_id":"3f45697d-e41d-4594-9316-664ad4218563"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: DELETE | ||
uri: https://api.notion.com/v1/blocks/cd594ab2-60e6-4080-bc1a-10e2b4ff7791 | ||
response: | ||
content: '{"object":"block","id":"cd594ab2-60e6-4080-bc1a-10e2b4ff7791","parent":{"type":"page_id","page_id":"95ba0116-6776-4c19-9e45-54e77415f03b"},"created_time":"2023-11-04T14:00:00.000Z","last_edited_time":"2023-11-04T14:00:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":true,"type":"child_page","child_page":{"title":"Test | ||
2023-11-04 15:00:23.538078"},"request_id":"4cce807e-f329-40b7-89e4-86f0375434c6"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
version: 1 |
126 changes: 126 additions & 0 deletions
126
tests/cassettes/test_is_mention_rich_text_item_response.yaml
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,126 @@ | ||
interactions: | ||
- request: | ||
body: '{"parent": {"page_id": "95ba0116-6776-4c19-9e45-54e77415f03b"}, "properties": | ||
{"title": [{"text": {"content": "Test 2023-11-04 14:57:12.900460"}}]}, "children": | ||
[]}' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '164' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: POST | ||
uri: https://api.notion.com/v1/pages | ||
response: | ||
content: '{"object":"page","id":"b039260c-e8d3-4425-84bc-103f66ed886d","created_time":"2023-11-04T13:57:00.000Z","last_edited_time":"2023-11-04T13:57:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"cover":null,"icon":null,"parent":{"type":"page_id","page_id":"95ba0116-6776-4c19-9e45-54e77415f03b"},"archived":false,"properties":{"title":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"Test | ||
2023-11-04 14:57:12.900460","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Test | ||
2023-11-04 14:57:12.900460","href":null}]}},"url":"https://www.notion.so/Test-2023-11-04-14-57-12-900460-b039260ce8d3442584bc103f66ed886d","public_url":null,"request_id":"530b78a7-8893-4e46-ae0e-aa4870706dab"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '{"children": [{"paragraph": {"rich_text": [{"mention": {"type": "date", | ||
"date": {"start": "2022-12-16", "end": null}}}]}}]}' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '123' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: PATCH | ||
uri: https://api.notion.com/v1/blocks/b039260c-e8d3-4425-84bc-103f66ed886d/children | ||
response: | ||
content: '{"object":"list","results":[{"object":"block","id":"c4f72aa9-81c5-4c6a-82b3-aa93c30822cd","parent":{"type":"page_id","page_id":"b039260c-e8d3-4425-84bc-103f66ed886d"},"created_time":"2023-11-04T13:57:00.000Z","last_edited_time":"2023-11-04T13:57:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":false,"type":"paragraph","paragraph":{"rich_text":[{"type":"mention","mention":{"type":"date","date":{"start":"2022-12-16","end":null,"time_zone":null}},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"2022-12-16","href":null}],"color":"default"}}],"next_cursor":null,"has_more":false,"type":"block","block":{},"request_id":"274a2342-f82d-48a1-8679-4625580e5045"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: GET | ||
uri: https://api.notion.com/v1/blocks/c4f72aa9-81c5-4c6a-82b3-aa93c30822cd | ||
response: | ||
content: '{"object":"block","id":"c4f72aa9-81c5-4c6a-82b3-aa93c30822cd","parent":{"type":"page_id","page_id":"b039260c-e8d3-4425-84bc-103f66ed886d"},"created_time":"2023-11-04T13:57:00.000Z","last_edited_time":"2023-11-04T13:57:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":false,"type":"paragraph","paragraph":{"rich_text":[{"type":"mention","mention":{"type":"date","date":{"start":"2022-12-16","end":null,"time_zone":null}},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"2022-12-16","href":null}],"color":"default"},"request_id":"b361a703-25c5-4d0d-96f4-6323869598c4"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: DELETE | ||
uri: https://api.notion.com/v1/blocks/c4f72aa9-81c5-4c6a-82b3-aa93c30822cd | ||
response: | ||
content: '{"object":"block","id":"c4f72aa9-81c5-4c6a-82b3-aa93c30822cd","parent":{"type":"page_id","page_id":"b039260c-e8d3-4425-84bc-103f66ed886d"},"created_time":"2023-11-04T13:57:00.000Z","last_edited_time":"2023-11-04T13:57:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":true,"type":"paragraph","paragraph":{"rich_text":[{"type":"mention","mention":{"type":"date","date":{"start":"2022-12-16","end":null,"time_zone":null}},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"2022-12-16","href":null}],"color":"default"},"request_id":"7a51618e-0673-4a93-b238-de2e77dc37e9"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
- request: | ||
body: '' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
authorization: | ||
- secret_... | ||
connection: | ||
- keep-alive | ||
host: | ||
- api.notion.com | ||
notion-version: | ||
- '2022-06-28' | ||
method: DELETE | ||
uri: https://api.notion.com/v1/blocks/b039260c-e8d3-4425-84bc-103f66ed886d | ||
response: | ||
content: '{"object":"block","id":"b039260c-e8d3-4425-84bc-103f66ed886d","parent":{"type":"page_id","page_id":"95ba0116-6776-4c19-9e45-54e77415f03b"},"created_time":"2023-11-04T13:57:00.000Z","last_edited_time":"2023-11-04T13:57:00.000Z","created_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"has_children":false,"archived":true,"type":"child_page","child_page":{"title":"Test | ||
2023-11-04 14:57:12.900460"},"request_id":"526bd552-2829-4893-bd0f-64929b344f50"}' | ||
headers: {} | ||
http_version: HTTP/1.1 | ||
status_code: 200 | ||
version: 1 |
Oops, something went wrong.