notion-ruby-client 0.0.4 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Accept:
11
11
  - application/json; charset=utf-8
12
12
  User-Agent:
13
- - Notion Ruby Client/0.0.3
13
+ - Notion Ruby Client/0.0.4
14
14
  Authorization:
15
15
  - Bearer <NOTION_API_TOKEN>
16
16
  Content-Type:
@@ -23,7 +23,7 @@ http_interactions:
23
23
  message: OK
24
24
  headers:
25
25
  Date:
26
- - Sun, 25 Apr 2021 20:04:36 GMT
26
+ - Sun, 25 Apr 2021 21:00:00 GMT
27
27
  Content-Type:
28
28
  - application/json; charset=utf-8
29
29
  Transfer-Encoding:
@@ -31,10 +31,10 @@ http_interactions:
31
31
  Connection:
32
32
  - keep-alive
33
33
  Set-Cookie:
34
- - __cfduid=d4fa9d13076aae0f37b444c2ec003ded11619381075; expires=Tue, 25-May-21
35
- 20:04:35 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
36
- - notion_browser_id=2478d197-9f17-4b18-a0d8-5dcd1a19e9c1; Domain=www.notion.so;
37
- Path=/; Expires=Wed, 01 Jan 2053 21:51:16 GMT; Secure
34
+ - __cfduid=d2a4deba9394e6bd598acff673b4dc26a1619384399; expires=Tue, 25-May-21
35
+ 20:59:59 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
36
+ - notion_browser_id=8c6f9137-4edd-445e-8fa5-5377f08b641f; Domain=www.notion.so;
37
+ Path=/; Expires=Wed, 01 Jan 2053 22:46:40 GMT; Secure
38
38
  X-Dns-Prefetch-Control:
39
39
  - 'off'
40
40
  X-Frame-Options:
@@ -113,27 +113,23 @@ http_interactions:
113
113
  https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
114
114
  media-src https: http:'
115
115
  Etag:
116
- - W/"89d-C7cNeii1bERUyCX6H2tZiMoMFls"
116
+ - W/"256-GLaRmcrB0MMJquGjfaHJ2Jl5ecg"
117
117
  Vary:
118
118
  - Accept-Encoding
119
119
  Cf-Cache-Status:
120
120
  - DYNAMIC
121
121
  Cf-Request-Id:
122
- - '09ac3b56650000cd9b22041000000001'
122
+ - '09ac6e0e370000084718196000000001'
123
123
  Expect-Ct:
124
124
  - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
125
125
  Server:
126
126
  - cloudflare
127
127
  Cf-Ray:
128
- - 645a2e6a389dcd9b-CDG
128
+ - 645a7f9059c90847-CDG
129
129
  body:
130
130
  encoding: UTF-8
