notion-ruby-client 0.0.7 → 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.
- checksums.yaml +4 -4
- data/.rspec_status +17 -16
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +2 -2
- data/README.md +65 -13
- data/lib/notion/api/endpoints/databases.rb +22 -0
- data/lib/notion/api/endpoints/pages.rb +1 -1
- data/lib/notion/version.rb +2 -2
- data/spec/fixtures/notion/create_database.yml +140 -0
- data/spec/fixtures/notion/create_page.yml +43 -37
- data/spec/fixtures/notion/page.yml +40 -36
- data/spec/fixtures/notion/update_page.yml +41 -37
- data/spec/notion/api/endpoints/databases_spec.rb +26 -0
- data/spec/notion/api/endpoints/pages_spec.rb +19 -8
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 819fe0911c48a9f09bb4a8e7c92b1c36f77fc61878944df6da74bfab0bd3a9cf
|
4
|
+
data.tar.gz: 2c93279f5b48004a93b92e0a1268712472ac7e5534dcb57ab8003dd8507676ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d4a7d57457cdbb614eb9600b14e5f4460d0672631ff10f2525b87783f587ed251e4b3e3fc33d04420fe06cd086536b17acbfe008595a2f404cb513887365bdc
|
7
|
+
data.tar.gz: ffdab9a3e8962cfd8f21fd75a274020eba721963d12b7cfbb010eff711e7b7ef7945b2763a8db6f75130f53dc2408e7eafb3f95b9d0e3281cbb2b041cfd57e19
|
data/.rspec_status
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
---------------------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/notion/api/endpoints/blocks_spec.rb[1:1:1] | passed | 0.
|
4
|
-
./spec/notion/api/endpoints/blocks_spec.rb[1:1:2] | passed | 0.
|
5
|
-
./spec/notion/api/endpoints/blocks_spec.rb[1:1:3] | passed | 0.
|
6
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:1] | passed | 0.
|
7
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:2] | passed | 0.
|
8
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:3] | passed | 0.
|
9
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:4] | passed | 0.
|
10
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:5] | passed | 0.
|
11
|
-
./spec/notion/api/endpoints/
|
12
|
-
./spec/notion/api/endpoints/pages_spec.rb[1:1:
|
13
|
-
./spec/notion/api/endpoints/pages_spec.rb[1:1:
|
14
|
-
./spec/notion/api/endpoints/
|
15
|
-
./spec/notion/api/endpoints/users_spec.rb[1:1:
|
16
|
-
./spec/notion/api/endpoints/users_spec.rb[1:1:
|
17
|
-
./spec/notion/
|
18
|
-
./spec/notion/
|
3
|
+
./spec/notion/api/endpoints/blocks_spec.rb[1:1:1] | passed | 0.03873 seconds |
|
4
|
+
./spec/notion/api/endpoints/blocks_spec.rb[1:1:2] | passed | 0.0494 seconds |
|
5
|
+
./spec/notion/api/endpoints/blocks_spec.rb[1:1:3] | passed | 0.02657 seconds |
|
6
|
+
./spec/notion/api/endpoints/databases_spec.rb[1:1:1] | passed | 0.02458 seconds |
|
7
|
+
./spec/notion/api/endpoints/databases_spec.rb[1:1:2] | passed | 0.02588 seconds |
|
8
|
+
./spec/notion/api/endpoints/databases_spec.rb[1:1:3] | passed | 0.0268 seconds |
|
9
|
+
./spec/notion/api/endpoints/databases_spec.rb[1:1:4] | passed | 0.01669 seconds |
|
10
|
+
./spec/notion/api/endpoints/databases_spec.rb[1:1:5] | passed | 0.01661 seconds |
|
11
|
+
./spec/notion/api/endpoints/databases_spec.rb[1:1:6] | passed | 0.0173 seconds |
|
12
|
+
./spec/notion/api/endpoints/pages_spec.rb[1:1:1] | passed | 0.01728 seconds |
|
13
|
+
./spec/notion/api/endpoints/pages_spec.rb[1:1:2] | passed | 0.01656 seconds |
|
14
|
+
./spec/notion/api/endpoints/pages_spec.rb[1:1:3] | passed | 0.0206 seconds |
|
15
|
+
./spec/notion/api/endpoints/users_spec.rb[1:1:1] | passed | 0.02992 seconds |
|
16
|
+
./spec/notion/api/endpoints/users_spec.rb[1:1:2] | passed | 0.02664 seconds |
|
17
|
+
./spec/notion/api/endpoints/users_spec.rb[1:1:3] | passed | 0.02533 seconds |
|
18
|
+
./spec/notion/config_spec.rb[1:1:1] | passed | 0.00016 seconds |
|
19
|
+
./spec/notion/version_spec.rb[1:1] | passed | 0.00016 seconds |
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
notion-ruby-client (0.0.
|
4
|
+
notion-ruby-client (0.0.8)
|
5
5
|
faraday (>= 1.0)
|
6
6
|
faraday_middleware
|
7
7
|
hashie
|
@@ -9,7 +9,7 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: http://rubygems.org/
|
11
11
|
specs:
|
12
|
-
addressable (2.
|
12
|
+
addressable (2.8.0)
|
13
13
|
public_suffix (>= 2.0.2, < 5.0)
|
14
14
|
ast (2.4.2)
|
15
15
|
crack (0.4.5)
|
data/README.md
CHANGED
@@ -44,7 +44,7 @@ For Rails projects, the snippet above would go to `config/application.rb`.
|
|
44
44
|
|
45
45
|
### API Client
|
46
46
|
|
47
|
-
####
|
47
|
+
#### Instantiating a new Notion API client
|
48
48
|
|
49
49
|
```ruby
|
50
50
|
client = Notion::Client.new
|
@@ -133,26 +133,78 @@ client.databases_list do |page|
|
|
133
133
|
end
|
134
134
|
```
|
135
135
|
|
136
|
+
Create a Database:
|
137
|
+
|
138
|
+
```ruby
|
139
|
+
title = [
|
140
|
+
{
|
141
|
+
"type": "text",
|
142
|
+
"text": {
|
143
|
+
"content": "Grocery List",
|
144
|
+
"link": nil
|
145
|
+
}
|
146
|
+
}
|
147
|
+
],
|
148
|
+
properties = {
|
149
|
+
"Name": {
|
150
|
+
"title": {}
|
151
|
+
},
|
152
|
+
"Description": {
|
153
|
+
"rich_text": {}
|
154
|
+
},
|
155
|
+
"In stock": {
|
156
|
+
"checkbox": {}
|
157
|
+
},
|
158
|
+
"Food group": {
|
159
|
+
"select": {
|
160
|
+
"options": [
|
161
|
+
{
|
162
|
+
"name": "🥦Vegetable",
|
163
|
+
"color": "green"
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"name": "🍎Fruit",
|
167
|
+
"color": "red"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"name": "💪Protein",
|
171
|
+
"color": "yellow"
|
172
|
+
}
|
173
|
+
]
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
client.create_database(
|
178
|
+
parent: { page_id: '98ad959b-2b6a-4774-80ee-00246fb0ea9b' },
|
179
|
+
title: title,
|
180
|
+
properties: properties
|
181
|
+
)
|
182
|
+
```
|
183
|
+
|
136
184
|
#### Pages
|
137
185
|
|
138
186
|
Create a page:
|
139
187
|
|
140
188
|
```ruby
|
141
189
|
properties = {
|
142
|
-
"Name":
|
143
|
-
|
144
|
-
|
145
|
-
"
|
190
|
+
"Name": {
|
191
|
+
"title": [
|
192
|
+
{
|
193
|
+
"text": {
|
194
|
+
"content": "Tuscan Kale"
|
195
|
+
}
|
146
196
|
}
|
147
|
-
|
148
|
-
|
149
|
-
"Description":
|
150
|
-
|
151
|
-
|
152
|
-
"
|
197
|
+
]
|
198
|
+
},
|
199
|
+
"Description": {
|
200
|
+
"rich_text": [
|
201
|
+
{
|
202
|
+
"text": {
|
203
|
+
"content": "A dark green leafy vegetable"
|
204
|
+
}
|
153
205
|
}
|
154
|
-
|
155
|
-
|
206
|
+
]
|
207
|
+
},
|
156
208
|
"Food group": {
|
157
209
|
"name": "🥦 Vegetable"
|
158
210
|
},
|
@@ -18,6 +18,28 @@ module Notion
|
|
18
18
|
get("databases/#{options[:id]}")
|
19
19
|
end
|
20
20
|
|
21
|
+
#
|
22
|
+
# Creates a new database in the specified page.
|
23
|
+
#
|
24
|
+
# @option options [Object] :parent
|
25
|
+
# Parent of the database, which is always going to be a page.
|
26
|
+
#
|
27
|
+
# @option options [Object] :title
|
28
|
+
# Title of this database.
|
29
|
+
#
|
30
|
+
# @option options [Object] :properties
|
31
|
+
# Property schema of database.
|
32
|
+
# The keys are the names of properties as they appear in Notion and the values are
|
33
|
+
# property schema objects. Property Schema Object is a metadata that controls
|
34
|
+
# how a database property behaves, e.g. {"checkbox": {}}.
|
35
|
+
# Each database must have exactly one database property schema object of type "title".
|
36
|
+
def create_database(options = {})
|
37
|
+
throw ArgumentError.new('Required arguments :parent.page_id missing') if options.dig(:parent, :page_id).nil?
|
38
|
+
throw ArgumentError.new('Required arguments :title missing') if options.dig(:title).nil?
|
39
|
+
throw ArgumentError.new('Required arguments :properties missing') if options.dig(:properties).nil?
|
40
|
+
post('databases', options)
|
41
|
+
end
|
42
|
+
|
21
43
|
#
|
22
44
|
# Gets a paginated array of Page object s contained in the requested database,
|
23
45
|
# filtered and ordered according to the filter and sort objects provided in the request.
|
@@ -36,7 +36,7 @@ module Notion
|
|
36
36
|
# specific to the property type, e.g. {"checkbox": true}.
|
37
37
|
#
|
38
38
|
# @option options [Object] :children
|
39
|
-
# An optional array of Block objects representing the Page’s
|
39
|
+
# An optional array of Block objects representing the Page’s content
|
40
40
|
def create_page(options = {})
|
41
41
|
throw ArgumentError.new('Required arguments :parent.database_id missing') if options.dig(:parent, :database_id).nil?
|
42
42
|
post("pages", options)
|
data/lib/notion/version.rb
CHANGED
@@ -0,0 +1,140 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.notion.com/v1/databases
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"parent":{"page_id":"7cbf38f8-5921-4422-bd3f-a647c3e2544b"},"title":[{"text":{"content":"Another
|
9
|
+
Notion database"}}],"properties":{"Name":{"title":{}}}}'
|
10
|
+
headers:
|
11
|
+
Accept:
|
12
|
+
- application/json; charset=utf-8
|
13
|
+
User-Agent:
|
14
|
+
- Notion Ruby Client/0.0.7
|
15
|
+
Authorization:
|
16
|
+
- Bearer <NOTION_API_TOKEN>
|
17
|
+
Notion-Version:
|
18
|
+
- '2021-05-13'
|
19
|
+
Content-Type:
|
20
|
+
- application/json
|
21
|
+
Accept-Encoding:
|
22
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
23
|
+
response:
|
24
|
+
status:
|
25
|
+
code: 200
|
26
|
+
message: OK
|
27
|
+
headers:
|
28
|
+
Date:
|
29
|
+
- Sat, 17 Jul 2021 14:31:14 GMT
|
30
|
+
Content-Type:
|
31
|
+
- application/json; charset=utf-8
|
32
|
+
Transfer-Encoding:
|
33
|
+
- chunked
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
X-Dns-Prefetch-Control:
|
37
|
+
- 'off'
|
38
|
+
X-Frame-Options:
|
39
|
+
- SAMEORIGIN
|
40
|
+
Strict-Transport-Security:
|
41
|
+
- max-age=5184000; includeSubDomains
|
42
|
+
X-Download-Options:
|
43
|
+
- noopen
|
44
|
+
X-Content-Type-Options:
|
45
|
+
- nosniff
|
46
|
+
X-Xss-Protection:
|
47
|
+
- 1; mode=block
|
48
|
+
Referrer-Policy:
|
49
|
+
- same-origin
|
50
|
+
Content-Security-Policy:
|
51
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
52
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
53
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.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
|
57
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
58
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
59
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
60
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
61
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
62
|
+
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.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
|
69
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
70
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
71
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
72
|
+
media-src https: http:'
|
73
|
+
X-Content-Security-Policy:
|
74
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
75
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
76
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.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
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
81
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
82
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
83
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
84
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
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://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
|
92
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
93
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
94
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
95
|
+
media-src https: http:'
|
96
|
+
X-Webkit-Csp:
|
97
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
98
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
99
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.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
|
103
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
104
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
105
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
106
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
107
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
108
|
+
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.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
|
115
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
116
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
117
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
118
|
+
media-src https: http:'
|
119
|
+
Set-Cookie:
|
120
|
+
- notion_browser_id=1321c2b7-4961-4cf4-85ef-270bafdb51bc; Domain=www.notion.so;
|
121
|
+
Path=/; Expires=Tue, 25 Mar 2053 16:17:53 GMT; Secure
|
122
|
+
Etag:
|
123
|
+
- W/"21e-7XBsaKuQCGE+thrJWkIkgE7BKQ4"
|
124
|
+
Vary:
|
125
|
+
- Accept-Encoding
|
126
|
+
Cf-Cache-Status:
|
127
|
+
- DYNAMIC
|
128
|
+
Expect-Ct:
|
129
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
130
|
+
Server:
|
131
|
+
- cloudflare
|
132
|
+
Cf-Ray:
|
133
|
+
- 67042c309bd9fcf1-KIX
|
134
|
+
body:
|
135
|
+
encoding: UTF-8
|
136
|
+
string: '{"object":"database","id":"c392d86e-2e58-40c6-8f4d-28af74e32dfe","created_time":"2021-07-17T14:31:00.000Z","last_edited_time":"2021-07-17T14:31:00.000Z","title":[{"type":"text","text":{"content":"Another
|
137
|
+
Notion database","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Another
|
138
|
+
Notion database","href":null}],"properties":{"Name":{"id":"title","type":"title","title":{}}},"parent":{"type":"page_id","page_id":"7cbf38f8-5921-4422-bd3f-a647c3e2544b"}}'
|
139
|
+
recorded_at: Sat, 17 Jul 2021 14:31:14 GMT
|
140
|
+
recorded_with: VCR 6.0.0
|
@@ -5,16 +5,18 @@ http_interactions:
|
|
5
5
|
uri: https://api.notion.com/v1/pages
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"parent":{"database_id":"
|
9
|
-
Notion page"}}]},"children":[{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"A
|
8
|
+
string: '{"parent":{"database_id":"ab7e7b22-7793-492a-ba6b-3295f8b19341"},"properties":{"Name":{"title":[{"text":{"content":"Another
|
9
|
+
Notion page"}}]},"Description":{"rich_text":[{"text":{"content":"Page description"}}]}},"children":[{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"A
|
10
10
|
heading"}}]}}]}'
|
11
11
|
headers:
|
12
12
|
Accept:
|
13
13
|
- application/json; charset=utf-8
|
14
14
|
User-Agent:
|
15
|
-
- Notion Ruby Client/0.0.
|
15
|
+
- Notion Ruby Client/0.0.7
|
16
16
|
Authorization:
|
17
17
|
- Bearer <NOTION_API_TOKEN>
|
18
|
+
Notion-Version:
|
19
|
+
- '2021-05-13'
|
18
20
|
Content-Type:
|
19
21
|
- application/json
|
20
22
|
Accept-Encoding:
|
@@ -25,18 +27,13 @@ http_interactions:
|
|
25
27
|
message: OK
|
26
28
|
headers:
|
27
29
|
Date:
|
28
|
-
-
|
30
|
+
- Tue, 27 Jul 2021 10:39:49 GMT
|
29
31
|
Content-Type:
|
30
32
|
- application/json; charset=utf-8
|
31
33
|
Transfer-Encoding:
|
32
34
|
- chunked
|
33
35
|
Connection:
|
34
36
|
- keep-alive
|
35
|
-
Set-Cookie:
|
36
|
-
- __cfduid=d7d668416316cb8c5e07208d366ff04e41619384404; expires=Tue, 25-May-21
|
37
|
-
21:00:04 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
38
|
-
- notion_browser_id=9fd03492-d88e-4997-9345-b510ed98532b; Domain=www.notion.so;
|
39
|
-
Path=/; Expires=Wed, 01 Jan 2053 22:46:44 GMT; Secure
|
40
37
|
X-Dns-Prefetch-Control:
|
41
38
|
- 'off'
|
42
39
|
X-Frame-Options:
|
@@ -55,19 +52,21 @@ http_interactions:
|
|
55
52
|
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
56
53
|
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
57
54
|
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
58
|
-
https://analytics.pgncs.notion.so https://
|
59
|
-
https://
|
55
|
+
https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
|
56
|
+
https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
|
57
|
+
https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
|
60
58
|
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
61
59
|
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
62
60
|
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
63
61
|
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
64
62
|
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
65
63
|
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
66
|
-
https://api.segment.io https://api.pgncs.notion.so https://
|
67
|
-
https://
|
68
|
-
https://
|
69
|
-
|
70
|
-
|
64
|
+
https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
|
65
|
+
https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
|
66
|
+
https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
|
67
|
+
https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
|
68
|
+
data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
|
69
|
+
data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
71
70
|
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
72
71
|
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
73
72
|
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
@@ -76,19 +75,21 @@ http_interactions:
|
|
76
75
|
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
77
76
|
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
78
77
|
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
79
|
-
https://analytics.pgncs.notion.so https://
|
80
|
-
https://
|
78
|
+
https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
|
79
|
+
https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
|
80
|
+
https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
|
81
81
|
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
82
82
|
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
83
83
|
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
84
84
|
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
85
85
|
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
86
86
|
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
87
|
-
https://api.segment.io https://api.pgncs.notion.so https://
|
88
|
-
https://
|
89
|
-
https://
|
90
|
-
|
91
|
-
|
87
|
+
https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
|
88
|
+
https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
|
89
|
+
https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
|
90
|
+
https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
|
91
|
+
data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
|
92
|
+
data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
92
93
|
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
93
94
|
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
94
95
|
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
@@ -97,41 +98,46 @@ http_interactions:
|
|
97
98
|
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
98
99
|
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
99
100
|
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
100
|
-
https://analytics.pgncs.notion.so https://
|
101
|
-
https://
|
101
|
+
https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
|
102
|
+
https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
|
103
|
+
https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
|
102
104
|
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
103
105
|
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
104
106
|
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
105
107
|
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
106
108
|
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
107
109
|
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
108
|
-
https://api.segment.io https://api.pgncs.notion.so https://
|
109
|
-
https://
|
110
|
-
https://
|
111
|
-
|
112
|
-
|
110
|
+
https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
|
111
|
+
https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
|
112
|
+
https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
|
113
|
+
https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
|
114
|
+
data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
|
115
|
+
data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
113
116
|
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
114
117
|
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
115
118
|
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
116
119
|
media-src https: http:'
|
120
|
+
Set-Cookie:
|
121
|
+
- notion_browser_id=fc5cd959-578d-4b01-a5cf-180c1a6b9cdb; Domain=www.notion.so;
|
122
|
+
Path=/; Expires=Fri, 04 Apr 2053 12:26:29 GMT; Secure
|
117
123
|
Etag:
|
118
|
-
- W/"
|
124
|
+
- W/"391-afZwyKyZUA0Pe61oRFOZ3yzUE50"
|
119
125
|
Vary:
|
120
126
|
- Accept-Encoding
|
121
127
|
Cf-Cache-Status:
|
122
128
|
- DYNAMIC
|
123
|
-
Cf-Request-Id:
|
124
|
-
- '09ac6e2119000032b946349000000001'
|
125
129
|
Expect-Ct:
|
126
130
|
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
127
131
|
Server:
|
128
132
|
- cloudflare
|
129
133
|
Cf-Ray:
|
130
|
-
-
|
134
|
+
- 67553efbed45ae55-KIX
|
131
135
|
body:
|
132
136
|
encoding: UTF-8
|
133
|
-
string: '{"object":"page","id":"
|
137
|
+
string: '{"object":"page","id":"567dca6c-3c0c-4888-bc78-10b596bced02","created_time":"2021-07-27T10:39:00.000Z","last_edited_time":"2021-07-27T10:39:00.000Z","parent":{"type":"database_id","database_id":"ab7e7b22-7793-492a-ba6b-3295f8b19341"},"archived":false,"properties":{"Description":{"id":"ddNO","type":"rich_text","rich_text":[{"type":"text","text":{"content":"Page
|
138
|
+
description","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Page
|
139
|
+
description","href":null}]},"Name":{"id":"title","type":"title","title":[{"type":"text","text":{"content":"Another
|
134
140
|
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}]}}}'
|
136
|
-
recorded_at:
|
141
|
+
Notion page","href":null}]}},"url":"https://www.notion.so/Another-Notion-page-567dca6c3c0c4888bc7810b596bced02"}'
|
142
|
+
recorded_at: Tue, 27 Jul 2021 10:39:49 GMT
|
137
143
|
recorded_with: VCR 6.0.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.notion.com/v1/pages/
|
5
|
+
uri: https://api.notion.com/v1/pages/2de466f0-9861-466b-9bc2-c987965da010
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -10,9 +10,11 @@ http_interactions:
|
|
10
10
|
Accept:
|
11
11
|
- application/json; charset=utf-8
|
12
12
|
User-Agent:
|
13
|
-
- Notion Ruby Client/0.0.
|
13
|
+
- Notion Ruby Client/0.0.7
|
14
14
|
Authorization:
|
15
15
|
- Bearer <NOTION_API_TOKEN>
|
16
|
+
Notion-Version:
|
17
|
+
- '2021-05-13'
|
16
18
|
Accept-Encoding:
|
17
19
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
20
|
response:
|
@@ -21,18 +23,13 @@ http_interactions:
|
|
21
23
|
message: OK
|
22
24
|
headers:
|
23
25
|
Date:
|
24
|
-
-
|
26
|
+
- Tue, 27 Jul 2021 10:34:58 GMT
|
25
27
|
Content-Type:
|
26
28
|
- application/json; charset=utf-8
|
27
29
|
Transfer-Encoding:
|
28
30
|
- chunked
|
29
31
|
Connection:
|
30
32
|
- keep-alive
|
31
|
-
Set-Cookie:
|
32
|
-
- __cfduid=dbbcfc32a1f6d479a1b41f306024914e71619384402; expires=Tue, 25-May-21
|
33
|
-
21:00:02 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
34
|
-
- notion_browser_id=eeb45ef7-a5d6-4c98-8c99-34b68d93294b; Domain=www.notion.so;
|
35
|
-
Path=/; Expires=Wed, 01 Jan 2053 22:46:42 GMT; Secure
|
36
33
|
X-Dns-Prefetch-Control:
|
37
34
|
- 'off'
|
38
35
|
X-Frame-Options:
|
@@ -51,19 +48,21 @@ http_interactions:
|
|
51
48
|
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
52
49
|
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
53
50
|
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
54
|
-
https://analytics.pgncs.notion.so https://
|
55
|
-
https://
|
51
|
+
https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
|
52
|
+
https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
|
53
|
+
https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
|
56
54
|
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
57
55
|
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
58
56
|
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
59
57
|
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
60
58
|
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
61
59
|
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
62
|
-
https://api.segment.io https://api.pgncs.notion.so https://
|
63
|
-
https://
|
64
|
-
https://
|
65
|
-
|
66
|
-
|
60
|
+
https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
|
61
|
+
https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
|
62
|
+
https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
|
63
|
+
https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
|
64
|
+
data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
|
65
|
+
data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
67
66
|
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
68
67
|
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
69
68
|
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
@@ -72,19 +71,21 @@ http_interactions:
|
|
72
71
|
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
73
72
|
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
74
73
|
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
75
|
-
https://analytics.pgncs.notion.so https://
|
76
|
-
https://
|
74
|
+
https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
|
75
|
+
https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
|
76
|
+
https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
|
77
77
|
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
78
78
|
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
79
79
|
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
80
80
|
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
81
81
|
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
82
82
|
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
83
|
-
https://api.segment.io https://api.pgncs.notion.so https://
|
84
|
-
https://
|
85
|
-
https://
|
86
|
-
|
87
|
-
|
83
|
+
https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
|
84
|
+
https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
|
85
|
+
https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
|
86
|
+
https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
|
87
|
+
data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
|
88
|
+
data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
88
89
|
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
89
90
|
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
90
91
|
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
@@ -93,41 +94,44 @@ http_interactions:
|
|
93
94
|
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
94
95
|
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
95
96
|
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
96
|
-
https://analytics.pgncs.notion.so https://
|
97
|
-
https://
|
97
|
+
https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com
|
98
|
+
https://js.stripe.com https://embed.typeform.com https://admin.typeform.com
|
99
|
+
https://public.profitwell.com js.sentry-cdn.com https://platform.twitter.com
|
98
100
|
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
99
101
|
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
100
102
|
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
101
103
|
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
102
104
|
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
103
105
|
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
104
|
-
https://api.segment.io https://api.pgncs.notion.so https://
|
105
|
-
https://
|
106
|
-
https://
|
107
|
-
|
108
|
-
|
106
|
+
https://api.segment.io https://api.pgncs.notion.so https://o324374.ingest.sentry.io
|
107
|
+
https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com
|
108
|
+
https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com
|
109
|
+
https://api.unsplash.com https://boards-api.greenhouse.io; font-src ''self''
|
110
|
+
data: https://cdnjs.cloudflare.com https://js.intercomcdn.com; img-src ''self''
|
111
|
+
data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
109
112
|
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
110
113
|
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
111
114
|
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
112
115
|
media-src https: http:'
|
116
|
+
Set-Cookie:
|
117
|
+
- notion_browser_id=e5adbb48-9098-48c5-b8de-295028576fbc; Domain=www.notion.so;
|
118
|
+
Path=/; Expires=Fri, 04 Apr 2053 12:21:38 GMT; Secure
|
113
119
|
Etag:
|
114
|
-
- W/"
|
120
|
+
- W/"29f-eBfuus2RMZHcW3K9L51aj0I7uqk"
|
115
121
|
Vary:
|
116
122
|
- Accept-Encoding
|
117
123
|
Cf-Cache-Status:
|
118
124
|
- DYNAMIC
|
119
|
-
Cf-Request-Id:
|
120
|
-
- '09ac6e18820000b7db1c3c7000000001'
|
121
125
|
Expect-Ct:
|
122
126
|
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
123
127
|
Server:
|
124
128
|
- cloudflare
|
125
129
|
Cf-Ray:
|
126
|
-
-
|
130
|
+
- 675537e53f0d0ad6-KIX
|
127
131
|
body:
|
128
132
|
encoding: UTF-8
|
129
|
-
string: '{"object":"page","id":"
|
133
|
+
string: '{"object":"page","id":"2de466f0-9861-466b-9bc2-c987965da010","created_time":"2021-07-26T15:05:00.000Z","last_edited_time":"2021-07-26T15:51: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
|
130
134
|
Notion page","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
|
131
|
-
Notion page","href":null}]}}}'
|
132
|
-
recorded_at:
|
135
|
+
Notion page","href":null}]}},"url":"https://www.notion.so/A-Notion-page-2de466f09861466b9bc2c987965da010"}'
|
136
|
+
recorded_at: Tue, 27 Jul 2021 10:34:58 GMT
|
133
137
|
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/
|
5
|
+
uri: https://api.notion.com/v1/pages/2de466f0-9861-466b-9bc2-c987965da010
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"id":"
|
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.
|
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
|
-
-
|
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=d149d8ca56a19f6c26a1766e21aa63e601619384405; expires=Tue, 25-May-21
|
36
|
-
21:00:05 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
37
|
-
- notion_browser_id=62045a97-c81b-4006-b48d-06245ff9860c; Domain=www.notion.so;
|
38
|
-
Path=/; Expires=Wed, 01 Jan 2053 22:46:45 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://
|
58
|
-
https://
|
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://
|
66
|
-
https://
|
67
|
-
https://
|
68
|
-
|
69
|
-
|
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://
|
79
|
-
https://
|
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://
|
87
|
-
https://
|
88
|
-
https://
|
89
|
-
|
90
|
-
|
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://
|
100
|
-
https://
|
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://
|
108
|
-
https://
|
109
|
-
https://
|
110
|
-
|
111
|
-
|
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/"
|
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
|
-
- '09ac6e24610000694899ae0000000001'
|
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
|
-
-
|
133
|
+
- 675537ebed7dfbe8-KIX
|
130
134
|
body:
|
131
135
|
encoding: UTF-8
|
132
|
-
string: '{"object":"page","id":"
|
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:
|
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
|
@@ -4,6 +4,23 @@ require 'spec_helper'
|
|
4
4
|
RSpec.describe Notion::Api::Endpoints::Databases do
|
5
5
|
let(:client) { Notion::Client.new }
|
6
6
|
let(:database_id) { '89b30a70-ce51-4646-ab4f-5fdcb1d5e76c' }
|
7
|
+
let(:page_id) { '7cbf38f8-5921-4422-bd3f-a647c3e2544b' }
|
8
|
+
let(:title) do
|
9
|
+
[
|
10
|
+
{
|
11
|
+
"text": {
|
12
|
+
"content": 'Another Notion database'
|
13
|
+
}
|
14
|
+
}
|
15
|
+
]
|
16
|
+
end
|
17
|
+
let(:properties) do
|
18
|
+
{
|
19
|
+
"Name": {
|
20
|
+
"title": {}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
end
|
7
24
|
|
8
25
|
context 'databases' do
|
9
26
|
it 'retrieves', vcr: { cassette_name: 'database' } do
|
@@ -16,6 +33,15 @@ RSpec.describe Notion::Api::Endpoints::Databases do
|
|
16
33
|
expect(response.results.length).to be >= 1
|
17
34
|
end
|
18
35
|
|
36
|
+
it 'creates', vcr: { cassette_name: 'create_database' } do
|
37
|
+
response = client.create_database(
|
38
|
+
parent: { page_id: page_id },
|
39
|
+
title: title,
|
40
|
+
properties: properties
|
41
|
+
)
|
42
|
+
expect(response.title.first.plain_text).to eql 'Another Notion database'
|
43
|
+
end
|
44
|
+
|
19
45
|
it 'paginated queries', vcr: { cassette_name: 'paginated_database_query' } do
|
20
46
|
pages = []
|
21
47
|
client.database_query(id: database_id, limit: 1) do |page|
|
@@ -3,17 +3,28 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
RSpec.describe Notion::Api::Endpoints::Pages do
|
5
5
|
let(:client) { Notion::Client.new }
|
6
|
-
let(:database_id) { '
|
7
|
-
let(:page_id) { '
|
6
|
+
let(:database_id) { 'ab7e7b22-7793-492a-ba6b-3295f8b19341' }
|
7
|
+
let(:page_id) { '2de466f0-9861-466b-9bc2-c987965da010' }
|
8
8
|
let(:properties) do
|
9
9
|
{
|
10
|
-
"Name":
|
11
|
-
|
12
|
-
|
13
|
-
"
|
10
|
+
"Name": {
|
11
|
+
"title": [
|
12
|
+
{
|
13
|
+
"text": {
|
14
|
+
"content": 'Another Notion page'
|
15
|
+
}
|
14
16
|
}
|
15
|
-
|
16
|
-
|
17
|
+
]
|
18
|
+
},
|
19
|
+
"Description": {
|
20
|
+
"rich_text": [
|
21
|
+
{
|
22
|
+
"text": {
|
23
|
+
"content": 'Page description'
|
24
|
+
}
|
25
|
+
}
|
26
|
+
]
|
27
|
+
}
|
17
28
|
}
|
18
29
|
end
|
19
30
|
let(:children) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notion-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Goutay
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
-
description:
|
167
|
+
description:
|
168
168
|
email: nicolas@orbit.love
|
169
169
|
executables: []
|
170
170
|
extensions: []
|
@@ -210,6 +210,7 @@ files:
|
|
210
210
|
- screenshots/create_notion_bot.png
|
211
211
|
- spec/fixtures/notion/block_append_children.yml
|
212
212
|
- spec/fixtures/notion/block_children.yml
|
213
|
+
- spec/fixtures/notion/create_database.yml
|
213
214
|
- spec/fixtures/notion/create_page.yml
|
214
215
|
- spec/fixtures/notion/database.yml
|
215
216
|
- spec/fixtures/notion/database_query.yml
|
@@ -235,7 +236,7 @@ homepage: http://github.com/orbit-love/notion-ruby-client
|
|
235
236
|
licenses:
|
236
237
|
- MIT
|
237
238
|
metadata: {}
|
238
|
-
post_install_message:
|
239
|
+
post_install_message:
|
239
240
|
rdoc_options: []
|
240
241
|
require_paths:
|
241
242
|
- lib
|
@@ -250,13 +251,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
251
|
- !ruby/object:Gem::Version
|
251
252
|
version: 1.3.6
|
252
253
|
requirements: []
|
253
|
-
rubygems_version: 3.
|
254
|
-
signing_key:
|
254
|
+
rubygems_version: 3.1.4
|
255
|
+
signing_key:
|
255
256
|
specification_version: 4
|
256
257
|
summary: Notion API client for Ruby.
|
257
258
|
test_files:
|
258
259
|
- spec/fixtures/notion/block_append_children.yml
|
259
260
|
- spec/fixtures/notion/block_children.yml
|
261
|
+
- spec/fixtures/notion/create_database.yml
|
260
262
|
- spec/fixtures/notion/create_page.yml
|
261
263
|
- spec/fixtures/notion/database.yml
|
262
264
|
- spec/fixtures/notion/database_query.yml
|