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.
- checksums.yaml +4 -4
- data/.rspec_status +17 -13
- data/CHANGELOG.md +19 -2
- data/CODE_OF_CONDUCT.md +128 -0
- data/Gemfile.lock +10 -6
- data/README.md +94 -13
- data/lib/notion/api/endpoints.rb +2 -0
- data/lib/notion/api/endpoints/blocks.rb +53 -0
- data/lib/notion/api/endpoints/databases.rb +22 -0
- data/lib/notion/api/endpoints/pages.rb +2 -2
- data/lib/notion/faraday/request.rb +1 -0
- data/lib/notion/pagination/cursor.rb +1 -1
- data/lib/notion/version.rb +3 -2
- data/notion-ruby-client-0.0.4.gem +0 -0
- data/spec/fixtures/notion/block_append_children.yml +135 -0
- data/spec/fixtures/notion/block_children.yml +137 -0
- data/spec/fixtures/notion/create_database.yml +140 -0
- data/spec/fixtures/notion/create_page.yml +43 -37
- data/spec/fixtures/notion/database.yml +9 -9
- data/spec/fixtures/notion/database_query.yml +11 -13
- data/spec/fixtures/notion/databases_list.yml +9 -9
- data/spec/fixtures/notion/page.yml +40 -36
- data/spec/fixtures/notion/paginated_block_children.yml +521 -0
- data/spec/fixtures/notion/paginated_database_query.yml +11 -15
- data/spec/fixtures/notion/paginated_databases_list.yml +9 -9
- data/spec/fixtures/notion/paginated_users_list.yml +9 -9
- data/spec/fixtures/notion/update_page.yml +41 -37
- data/spec/fixtures/notion/users.yml +9 -9
- data/spec/fixtures/notion/users_list.yml +9 -9
- data/spec/notion/api/endpoints/blocks_spec.rb +40 -0
- data/spec/notion/api/endpoints/databases_spec.rb +26 -0
- data/spec/notion/api/endpoints/pages_spec.rb +19 -8
- metadata +15 -2
@@ -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.
|
@@ -16,7 +16,7 @@ module Notion
|
|
16
16
|
# retrieve a page that has not been archived. Defaults to false.
|
17
17
|
def page(options = {})
|
18
18
|
throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
|
19
|
-
get("pages/#{options[:id]}
|
19
|
+
get("pages/#{options[:id]}")
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
@@ -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)
|
@@ -27,6 +27,7 @@ module Notion
|
|
27
27
|
def request(method, path, options)
|
28
28
|
response = connection.send(method) do |request|
|
29
29
|
request.headers['Authorization'] = "Bearer #{token}"
|
30
|
+
request.headers['Notion-Version'] = Notion::NOTION_REQUEST_VERSION
|
30
31
|
case method
|
31
32
|
when :get, :delete
|
32
33
|
request.url(path, options)
|
@@ -26,7 +26,7 @@ module Notion
|
|
26
26
|
query = next_cursor.nil? ? params : params.merge(start_cursor: next_cursor)
|
27
27
|
begin
|
28
28
|
response = client.send(verb, query)
|
29
|
-
rescue Notion::Api::Errors::
|
29
|
+
rescue Notion::Api::Errors::TooManyRequests => e
|
30
30
|
raise e if retry_count >= max_retries
|
31
31
|
|
32
32
|
client.logger.debug("#{self.class}##{__method__}") { e.to_s }
|
data/lib/notion/version.rb
CHANGED
Binary file
|
@@ -0,0 +1,135 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: patch
|
5
|
+
uri: https://api.notion.com/v1/blocks/723578f1-6e51-450c-8ee1-09158c19fd4c/children
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"id":"723578f1-6e51-450c-8ee1-09158c19fd4c","children":[{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"Another
|
9
|
+
Heading"}}]}}]}'
|
10
|
+
headers:
|
11
|
+
Accept:
|
12
|
+
- application/json; charset=utf-8
|
13
|
+
User-Agent:
|
14
|
+
- Notion Ruby Client/0.0.4
|
15
|
+
Authorization:
|
16
|
+
- Bearer <NOTION_API_TOKEN>
|
17
|
+
Content-Type:
|
18
|
+
- application/json
|
19
|
+
Accept-Encoding:
|
20
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Sun, 25 Apr 2021 21:05:49 GMT
|
28
|
+
Content-Type:
|
29
|
+
- application/json; charset=utf-8
|
30
|
+
Transfer-Encoding:
|
31
|
+
- chunked
|
32
|
+
Connection:
|
33
|
+
- keep-alive
|
34
|
+
Set-Cookie:
|
35
|
+
- __cfduid=d34e3fa5c4766df6ac5561da522624b761619384749; expires=Tue, 25-May-21
|
36
|
+
21:05:49 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
37
|
+
- notion_browser_id=e006545d-4f97-4497-8d9c-491386cb6d2a; Domain=www.notion.so;
|
38
|
+
Path=/; Expires=Wed, 01 Jan 2053 22:52:29 GMT; Secure
|
39
|
+
X-Dns-Prefetch-Control:
|
40
|
+
- 'off'
|
41
|
+
X-Frame-Options:
|
42
|
+
- SAMEORIGIN
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=5184000; includeSubDomains
|
45
|
+
X-Download-Options:
|
46
|
+
- noopen
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Xss-Protection:
|
50
|
+
- 1; mode=block
|
51
|
+
Referrer-Policy:
|
52
|
+
- same-origin
|
53
|
+
Content-Security-Policy:
|
54
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
55
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
56
|
+
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
|
59
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
60
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
61
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
62
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
63
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
64
|
+
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
|
70
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
71
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
72
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
73
|
+
media-src https: http:'
|
74
|
+
X-Content-Security-Policy:
|
75
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
76
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
77
|
+
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
|
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://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
|
91
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
92
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
93
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
94
|
+
media-src https: http:'
|
95
|
+
X-Webkit-Csp:
|
96
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
97
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
98
|
+
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
|
101
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
102
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
103
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
104
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
105
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
106
|
+
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
|
112
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
113
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
114
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
115
|
+
media-src https: http:'
|
116
|
+
Etag:
|
117
|
+
- W/"e5-DFeqv/gYemlg3XfmjAU4nnWmtn8"
|
118
|
+
Vary:
|
119
|
+
- Accept-Encoding
|
120
|
+
Cf-Cache-Status:
|
121
|
+
- DYNAMIC
|
122
|
+
Cf-Request-Id:
|
123
|
+
- '09ac73642e00000818408a7000000001'
|
124
|
+
Expect-Ct:
|
125
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
126
|
+
Server:
|
127
|
+
- cloudflare
|
128
|
+
Cf-Ray:
|
129
|
+
- 645a8819e9030818-CDG
|
130
|
+
body:
|
131
|
+
encoding: UTF-8
|
132
|
+
string: '{"object":"block","id":"723578f1-6e51-450c-8ee1-09158c19fd4c","created_time":"2021-01-29T20:50:51.917Z","last_edited_time":"2021-04-25T21:05:49.706Z","has_children":true,"type":"child_page","child_page":{"title":"A
|
133
|
+
Notion page"}}'
|
134
|
+
recorded_at: Sun, 25 Apr 2021 21:05:49 GMT
|
135
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,137 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.notion.com/v1/blocks/723578f1-6e51-450c-8ee1-09158c19fd4c/children?id=723578f1-6e51-450c-8ee1-09158c19fd4c
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Notion Ruby Client/0.0.4
|
14
|
+
Authorization:
|
15
|
+
- Bearer <NOTION_API_TOKEN>
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Sun, 25 Apr 2021 21:05:45 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- __cfduid=d96e3d721ac572f706ca68070606fa2391619384744; expires=Tue, 25-May-21
|
33
|
+
21:05:44 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
34
|
+
- notion_browser_id=612a2641-5d00-4c18-85b2-269d399f4e4b; Domain=www.notion.so;
|
35
|
+
Path=/; Expires=Wed, 01 Jan 2053 22:52:25 GMT; Secure
|
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://checkout.stripe.com https://js.stripe.com/v3
|
55
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
56
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
57
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
58
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
59
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
60
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
61
|
+
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://checkout.stripe.com
|
63
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
64
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
65
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
66
|
+
img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
67
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
68
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
69
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
70
|
+
media-src https: http:'
|
71
|
+
X-Content-Security-Policy:
|
72
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
73
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
74
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
75
|
+
https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
|
76
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
77
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
78
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
79
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
80
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
81
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
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://checkout.stripe.com
|
84
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
85
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
86
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
87
|
+
img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
88
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
89
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
90
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
91
|
+
media-src https: http:'
|
92
|
+
X-Webkit-Csp:
|
93
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
94
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
95
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
96
|
+
https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
|
97
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
98
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
99
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
100
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
101
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
102
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
103
|
+
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://checkout.stripe.com
|
105
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
106
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
107
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
108
|
+
img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
109
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
110
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
111
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
112
|
+
media-src https: http:'
|
113
|
+
Etag:
|
114
|
+
- W/"621-oTt6TNWfBPJwQLysHa2sgVrXxyc"
|
115
|
+
Vary:
|
116
|
+
- Accept-Encoding
|
117
|
+
Cf-Cache-Status:
|
118
|
+
- DYNAMIC
|
119
|
+
Cf-Request-Id:
|
120
|
+
- '09ac7352730000edf3513be000000001'
|
121
|
+
Expect-Ct:
|
122
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
123
|
+
Server:
|
124
|
+
- cloudflare
|
125
|
+
Cf-Ray:
|
126
|
+
- 645a87fd8f1aedf3-CDG
|
127
|
+
body:
|
128
|
+
encoding: UTF-8
|
129
|
+
string: '{"object":"list","results":[{"object":"block","id":"786f3663-78aa-4852-afe7-0ef7da78dedc","created_time":"2021-04-25T20:40:00.000Z","last_edited_time":"2021-04-25T20:40:00.000Z","has_children":false,"type":"heading_1","heading_1":{"text":[{"type":"text","text":{"content":"A
|
130
|
+
Header","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
|
131
|
+
Header","href":null}]}},{"object":"block","id":"e450fda8-0159-405f-ab67-f9de28bb4e49","created_time":"2021-04-25T20:41:00.000Z","last_edited_time":"2021-04-25T20:41:00.000Z","has_children":false,"type":"paragraph","paragraph":{"text":[{"type":"text","text":{"content":"A
|
132
|
+
paragraph","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
|
133
|
+
paragraph","href":null}]}},{"object":"block","id":"9051af10-83cb-4688-9210-3dae39432680","created_time":"2021-04-25T20:41:00.000Z","last_edited_time":"2021-04-25T20:41:00.000Z","has_children":false,"type":"paragraph","paragraph":{"text":[]}},{"object":"block","id":"f512bf64-55b0-432e-a850-82e73637d895","created_time":"2021-04-25T21:04:29.565Z","last_edited_time":"2021-04-25T21:04:29.565Z","has_children":false,"type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"Another
|
134
|
+
Heading","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"Another
|
135
|
+
Heading","href":null}]}}],"next_cursor":null,"has_more":false}'
|
136
|
+
recorded_at: Sun, 25 Apr 2021 21:05:45 GMT
|
137
|
+
recorded_with: VCR 6.0.0
|
@@ -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
|