131
- string: '{"object":"list","results":[{"object":"page","id":"638fc449-b670-4c32-80da-da05fb833814","created_time":"2021-04-25T20:03:01.638Z","last_edited_time":"2021-04-25T20:03:01.639Z","parent":{"type":"database_id","database_id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"},"archived":false,"properties":{"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"Another
132
- Notion page","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Another
133
- Notion page","href":null}]}}},{"object":"page","id":"d064b09a-6505-4e7f-b90a-16d4e8ebfc4e","created_time":"2021-04-25T19:53:05.460Z","last_edited_time":"2021-04-25T19:53:05.461Z","parent":{"type":"database_id","database_id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"},"archived":false,"properties":{"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"Another
134
- Notion page","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Another
135
- Notion page","href":null}]}}},{"object":"page","id":"e9f5f54e-9df6-4ac6-b716-ecf671e3f8b6","created_time":"2021-01-30T11:03:23.390Z","last_edited_time":"2021-01-30T11:03:23.390Z","parent":{"type":"database_id","database_id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"},"archived":false,"properties":{"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"Hola!","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Hola!","href":null}]}}},{"object":"page","id":"723578f1-6e51-450c-8ee1-09158c19fd4c","created_time":"2021-01-29T20:50:51.917Z","last_edited_time":"2021-04-25T20:03:02.558Z","parent":{"type":"database_id","database_id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"},"archived":false,"properties":{"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"A
131
+ string: '{"object":"list","results":[{"object":"page","id":"723578f1-6e51-450c-8ee1-09158c19fd4c","created_time":"2021-01-29T20:50:51.917Z","last_edited_time":"2021-04-25T20:41:00.000Z","parent":{"type":"database_id","database_id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"},"archived":false,"properties":{"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"A
136
132
  Notion page","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
137
133
  Notion page","href":null}]}}}],"next_cursor":null,"has_more":false}'
138
- recorded_at: Sun, 25 Apr 2021 20:04:36 GMT
134
+ recorded_at: Sun, 25 Apr 2021 21:00:00 GMT
139
135
  recorded_with: VCR 6.0.0
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Accept:
11
11
  - application/json; charset=utf-8
12
12
  User-Agent:
13
- - Notion Ruby Client/0.0.3
13
+ - Notion Ruby Client/0.0.4
14
14
  Authorization:
15
15
  - Bearer <NOTION_API_TOKEN>
16
16
  Accept-Encoding:
@@ -21,7 +21,7 @@ http_interactions:
21
21
  message: OK
22
22
  headers:
23
23
  Date:
24
- - Sun, 25 Apr 2021 20:09:21 GMT
24
+ - Sun, 25 Apr 2021 21:00:01 GMT
25
25
  Content-Type:
26
26
  - application/json; charset=utf-8
27
27
  Transfer-Encoding:
@@ -29,10 +29,10 @@ http_interactions:
29
29
  Connection:
30
30
  - keep-alive
31
31
  Set-Cookie:
32
- - __cfduid=d0fdedee432debdb198a0e05698997ec21619381360; expires=Tue, 25-May-21
33
- 20:09:20 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
- - notion_browser_id=664add80-78f9-4e18-8ad6-831f5b390608; Domain=www.notion.so;
35
- Path=/; Expires=Wed, 01 Jan 2053 21:56:00 GMT; Secure
32
+ - __cfduid=d326d3c467290e4f1c0597df242b25b9b1619384400; expires=Tue, 25-May-21
33
+ 21:00:00 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
+ - notion_browser_id=61e2a7dc-f444-4bb2-b737-b42905b0993e; Domain=www.notion.so;
35
+ Path=/; Expires=Wed, 01 Jan 2053 22:46:41 GMT; Secure
36
36
  X-Dns-Prefetch-Control:
37
37
  - 'off'
38
38
  X-Frame-Options:
@@ -117,17 +117,17 @@ http_interactions:
117
117
  Cf-Cache-Status:
118
118
  - DYNAMIC
119
119
  Cf-Request-Id:
120
- - '09ac3faf2d0000ede7e3900000000001'
120
+ - '09ac6e14580000edff173c1000000001'
121
121
  Expect-Ct:
122
122
  - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
123
123
  Server:
124
124
  - cloudflare
125
125
  Cf-Ray:
126
- - 645a355eac3dede7-CDG
126
+ - 645a7f9a2b7aedff-CDG
127
127
  body:
128
128
  encoding: UTF-8
129
129
  string: '{"object":"list","results":[{"object":"database","id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c","created_time":"2021-01-29T20:50:51.917Z","last_edited_time":"2021-04-25T19:59:00.000Z","title":[{"type":"text","text":{"content":"A
130
130
  Notion database","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
131
131
  Notion database","href":null}],"properties":{"Tags":{"id":"yu]\\","type":"multi_select","multi_select":{"options":[]}},"Name":{"id":"title","type":"title","title":{}}}}],"next_cursor":null,"has_more":false}'
132
- recorded_at: Sun, 25 Apr 2021 20:09:21 GMT
132
+ recorded_at: Sun, 25 Apr 2021 21:00:01 GMT
133
133
  recorded_with: VCR 6.0.0
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Accept:
11
11
  - application/json; charset=utf-8
12
12
  User-Agent:
13
- - Notion Ruby Client/0.0.3
13
+ - Notion Ruby Client/0.0.4
14
14
  Authorization:
15
15
  - Bearer <NOTION_API_TOKEN>
16
16
  Accept-Encoding:
@@ -21,7 +21,7 @@ http_interactions:
21
21
  message: OK
22
22
  headers:
23
23
  Date:
24
- - Sun, 25 Apr 2021 20:03:04 GMT
24
+ - Sun, 25 Apr 2021 21:00:07 GMT
25
25
  Content-Type:
26
26
  - application/json; charset=utf-8
27
27
  Transfer-Encoding:
@@ -29,10 +29,10 @@ http_interactions:
29
29
  Connection:
30
30
  - keep-alive
31
31
  Set-Cookie:
32
- - __cfduid=d548926197da00cf5ff9e010d2a7d37501619380983; expires=Tue, 25-May-21
33
- 20:03:03 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
- - notion_browser_id=c3f29048-2337-489a-b2da-bc1bed72169f; Domain=www.notion.so;
35
- Path=/; Expires=Wed, 01 Jan 2053 21:49:44 GMT; Secure
32
+ - __cfduid=d39171e959e84215aa970aaf180c46f671619384406; expires=Tue, 25-May-21
33
+ 21:00:06 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
+ - notion_browser_id=6b34088b-dac3-4b26-a646-c4ce67357205; Domain=www.notion.so;
35
+ Path=/; Expires=Wed, 01 Jan 2053 22:46:47 GMT; Secure
36
36
  X-Dns-Prefetch-Control:
37
37
  - 'off'
38
38
  X-Frame-Options:
@@ -117,17 +117,17 @@ http_interactions:
117
117
  Cf-Cache-Status:
118
118
  - DYNAMIC
119
119
  Cf-Request-Id:
120
- - '09ac39ef4f0000cddf7cb32000000001'
120
+ - '09ac6e2b0400000847271f3000000001'
121
121
  Expect-Ct:
122
122
  - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
123
123
  Server:
124
124
  - cloudflare
125
125
  Cf-Ray:
126
- - 645a2c2bbc5ecddf-CDG
126
+ - 645a7fbe691e0847-CDG
127
127
  body:
128
128
  encoding: UTF-8
129
129
  string: '{"object":"list","results":[{"object":"user","id":"7ee614aa-0542-421d-b8aa-b14adf120642","name":"Arthur
130
130
  Levoyer","avatar_url":"https://lh6.googleusercontent.com/-Y62UK1QjtV8/AAAAAAAAAAI/AAAAAAAAACk/3PgWyczXM8o/photo.jpg?sz=50","type":"person","person":{"email":"arthurl@bam.tech"}},{"object":"user","id":"a8da8d30-c858-4c3d-87ad-3f2d477bd98d","name":"Nicolas
131
131
  Goutay","avatar_url":"https://s3-us-west-2.amazonaws.com/public.notion-static.com/5f9b5c65-a7ed-4fc5-983a-6c999b7c2208/Copy_of_P1222454.jpg","type":"person","person":{"email":"nicolas@orbit.love"}},{"object":"user","id":"f2e67536-c037-4dd5-97f5-8ed9d23a4dbd","name":"LeBot","avatar_url":null,"type":"bot","bot":{}}],"next_cursor":null,"has_more":false}'
132
- recorded_at: Sun, 25 Apr 2021 20:03:04 GMT
132
+ recorded_at: Sun, 25 Apr 2021 21:00:07 GMT
133
133
  recorded_with: VCR 6.0.0
@@ -2,18 +2,20 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: patch
5
- uri: https://api.notion.com/v1/pages/723578f1-6e51-450c-8ee1-09158c19fd4c
5
+ uri: https://api.notion.com/v1/pages/2de466f0-9861-466b-9bc2-c987965da010
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"id":"723578f1-6e51-450c-8ee1-09158c19fd4c","properties":{"Name":[{"text":{"content":"A
8
+ string: '{"id":"2de466f0-9861-466b-9bc2-c987965da010","properties":{"Name":[{"text":{"content":"A
9
9
  Notion page"}}]}}'
10
10
  headers:
11
11
  Accept:
12
12
  - application/json; charset=utf-8
13
13
  User-Agent:
14
- - Notion Ruby Client/0.0.3
14
+ - Notion Ruby Client/0.0.7
15
15
  Authorization:
16
16
  - Bearer <NOTION_API_TOKEN>
17
+ Notion-Version:
18
+ - '2021-05-13'
17
19
  Content-Type:
18
20
  - application/json
19
21
  Accept-Encoding:
@@ -24,18 +26,13 @@ http_interactions:
24
26
  message: OK
25
27
  headers:
26
28
  Date:
27
- - Sun, 25 Apr 2021 20:03:02 GMT
29
+ - Tue, 27 Jul 2021 10:35:00 GMT
28
30
  Content-Type:
29
31
  - application/json; charset=utf-8
30
32
  Transfer-Encoding:
31
33
  - chunked
32
34
  Connection:
33
35
  - keep-alive
34
- Set-Cookie:
35
- - __cfduid=de7229c444346afd88ac0b3f1a69b92761619380981; expires=Tue, 25-May-21
36
- 20:03:01 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
37
- - notion_browser_id=042a2e9b-cfd6-4e81-b8d1-50c93a7f9c77; Domain=www.notion.so;
38
- Path=/; Expires=Wed, 01 Jan 2053 21:49:42 GMT; Secure
39
36
  X-Dns-Prefetch-Control:
40
37
  - 'off'
41
38
  X-Frame-Options:
@@ -54,19 +51,21 @@ http_interactions:
54
51
  - 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
55
52
  https://apis.google.com https://api.amplitude.com https://widget.intercom.io
56
53
  https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
57
- https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
58
- https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
54
+ https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
55
+ https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
56
+ https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
59
57
  https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
60
58
  connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
61
59
  ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
62
60
  https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
63
61
  https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
64
62
  https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
65
- https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com
66
- https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
67
- https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
68
- font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
69
- img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
63
+ https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
64
+ https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
65
+ https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
66
+ https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
67
+ data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
68
+ data: blob: https: https://platform.twitter.com https://syndication.twitter.com
70
69
  https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
71
70
  ''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
72
71
  https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
@@ -75,19 +74,21 @@ http_interactions:
75
74
  - 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
76
75
  https://apis.google.com https://api.amplitude.com https://widget.intercom.io
77
76
  https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
78
- https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
79
- https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
77
+ https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
78
+ https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
79
+ https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
80
80
  https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
81
81
  connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
82
82
  ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
83
83
  https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
84
84
  https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
85
85
  https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
86
- https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com
87
- https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
88
- https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
89
- font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
90
- img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
86
+ https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
87
+ https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
88
+ https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
89
+ https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
90
+ data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
91
+ data: blob: https: https://platform.twitter.com https://syndication.twitter.com
91
92
  https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
92
93
  ''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
93
94
  https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
@@ -96,41 +97,44 @@ http_interactions:
96
97
  - 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
97
98
  https://apis.google.com https://api.amplitude.com https://widget.intercom.io
98
99
  https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
99
- https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
100
- https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
100
+ https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
101
+ https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
102
+ https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
101
103
  https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
102
104
  connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
103
105
  ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
104
106
  https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
105
107
  https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
106
108
  https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
107
- https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com
108
- https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
109
- https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
110
- font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
111
- img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
109
+ https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
110
+ https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
111
+ https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
112
+ https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
113
+ data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
114
+ data: blob: https: https://platform.twitter.com https://syndication.twitter.com
112
115
  https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
113
116
  ''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
114
117
  https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
115
118
  media-src https: http:'
119
+ Set-Cookie:
120
+ - notion_browser_id=f99aa1f5-ccb0-470c-bd6c-88df72efa0ff; Domain=www.notion.so;
121
+ Path=/; Expires=Fri, 04 Apr 2053 12:21:40 GMT; Secure
116
122
  Etag:
117
- - W/"214-NsvulZOLhJMm8amGC9TTFvwFx4A"
123
+ - W/"29f-c/my+Rhp7UJlgvokEWEpPC81fSM"
118
124
  Vary:
119
125
  - Accept-Encoding
120
126
  Cf-Cache-Status:
121
127
  - DYNAMIC
122
- Cf-Request-Id:
123
- - '09ac39e8c9000032c403b21000000001'
124
128
  Expect-Ct:
125
129
  - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
126
130
  Server:
127
131
  - cloudflare
128
132
  Cf-Ray:
129
- - 645a2c214c3732c4-CDG
133
+ - 675537ebed7dfbe8-KIX
130
134
  body:
131
135
  encoding: UTF-8
132
- string: '{"object":"page","id":"723578f1-6e51-450c-8ee1-09158c19fd4c","created_time":"2021-01-29T20:50:51.917Z","last_edited_time":"2021-04-25T20:03:02.558Z","parent":{"type":"database_id","database_id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"},"archived":false,"properties":{"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"A
136
+ string: '{"object":"page","id":"2de466f0-9861-466b-9bc2-c987965da010","created_time":"2021-07-26T15:05:00.000Z","last_edited_time":"2021-07-27T10:35:00.000Z","parent":{"type":"database_id","database_id":"ab7e7b22-7793-492a-ba6b-3295f8b19341"},"archived":false,"properties":{"Description":{"id":"ddNO","type":"rich_text","rich_text":[]},"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"A
133
137
  Notion page","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
134
- Notion page","href":null}]}}}'
135
- recorded_at: Sun, 25 Apr 2021 20:03:02 GMT
138
+ Notion page","href":null}]}},"url":"https://www.notion.so/A-Notion-page-2de466f09861466b9bc2c987965da010"}'
139
+ recorded_at: Tue, 27 Jul 2021 10:35:00 GMT
136
140
  recorded_with: VCR 6.0.0
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Accept:
11
11
  - application/json; charset=utf-8
12
12
  User-Agent:
13
- - Notion Ruby Client/0.0.3
13
+ - Notion Ruby Client/0.0.4
14
14
  Authorization:
15
15
  - Bearer <NOTION_API_TOKEN>
16
16
  Accept-Encoding:
@@ -21,7 +21,7 @@ http_interactions:
21
21
  message: OK
22
22
  headers:
23
23
  Date:
24
- - Sun, 25 Apr 2021 20:03:05 GMT
24
+ - Sun, 25 Apr 2021 21:00:08 GMT
25
25
  Content-Type:
26
26
  - application/json; charset=utf-8
27
27
  Transfer-Encoding:
@@ -29,10 +29,10 @@ http_interactions:
29
29
  Connection:
30
30
  - keep-alive
31
31
  Set-Cookie:
32
- - __cfduid=d80807191f23248080d5e5acd339ff1931619380984; expires=Tue, 25-May-21
33
- 20:03:04 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
- - notion_browser_id=245f5163-cb43-4cd1-b309-c20d51f87a2d; Domain=www.notion.so;
35
- Path=/; Expires=Wed, 01 Jan 2053 21:49:45 GMT; Secure
32
+ - __cfduid=d10c7505ad45dea19d885ea9e087883651619384407; expires=Tue, 25-May-21
33
+ 21:00:07 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
+ - notion_browser_id=6378e6be-b1ca-4d94-b556-8f3ae50d725f; Domain=www.notion.so;
35
+ Path=/; Expires=Wed, 01 Jan 2053 22:46:48 GMT; Secure
36
36
  X-Dns-Prefetch-Control:
37
37
  - 'off'
38
38
  X-Frame-Options:
@@ -117,16 +117,16 @@ http_interactions:
117
117
  Cf-Cache-Status:
118
118
  - DYNAMIC
119
119
  Cf-Request-Id:
120
- - '09ac39f2fa000032a76d159000000001'
120
+ - '09ac6e2e810000a843f7864000000001'
121
121
  Expect-Ct:
122
122
  - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
123
123
  Server:
124
124
  - cloudflare
125
125
  Cf-Ray:
126
- - 645a2c318c5332a7-CDG
126
+ - 645a7fc3fe50a843-CDG
127
127
  body:
128
128
  encoding: UTF-8
129
129
  string: '{"object":"user","id":"a8da8d30-c858-4c3d-87ad-3f2d477bd98d","name":"Nicolas
130
130
  Goutay","avatar_url":"https://s3-us-west-2.amazonaws.com/public.notion-static.com/5f9b5c65-a7ed-4fc5-983a-6c999b7c2208/Copy_of_P1222454.jpg","type":"person","person":{"email":"nicolas@orbit.love"}}'
131
- recorded_at: Sun, 25 Apr 2021 20:03:05 GMT
131
+ recorded_at: Sun, 25 Apr 2021 21:00:08 GMT
132
132
  recorded_with: VCR 6.0.0
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Accept:
11
11
  - application/json; charset=utf-8
12
12
  User-Agent:
13
- - Notion Ruby Client/0.0.3
13
+ - Notion Ruby Client/0.0.4
14
14
  Authorization:
15
15
  - Bearer <NOTION_API_TOKEN>
16
16
  Accept-Encoding:
@@ -21,7 +21,7 @@ http_interactions:
21
21
  message: OK
22
22
  headers:
23
23
  Date:
24
- - Sun, 25 Apr 2021 20:03:03 GMT
24
+ - Sun, 25 Apr 2021 21:00:06 GMT
25
25
  Content-Type:
26
26
  - application/json; charset=utf-8
27
27
  Transfer-Encoding:
@@ -29,10 +29,10 @@ http_interactions:
29
29
  Connection:
30
30
  - keep-alive
31
31
  Set-Cookie:
32
- - __cfduid=df6433c2b04ad3de33a87c90c3938496c1619380982; expires=Tue, 25-May-21
33
- 20:03:02 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
- - notion_browser_id=22526945-7fa7-4595-a66c-5d52409b40e5; Domain=www.notion.so;
35
- Path=/; Expires=Wed, 01 Jan 2053 21:49:43 GMT; Secure
32
+ - __cfduid=d8bd1f2559197f7cbe522dc8d2a13cf771619384405; expires=Tue, 25-May-21
33
+ 21:00:05 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
34
+ - notion_browser_id=a30325ff-c789-4096-a739-ba51b79eea5b; Domain=www.notion.so;
35
+ Path=/; Expires=Wed, 01 Jan 2053 22:46:46 GMT; Secure
36
36
  X-Dns-Prefetch-Control:
37
37
  - 'off'
38
38
  X-Frame-Options:
@@ -117,17 +117,17 @@ http_interactions:
117
117
  Cf-Cache-Status:
118
118
  - DYNAMIC
119
119
  Cf-Request-Id:
120
- - '09ac39ebfb00003312b4217000000001'
120
+ - '09ac6e27c800000853aea0c000000001'
121
121
  Expect-Ct:
122
122
  - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
123
123
  Server:
124
124
  - cloudflare
125
125
  Cf-Ray:
126
- - 645a2c2659783312-CDG
126
+ - 645a7fb93dac0853-CDG
127
127
  body:
128
128
  encoding: UTF-8
129
129
  string: '{"object":"list","results":[{"object":"user","id":"7ee614aa-0542-421d-b8aa-b14adf120642","name":"Arthur
130
130
  Levoyer","avatar_url":"https://lh6.googleusercontent.com/-Y62UK1QjtV8/AAAAAAAAAAI/AAAAAAAAACk/3PgWyczXM8o/photo.jpg?sz=50","type":"person","person":{"email":"arthurl@bam.tech"}},{"object":"user","id":"a8da8d30-c858-4c3d-87ad-3f2d477bd98d","name":"Nicolas
131
131
  Goutay","avatar_url":"https://s3-us-west-2.amazonaws.com/public.notion-static.com/5f9b5c65-a7ed-4fc5-983a-6c999b7c2208/Copy_of_P1222454.jpg","type":"person","person":{"email":"nicolas@orbit.love"}},{"object":"user","id":"f2e67536-c037-4dd5-97f5-8ed9d23a4dbd","name":"LeBot","avatar_url":null,"type":"bot","bot":{}}],"next_cursor":null,"has_more":false}'
132
- recorded_at: Sun, 25 Apr 2021 20:03:03 GMT
132
+ recorded_at: Sun, 25 Apr 2021 21:00:06 GMT
133
133
  recorded_with: VCR 6.0.0
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+ require 'spec_helper'
3
+
4
+ RSpec.describe Notion::Api::Endpoints::Blocks do
5
+ let(:client) { Notion::Client.new }
6
+ let(:page_id) { '723578f1-6e51-450c-8ee1-09158c19fd4c' }
7
+ let(:children) do
8
+ [
9
+ {
10
+ "object": 'block',
11
+ "type": 'heading_2',
12
+ "heading_2": {
13
+ "text": [{ "type": 'text', "text": { "content": 'Another Heading' } }]
14
+ }
15
+ }
16
+ ]
17
+ end
18
+
19
+ context 'blocks' do
20
+ it 'children', vcr: { cassette_name: 'block_children' } do
21
+ response = client.block_children(id: page_id)
22
+ expect(response.results.length).to be >= 1
23
+ expect(response.results[0].heading_1.text.first.plain_text).to eql 'A Header'
24
+ expect(response.results[1].paragraph.text.first.plain_text).to eql 'A paragraph'
25
+ end
26
+
27
+ it 'paginated children', vcr: { cassette_name: 'paginated_block_children' } do
28
+ children = []
29
+ client.block_children(id: page_id, page_size: 1) do |page|
30
+ children.concat page.results
31
+ end
32
+ expect(children.size).to be >= 1
33
+ end
34
+
35
+ it 'appends', vcr: { cassette_name: 'block_append_children' } do
36
+ response = client.block_append_children(id: page_id, children: children)
37
+ expect(response.id).to eql page_id
38
+ end
39
+ end
40
+ end