notion-ruby-client 0.0.3 → 0.0.4
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/.github/workflows/ci.yml +14 -0
- data/.rspec +2 -0
- data/.rspec_status +15 -0
- data/.rubocop.yml +46 -0
- data/.rubocop_todo.yml +86 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +91 -0
- data/README.md +163 -3
- data/Rakefile +18 -0
- data/lib/notion-ruby-client.rb +6 -7
- data/lib/notion/api/endpoints/databases.rb +19 -1
- data/lib/notion/api/endpoints/pages.rb +3 -0
- data/lib/notion/config.rb +3 -1
- data/lib/notion/pagination/cursor.rb +1 -1
- data/lib/notion/version.rb +1 -1
- data/spec/fixtures/notion/create_page.yml +137 -0
- data/spec/fixtures/notion/database.yml +133 -0
- data/spec/fixtures/notion/database_query.yml +137 -0
- data/spec/fixtures/notion/databases_list.yml +133 -0
- data/spec/fixtures/notion/page.yml +133 -0
- data/spec/fixtures/notion/paginated_database_query.yml +139 -0
- data/spec/fixtures/notion/paginated_databases_list.yml +133 -0
- data/spec/fixtures/notion/paginated_users_list.yml +133 -0
- data/spec/fixtures/notion/update_page.yml +136 -0
- data/spec/fixtures/notion/users.yml +132 -0
- data/spec/fixtures/notion/users_list.yml +133 -0
- data/spec/notion/api/endpoints/databases_spec.rb +40 -0
- data/spec/notion/api/endpoints/pages_spec.rb +64 -0
- data/spec/notion/api/endpoints/users_spec.rb +26 -0
- data/spec/notion/config_spec.rb +16 -0
- data/spec/notion/version_spec.rb +8 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/support/token.rb +10 -0
- data/spec/support/vcr.rb +16 -0
- metadata +48 -3
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'rubygems'
|
3
|
+
require 'bundler'
|
4
|
+
require 'bundler/gem_tasks'
|
5
|
+
|
6
|
+
Bundler.setup :default, :development
|
7
|
+
|
8
|
+
require 'rspec/core'
|
9
|
+
require 'rspec/core/rake_task'
|
10
|
+
|
11
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
12
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'rubocop/rake_task'
|
16
|
+
RuboCop::RakeTask.new
|
17
|
+
|
18
|
+
task default: %i[spec rubocop]
|
data/lib/notion-ruby-client.rb
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'faraday'
|
3
|
+
require 'faraday_middleware'
|
4
|
+
require 'json'
|
5
|
+
require 'logger'
|
6
|
+
require 'hashie'
|
7
|
+
|
2
8
|
require_relative 'notion/version'
|
3
9
|
require_relative 'notion/logger'
|
4
10
|
require_relative 'notion/config'
|
5
11
|
|
6
12
|
# Messages
|
7
|
-
require 'hashie'
|
8
13
|
require_relative 'notion/messages/message'
|
9
14
|
|
10
|
-
# Web API
|
11
|
-
require 'faraday'
|
12
|
-
require 'faraday_middleware'
|
13
|
-
require 'json'
|
14
|
-
require 'logger'
|
15
|
-
|
16
15
|
require_relative 'notion/config'
|
17
16
|
require_relative 'notion/api/errors/notion_error'
|
18
17
|
require_relative 'notion/api/error'
|
@@ -51,7 +51,25 @@ module Notion
|
|
51
51
|
yield page
|
52
52
|
end
|
53
53
|
else
|
54
|
-
post("databases/#{options[:id]}", options)
|
54
|
+
post("databases/#{options[:id]}/query", options)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Returns a paginated list of Databases objects for the workspace.
|
60
|
+
#
|
61
|
+
# @option options [UUID] :start_cursor
|
62
|
+
# Paginate through collections of data by setting the cursor parameter
|
63
|
+
# to a start_cursor attribute returned by a previous request's next_cursor.
|
64
|
+
# Default value fetches the first "page" of the collection.
|
65
|
+
# See pagination for more detail.
|
66
|
+
def databases_list(options = {})
|
67
|
+
if block_given?
|
68
|
+
Pagination::Cursor.new(self, :databases_list, options).each do |page|
|
69
|
+
yield page
|
70
|
+
end
|
71
|
+
else
|
72
|
+
get('databases', options)
|
55
73
|
end
|
56
74
|
end
|
57
75
|
end
|
@@ -34,6 +34,9 @@ module Notion
|
|
34
34
|
# the database this page belongs to. key string Name of a property as it
|
35
35
|
# appears in Notion, or property ID. value object Object containing a value
|
36
36
|
# specific to the property type, e.g. {"checkbox": true}.
|
37
|
+
#
|
38
|
+
# @option options [Object] :children
|
39
|
+
# An optional array of Block objects representing the Page’s conent
|
37
40
|
def create_page(options = {})
|
38
41
|
throw ArgumentError.new('Required arguments :parent.database_id missing') if options.dig(:parent, :database_id).nil?
|
39
42
|
post("pages", options)
|
data/lib/notion/config.rb
CHANGED
@@ -23,7 +23,7 @@ module Notion
|
|
23
23
|
next_cursor = nil
|
24
24
|
retry_count = 0
|
25
25
|
loop do
|
26
|
-
query =
|
26
|
+
query = next_cursor.nil? ? params : params.merge(start_cursor: next_cursor)
|
27
27
|
begin
|
28
28
|
response = client.send(verb, query)
|
29
29
|
rescue Notion::Api::Errors::TooManyRequestsError => e
|
data/lib/notion/version.rb
CHANGED
@@ -0,0 +1,137 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.notion.com/v1/pages
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"parent":{"database_id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"},"properties":{"Name":[{"text":{"content":"Another
|
9
|
+
Notion page"}}]},"children":[{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"A
|
10
|
+
heading"}}]}}]}'
|
11
|
+
headers:
|
12
|
+
Accept:
|
13
|
+
- application/json; charset=utf-8
|
14
|
+
User-Agent:
|
15
|
+
- Notion Ruby Client/0.0.3
|
16
|
+
Authorization:
|
17
|
+
- Bearer <NOTION_API_TOKEN>
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
Accept-Encoding:
|
21
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Date:
|
28
|
+
- Sun, 25 Apr 2021 20:03:01 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Set-Cookie:
|
36
|
+
- __cfduid=d4e6307e48da6660499cd5d8025c86d0c1619380981; expires=Tue, 25-May-21
|
37
|
+
20:03:01 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
38
|
+
- notion_browser_id=f15080d4-81d0-44ac-bed3-81acdfaa782e; Domain=www.notion.so;
|
39
|
+
Path=/; Expires=Wed, 01 Jan 2053 21:49:41 GMT; Secure
|
40
|
+
X-Dns-Prefetch-Control:
|
41
|
+
- 'off'
|
42
|
+
X-Frame-Options:
|
43
|
+
- SAMEORIGIN
|
44
|
+
Strict-Transport-Security:
|
45
|
+
- max-age=5184000; includeSubDomains
|
46
|
+
X-Download-Options:
|
47
|
+
- noopen
|
48
|
+
X-Content-Type-Options:
|
49
|
+
- nosniff
|
50
|
+
X-Xss-Protection:
|
51
|
+
- 1; mode=block
|
52
|
+
Referrer-Policy:
|
53
|
+
- same-origin
|
54
|
+
Content-Security-Policy:
|
55
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
56
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
57
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
58
|
+
https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
|
59
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
60
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
61
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
62
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
63
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
64
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
65
|
+
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://checkout.stripe.com
|
67
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
68
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
69
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
70
|
+
img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
71
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
72
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
73
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
74
|
+
media-src https: http:'
|
75
|
+
X-Content-Security-Policy:
|
76
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
77
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
78
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
79
|
+
https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
|
80
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
81
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
82
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
83
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
84
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
85
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
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://checkout.stripe.com
|
88
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
89
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
90
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
91
|
+
img-src ''self'' 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://checkout.stripe.com https://js.stripe.com/v3
|
101
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
102
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
103
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
104
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
105
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
106
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
107
|
+
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://checkout.stripe.com
|
109
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
110
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
111
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
112
|
+
img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
113
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
114
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
115
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
116
|
+
media-src https: http:'
|
117
|
+
Etag:
|
118
|
+
- W/"220-YIxCogQjRWLJ/OAH02Jog3s3tck"
|
119
|
+
Vary:
|
120
|
+
- Accept-Encoding
|
121
|
+
Cf-Cache-Status:
|
122
|
+
- DYNAMIC
|
123
|
+
Cf-Request-Id:
|
124
|
+
- '09ac39e5330000049f2c8b6000000001'
|
125
|
+
Expect-Ct:
|
126
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
127
|
+
Server:
|
128
|
+
- cloudflare
|
129
|
+
Cf-Ray:
|
130
|
+
- 645a2c1b79c3049f-CDG
|
131
|
+
body:
|
132
|
+
encoding: UTF-8
|
133
|
+
string: '{"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
|
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}]}}}'
|
136
|
+
recorded_at: Sun, 25 Apr 2021 20:03:01 GMT
|
137
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,133 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.notion.com/v1/databases/89b30a70-ce51-4646-ab4f-5fdcb1d5e76c
|
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.3
|
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 20:02:59 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=d5e0df600a1233f92c1f357af9276e5271619380978; expires=Tue, 25-May-21
|
33
|
+
20:02:58 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
34
|
+
- notion_browser_id=814ceb26-ae12-47ae-9373-0575c54ce765; Domain=www.notion.so;
|
35
|
+
Path=/; Expires=Wed, 01 Jan 2053 21:49:39 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/"20f-NDWBFPc2tGeeFrAke368a5IhMtE"
|
115
|
+
Vary:
|
116
|
+
- Accept-Encoding
|
117
|
+
Cf-Cache-Status:
|
118
|
+
- DYNAMIC
|
119
|
+
Cf-Request-Id:
|
120
|
+
- '09ac39db52000008abd7abd000000001'
|
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
|
+
- 645a2c0bba7708ab-CDG
|
127
|
+
body:
|
128
|
+
encoding: UTF-8
|
129
|
+
string: '{"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
|
+
Notion database","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
|
131
|
+
Notion database","href":null}],"properties":{"Tags":{"id":"yu]\\","type":"multi_select","multi_select":{"options":[]}},"Name":{"id":"title","type":"title","title":{}}}}'
|
132
|
+
recorded_at: Sun, 25 Apr 2021 20:02:59 GMT
|
133
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,137 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.notion.com/v1/databases/89b30a70-ce51-4646-ab4f-5fdcb1d5e76c/query
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"id":"89b30a70-ce51-4646-ab4f-5fdcb1d5e76c"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Notion Ruby Client/0.0.3
|
14
|
+
Authorization:
|
15
|
+
- Bearer <NOTION_API_TOKEN>
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Sun, 25 Apr 2021 20:03:00 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- __cfduid=d59a829cc96ab0260b4c6ff8c683294cb1619380979; expires=Tue, 25-May-21
|
35
|
+
20:02:59 GMT; path=/; domain=.notion.com; HttpOnly; SameSite=Lax
|
36
|
+
- notion_browser_id=85116363-54f3-4d23-ae97-010b891d04c0; Domain=www.notion.so;
|
37
|
+
Path=/; Expires=Wed, 01 Jan 2053 21:49:39 GMT; Secure
|
38
|
+
X-Dns-Prefetch-Control:
|
39
|
+
- 'off'
|
40
|
+
X-Frame-Options:
|
41
|
+
- SAMEORIGIN
|
42
|
+
Strict-Transport-Security:
|
43
|
+
- max-age=5184000; includeSubDomains
|
44
|
+
X-Download-Options:
|
45
|
+
- noopen
|
46
|
+
X-Content-Type-Options:
|
47
|
+
- nosniff
|
48
|
+
X-Xss-Protection:
|
49
|
+
- 1; mode=block
|
50
|
+
Referrer-Policy:
|
51
|
+
- same-origin
|
52
|
+
Content-Security-Policy:
|
53
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
54
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
55
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
56
|
+
https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
|
57
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
58
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
59
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
60
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
61
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
62
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
63
|
+
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
64
|
+
https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com
|
65
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
66
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
67
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
68
|
+
img-src ''self'' 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://checkout.stripe.com https://js.stripe.com/v3
|
78
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
79
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
80
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
81
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
82
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
83
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
84
|
+
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
85
|
+
https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com
|
86
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
87
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
88
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
89
|
+
img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
90
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
91
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
92
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
93
|
+
media-src https: http:'
|
94
|
+
X-Webkit-Csp:
|
95
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
96
|
+
https://apis.google.com https://api.amplitude.com https://widget.intercom.io
|
97
|
+
https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com
|
98
|
+
https://analytics.pgncs.notion.so https://checkout.stripe.com https://js.stripe.com/v3
|
99
|
+
https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com
|
100
|
+
https://cdn.syndication.twimg.com https://www.googletagmanager.com https://x.clearbitjs.com;
|
101
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
102
|
+
ws://localhost:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com
|
103
|
+
https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
104
|
+
https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com
|
105
|
+
https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com
|
106
|
+
https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com
|
107
|
+
https://js.stripe.com/v3 https://cdn.contentful.com https://preview.contentful.com
|
108
|
+
https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io;
|
109
|
+
font-src ''self'' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com;
|
110
|
+
img-src ''self'' data: blob: https: https://platform.twitter.com https://syndication.twitter.com
|
111
|
+
https://pbs.twimg.com https://ton.twimg.com www.googletagmanager.com; style-src
|
112
|
+
''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
113
|
+
https://platform.twitter.com https://ton.twimg.com; frame-src https: http:;
|
114
|
+
media-src https: http:'
|
115
|
+
Etag:
|
116
|
+
- W/"67c-4LMZdXoshsOPLoUuGMxTGRkhl9E"
|
117
|
+
Vary:
|
118
|
+
- Accept-Encoding
|
119
|
+
Cf-Cache-Status:
|
120
|
+
- DYNAMIC
|
121
|
+
Cf-Request-Id:
|
122
|
+
- '09ac39de980000cd9335189000000001'
|
123
|
+
Expect-Ct:
|
124
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
125
|
+
Server:
|
126
|
+
- cloudflare
|
127
|
+
Cf-Ray:
|
128
|
+
- 645a2c10ffe8cd93-CDG
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"object":"list","results":[{"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
|
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":"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-25T19:56:46.292Z","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
|
134
|
+
Notion page","link":null},"annotations":{"bold":false,"italic":false,"strikethrough":false,"underline":false,"code":false,"color":"default"},"plain_text":"A
|
135
|
+
Notion page","href":null}]}}}],"next_cursor":null,"has_more":false}'
|
136
|
+
recorded_at: Sun, 25 Apr 2021 20:03:00 GMT
|
137
|
+
recorded_with: VCR 6.0.0
|