1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2024-11-28 08:58:51 +02:00
Commit Graph

108 Commits

Author SHA1 Message Date
bassettb
b461ef999d
Gracefully handle JSON decode error on erroneous API response (#51) 2023-02-28 19:08:08 +01:00
bassettb
c6f2e5b343
Don't panic when unmarshaling blocks (#50)
* don't panic

* Block() returns err

* Rework unknown block type logic, add tests

---------

Co-authored-by: David Stotijn <dstotijn@gmail.com>
2023-02-21 20:28:33 +01:00
David Stotijn
87a7d4c3cd
Add support for audio block type (#48)
Closes #47
2022-11-18 19:55:59 +01:00
bassettb
de8cab86ca
add block parent (#45)
* add block parent

* Use consts for parent types in page unmarshal

Co-authored-by: David Stotijn <dstotijn@gmail.com>
2022-10-27 11:45:25 +02:00
David Stotijn
ebaecd3a42
Fix typo 2022-09-11 20:30:04 +02:00
David Stotijn
ac5fdc2f75
Add testing via GitHub Actions 2022-09-11 20:22:32 +02:00
David Stotijn
bf5c41b906
Update README 2022-09-07 22:16:39 +02:00
David Stotijn
ce521c80bd
Revert page prop changes (#44)
Ref: https://developers.notion.com/changelog/changes-for-august-31-2022
2022-09-07 21:39:44 +02:00
David Stotijn
ed23d080ce
Add support for new Comments endpoints (#43)
* Add `Client.CreateComment` method

* Add `Client.FindCommentsByBlockID` method
2022-09-04 20:48:51 +02:00
David Stotijn
1b585c661f
Add is_toggleable behavior to heading_{1,2,3} block types (#41) 2022-09-03 21:57:36 +02:00
David Stotijn
e399b8957d
Update status property type behavior (#40)
Ref: https://developers.notion.com/changelog/changes-for-august-15-28-2022
2022-09-03 21:52:15 +02:00
David Stotijn
a543e3936b
Add example for Client.CreatePage method (#39)
* Add example for `Client.CreatePage` method

* Add examples reference in README
2022-09-03 21:03:02 +02:00
David Stotijn
5545ade9a7
Fix type of column_list.children (#38) 2022-09-03 20:53:05 +02:00
David Stotijn
8c9d956f3d
Update to API version 2022-06-28 (#37) 2022-08-20 20:49:58 +02:00
David Stotijn
99f28cc1f4
Fix relation property config types 2022-08-20 16:13:16 +02:00
David Stotijn
eebbce29a5
Add missing block_id parent type 2022-08-20 15:40:41 +02:00
David Stotijn
f4c5cf83ad
Add support for status property (#35)
Ref: https://developers.notion.com/changelog/changes-for-june-20-
2022-08-14 21:29:20 +02:00
David Stotijn
b6e74a67d2
Add description field to Database struct type (#34) 2022-08-14 19:40:30 +02:00
David Stotijn
df02b41099
Add support for is_inline for databases (#33) 2022-08-14 11:43:19 +02:00
David Stotijn
8519feef2f
Add support for template mentions in RichText values (#32) 2022-08-14 11:15:15 +02:00
David Stotijn
51efbea8fd
Add support for block colors (#31)
Ref: https://developers.notion.com/changelog/block-colors-are-now-supported-in-the-api
2022-08-13 21:34:29 +02:00
David Stotijn
1320ab0ee0
Add created_by and last_edited_by support, add archived for DB (#30) 2022-08-13 19:46:00 +02:00
David Stotijn
264ec2c28f
Handle changes introduced in version 2022-02-22 (#29)
Ref: https://developers.notion.com/changelog/releasing-notion-version-2022-02-22
2022-08-13 12:28:49 +02:00
David Stotijn
a7179ae969
Add parent property to blocks (#28) 2022-08-12 21:03:51 +02:00
David Stotijn
8c9f519e73
Convert Block from a struct to an interface (#27) 2022-08-12 19:49:36 +02:00
David Stotijn
1bd13b04cf
Remove faulty title param from UpdatePageParams
Fixes #23
2022-03-21 21:07:35 +01:00
David Stotijn
5af1e9a5a0
Add caption property to code block type
Ref: https://developers.notion.com/changelog/caption-property-is-now-supported-in-code-block-type
2022-01-31 18:01:24 +01:00
saltbo
63149ba664
feat: add table block support (#24) 2022-01-31 17:55:58 +01:00
David Stotijn
97f740c22e Add missing endpoints to README 2021-12-22 14:41:52 +01:00
David Stotijn
57876f99e3 Rename UpdatePageProps to UpdatePage 2021-12-22 14:33:58 +01:00
David Stotijn
a14508d7c8 Add time_zone field to date prop type 2021-12-22 14:29:37 +01:00
David Stotijn
1284493f68 Fix failing test 2021-12-22 14:29:13 +01:00
David Stotijn
664a94d62b Add "Retrieve a page property item" endpoint 2021-12-22 14:04:22 +01:00
David Stotijn
4c24b26ca4 Add "Retrieve your token's bot user" endpoint 2021-12-22 12:01:52 +01:00
David Stotijn
a5a67fad92 Add URL field to Database struct 2021-12-22 11:18:42 +01:00
David Stotijn
49ec529a16 Add "Delete block" endpoint 2021-12-22 11:12:11 +01:00
David Stotijn
50cebe29de Add file metadata to file DB page prop 2021-12-20 20:12:44 +01:00
David Stotijn
a2507e3ec1 Add cover support, improve icon support 2021-12-20 19:54:19 +01:00
David Stotijn
2bfbe21a0d Fix response format of "Append Block Children" endpoint
See: https://developers.notion.com/changelog/notion-version-2021-08-16#append-block-children-returns-a-list-of-blocks
2021-12-20 17:01:06 +01:00
David Stotijn
f62677ef09 Add "Update database" endpoint 2021-12-20 11:11:03 +01:00
David Stotijn
2ebac2e1b2 Add "Update block" endpoint 2021-12-18 14:19:51 +01:00
David Stotijn
801d8f7cc9 Add missing currency enum values for NumberFormat 2021-12-17 18:17:46 +01:00
David Stotijn
00679f7e8f Fix casing of NumberFormatYuan const 2021-12-17 18:14:31 +01:00
David Stotijn
74663ed1b6 Enumerate rollup function values 2021-12-17 18:12:14 +01:00
David Stotijn
52e133b4e8 Add name field to DB (page) props 2021-12-17 18:03:53 +01:00
David Stotijn
9fc88f927b Add template block type 2021-12-17 17:45:21 +01:00
David Stotijn
c4783f697b Add synced_block block type 2021-12-17 16:21:59 +01:00
David Stotijn
6b75ac5688 Add link_to_page block type 2021-12-17 13:21:51 +01:00
David Stotijn
8e676e0df8 Add support for link_preview block type and rich text mentions 2021-12-17 13:14:55 +01:00
David Stotijn
1ee9d231ed Add table_of_contents, breadcrumb and column (list) block types 2021-12-17 13:05:55 +01:00