1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2025-06-08 23:46:12 +02:00

44 Commits

Author SHA1 Message Date
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
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
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
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
57876f99e3 Rename UpdatePageProps to UpdatePage 2021-12-22 14:33:58 +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
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
Lucas
a0926892c2
Add support for Page's Icon retrieval and updates (#21)
* Add support for Page's Icon retrieval and updates

* Add support for creating a page with an icon

* Fix tests, add icon validation

* Remove unknown icon type `file`

* Add icon support for "create database" endpoint

Co-authored-by: David Stotijn <dstotijn@gmail.com>
2021-12-09 17:57:08 +01:00
Nozomi Morimoto
135ef8c421
Support retrieve a block (#19)
* support retrieve block by id

* Update client.go

Co-authored-by: David Stotijn <dstotijn@gmail.com>

* Update client_test.go

Co-authored-by: David Stotijn <dstotijn@gmail.com>

* Update client.go

Co-authored-by: David Stotijn <dstotijn@gmail.com>

* fix find block's client test

Co-authored-by: David Stotijn <dstotijn@gmail.com>
2021-12-09 16:44:31 +01:00
David Stotijn
5e7e8ed54c Add "create database" endpoint 2021-07-20 22:50:53 +02:00
David Stotijn
ccd1bed559 Add URL field to Page type
Ref: https://developers.notion.com/changelog/page-objects-now-return-url
2021-07-20 20:57:27 +02:00
David Stotijn
597978fa0d Add Parent field to Database type
Ref: https://developers.notion.com/changelog/database-objects-now-return-parent
2021-07-20 20:48:35 +02:00
David Stotijn
bba60aaa7f Add tests for "search" endpoint 2021-05-27 20:50:34 +02:00
David Stotijn
132dd31efd Add tests for "list users" endpoint 2021-05-25 21:16:56 +02:00
David Stotijn
13330d6b29 Add tests for "retrieve a user" endpoint 2021-05-25 21:01:32 +02:00
Alexandre Falardeau
969ba033ff
Enable empty DatabaseQueryFilter (#15)
* Add test for "DatabaseQuery"

* Fix DatabaseQuery Filter field type

* Assert database query JSON omit logic in `Client` tests

Co-authored-by: Alexandre Falardeau <asfal@AsFal-Laptop.local>
Co-authored-by: David Stotijn <dstotijn@gmail.com>
2021-05-25 18:24:52 +02:00
David Stotijn
c675641a4c Fix database page property types
Fixes #12
2021-05-24 18:00:20 +02:00
sivchari
14d2e8c377
Add test case for creating page with database parent (#10)
* fix-json-tag

* fix test case name

* fix to use database_id

* fix client test

* fix typo

* remove .idea and fix test name

Co-authored-by: rita <kajirita2002@gmail.com>
2021-05-24 17:07:57 +02:00
David Stotijn
e5130d1fde Fix incorrect types for Formula, Relation and Rollup page props
Fixes #11
2021-05-24 16:33:03 +02:00
David Stotijn
7e83ec7aec Add custom type for Notion date properties with optional time 2021-05-23 14:02:17 +02:00
David Stotijn
00a77fe3a4 Add tests for "append block children" endpoint 2021-05-22 23:37:52 +02:00
David Stotijn
ebabf2cf70 Add tests for "retrieve block children" endpoint 2021-05-22 20:38:44 +02:00
David Stotijn
ee6b002819 Add tests for "update page properties" endpoint 2021-05-22 18:45:33 +02:00
David Stotijn
55aa9db5c7 Add tests for "create page" endpoint 2021-05-19 22:21:53 +02:00
David Stotijn
063bb045e4 Add tests for "find page by ID" endpoint 2021-05-19 20:46:50 +02:00
David Stotijn
d087d4b000 Add tests for "query database" endpoint 2021-05-18 21:19:03 +02:00
David Stotijn
0e0f6c77aa Add tests for NewClient and Client.FindDatabaseByID 2021-05-17 21:08:13 +02:00