notion-ruby-client 0.0.7 → 1.0.0.pre.beta1
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/.devcontainer/Dockerfile +5 -0
- data/.devcontainer/boot.sh +1 -0
- data/.devcontainer/devcontainer.json +30 -0
- data/.github/workflows/ci.yml +1 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +9 -0
- data/CHANGELOG.md +42 -0
- data/CONTRIBUTING.md +51 -0
- data/Gemfile.lock +39 -12
- data/README.md +377 -79
- data/bin/console +31 -0
- data/lib/notion/api/endpoints/blocks.rb +51 -7
- data/lib/notion/api/endpoints/databases.rb +60 -31
- data/lib/notion/api/endpoints/pages.rb +25 -8
- data/lib/notion/api/endpoints/search.rb +41 -0
- data/lib/notion/api/endpoints/users.rb +14 -3
- data/lib/notion/api/endpoints.rb +3 -1
- data/lib/notion/api/errors/too_many_requests.rb +15 -0
- data/lib/notion/api/errors.rb +0 -2
- data/lib/notion/config.rb +2 -0
- data/lib/notion/pagination/cursor.rb +5 -2
- data/lib/notion/version.rb +2 -2
- data/lib/notion-ruby-client.rb +2 -0
- data/notion-ruby-client.gemspec +4 -2
- data/spec/fixtures/notion/block.yml +146 -0
- data/spec/fixtures/notion/block_append_children.yml +76 -62
- data/spec/fixtures/notion/block_children.yml +80 -65
- data/spec/fixtures/notion/create_database.yml +149 -0
- data/spec/fixtures/notion/create_page.yml +76 -61
- data/spec/fixtures/notion/database.yml +78 -61
- data/spec/fixtures/notion/database_query.yml +81 -62
- data/spec/fixtures/notion/delete_block.yml +145 -0
- data/spec/fixtures/notion/page.yml +78 -61
- data/spec/fixtures/notion/page_property_item.yml +143 -0
- data/spec/fixtures/notion/paginated_block_children.yml +296 -242
- data/spec/fixtures/notion/paginated_database_query.yml +79 -62
- data/spec/fixtures/notion/paginated_databases_list.yml +78 -61
- data/spec/fixtures/notion/paginated_search.yml +301 -0
- data/spec/fixtures/notion/paginated_users_list.yml +143 -130
- data/spec/fixtures/notion/search.yml +160 -0
- data/spec/fixtures/notion/search_with_query.yml +152 -0
- data/spec/fixtures/notion/update_block.yml +148 -0
- data/spec/fixtures/notion/update_database.yml +152 -0
- data/spec/fixtures/notion/update_page.yml +79 -63
- data/spec/fixtures/notion/users.yml +69 -56
- data/spec/fixtures/notion/users_list.yml +143 -130
- data/spec/fixtures/notion/users_me.yml +144 -0
- data/spec/notion/api/endpoints/blocks_spec.rb +44 -12
- data/spec/notion/api/endpoints/databases_spec.rb +38 -17
- data/spec/notion/api/endpoints/pages_spec.rb +21 -13
- data/spec/notion/api/endpoints/search_spec.rb +26 -0
- data/spec/notion/api/endpoints/users_spec.rb +9 -4
- data/spec/notion/pagination/cursor_spec.rb +126 -0
- metadata +73 -19
- data/.rspec_status +0 -18
- data/notion-ruby-client-0.0.4.gem +0 -0
- data/scratchpad.rb +0 -22
- data/screenshots/create_notion_bot.png +0 -0
- data/spec/fixtures/notion/databases_list.yml +0 -133
@@ -0,0 +1,143 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.notion.com/v1/pages/c7fd1abe-8114-44ea-be77-9632ea33e581/properties/%5BIFC
|
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.1.0-beta1
|
14
|
+
Authorization:
|
15
|
+
- Bearer <NOTION_API_TOKEN>
|
16
|
+
Notion-Version:
|
17
|
+
- '2021-08-16'
|
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, 20 Mar 2022 17:10:22 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- notion_browser_id=7e4e2467-91d3-42e1-ac3e-596e38e11388; Domain=www.notion.so;
|
35
|
+
Path=/; Expires=Mon, 20 Mar 2023 17:10:22 GMT; Secure
|
36
|
+
- notion_check_cookie_consent=true; Domain=www.notion.so; Path=/; Expires=Mon,
|
37
|
+
21 Mar 2022 17:10:22 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://cdn.amplitude.com https://api.amplitude.com
|
55
|
+
https://hkfxbbdzib.notion.so https://widget.intercom.io https://js.intercomcdn.com
|
56
|
+
https://logs-01.loggly.com https://cdn.segment.com https://analytics.pgncs.notion.so
|
57
|
+
https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com
|
58
|
+
https://embed.typeform.com https://admin.typeform.com https://public.profitwell.com
|
59
|
+
js.sentry-cdn.com https://js.chilipiper.com https://platform.twitter.com https://cdn.syndication.twimg.com;
|
60
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
61
|
+
ws://localhost:* ws://127.0.0.1:* https://notion-emojis.s3-us-west-2.amazonaws.com
|
62
|
+
https://s3-us-west-2.amazonaws.com https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
63
|
+
https: http: https://cdn.amplitude.com https://api.amplitude.com https://hkfxbbdzib.notion.so
|
64
|
+
https://www.notion.so https://api.embed.ly https://js.intercomcdn.com https://api-iam.intercom.io
|
65
|
+
wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com https://cdn.segment.com
|
66
|
+
https://api.segment.io https://analytics.pgncs.notion.so https://api.pgncs.notion.so
|
67
|
+
https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com
|
68
|
+
https://cdn.contentful.com https://preview.contentful.com https://images.ctfassets.net
|
69
|
+
https://www2.profitwell.com https://tracking.chilipiper.com https://api.chilipiper.com
|
70
|
+
https://api.unsplash.com https://boards-api.greenhouse.io https://api.statuspage.io
|
71
|
+
https://pgncd.notion.so https://api.statsig.com; font-src ''self'' data: https://cdnjs.cloudflare.com
|
72
|
+
https://js.intercomcdn.com; img-src ''self'' data: blob: https: https://platform.twitter.com
|
73
|
+
https://syndication.twitter.com https://pbs.twimg.com https://ton.twimg.com;
|
74
|
+
style-src ''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
75
|
+
https://js.chilipiper.com https://platform.twitter.com https://ton.twimg.com;
|
76
|
+
frame-src https: http:; media-src https: http:'
|
77
|
+
X-Content-Security-Policy:
|
78
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
79
|
+
https://apis.google.com https://cdn.amplitude.com https://api.amplitude.com
|
80
|
+
https://hkfxbbdzib.notion.so https://widget.intercom.io https://js.intercomcdn.com
|
81
|
+
https://logs-01.loggly.com https://cdn.segment.com https://analytics.pgncs.notion.so
|
82
|
+
https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com
|
83
|
+
https://embed.typeform.com https://admin.typeform.com https://public.profitwell.com
|
84
|
+
js.sentry-cdn.com https://js.chilipiper.com https://platform.twitter.com https://cdn.syndication.twimg.com;
|
85
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
86
|
+
ws://localhost:* ws://127.0.0.1:* https://notion-emojis.s3-us-west-2.amazonaws.com
|
87
|
+
https://s3-us-west-2.amazonaws.com https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
88
|
+
https: http: https://cdn.amplitude.com https://api.amplitude.com https://hkfxbbdzib.notion.so
|
89
|
+
https://www.notion.so https://api.embed.ly https://js.intercomcdn.com https://api-iam.intercom.io
|
90
|
+
wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com https://cdn.segment.com
|
91
|
+
https://api.segment.io https://analytics.pgncs.notion.so https://api.pgncs.notion.so
|
92
|
+
https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com
|
93
|
+
https://cdn.contentful.com https://preview.contentful.com https://images.ctfassets.net
|
94
|
+
https://www2.profitwell.com https://tracking.chilipiper.com https://api.chilipiper.com
|
95
|
+
https://api.unsplash.com https://boards-api.greenhouse.io https://api.statuspage.io
|
96
|
+
https://pgncd.notion.so https://api.statsig.com; font-src ''self'' data: https://cdnjs.cloudflare.com
|
97
|
+
https://js.intercomcdn.com; img-src ''self'' data: blob: https: https://platform.twitter.com
|
98
|
+
https://syndication.twitter.com https://pbs.twimg.com https://ton.twimg.com;
|
99
|
+
style-src ''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
100
|
+
https://js.chilipiper.com https://platform.twitter.com https://ton.twimg.com;
|
101
|
+
frame-src https: http:; media-src https: http:'
|
102
|
+
X-Webkit-Csp:
|
103
|
+
- 'script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' https://gist.github.com
|
104
|
+
https://apis.google.com https://cdn.amplitude.com https://api.amplitude.com
|
105
|
+
https://hkfxbbdzib.notion.so https://widget.intercom.io https://js.intercomcdn.com
|
106
|
+
https://logs-01.loggly.com https://cdn.segment.com https://analytics.pgncs.notion.so
|
107
|
+
https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com
|
108
|
+
https://embed.typeform.com https://admin.typeform.com https://public.profitwell.com
|
109
|
+
js.sentry-cdn.com https://js.chilipiper.com https://platform.twitter.com https://cdn.syndication.twimg.com;
|
110
|
+
connect-src ''self'' https://msgstore.www.notion.so wss://msgstore.www.notion.so
|
111
|
+
ws://localhost:* ws://127.0.0.1:* https://notion-emojis.s3-us-west-2.amazonaws.com
|
112
|
+
https://s3-us-west-2.amazonaws.com https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com
|
113
|
+
https: http: https://cdn.amplitude.com https://api.amplitude.com https://hkfxbbdzib.notion.so
|
114
|
+
https://www.notion.so https://api.embed.ly https://js.intercomcdn.com https://api-iam.intercom.io
|
115
|
+
wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com https://cdn.segment.com
|
116
|
+
https://api.segment.io https://analytics.pgncs.notion.so https://api.pgncs.notion.so
|
117
|
+
https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com
|
118
|
+
https://cdn.contentful.com https://preview.contentful.com https://images.ctfassets.net
|
119
|
+
https://www2.profitwell.com https://tracking.chilipiper.com https://api.chilipiper.com
|
120
|
+
https://api.unsplash.com https://boards-api.greenhouse.io https://api.statuspage.io
|
121
|
+
https://pgncd.notion.so https://api.statsig.com; font-src ''self'' data: https://cdnjs.cloudflare.com
|
122
|
+
https://js.intercomcdn.com; img-src ''self'' data: blob: https: https://platform.twitter.com
|
123
|
+
https://syndication.twitter.com https://pbs.twimg.com https://ton.twimg.com;
|
124
|
+
style-src ''self'' ''unsafe-inline'' https://cdnjs.cloudflare.com https://github.githubassets.com
|
125
|
+
https://js.chilipiper.com https://platform.twitter.com https://ton.twimg.com;
|
126
|
+
frame-src https: http:; media-src https: http:'
|
127
|
+
Etag:
|
128
|
+
- W/"52-qP0vXYtccvf52YZtSGh7ylT7yAg"
|
129
|
+
Vary:
|
130
|
+
- Accept-Encoding
|
131
|
+
Cf-Cache-Status:
|
132
|
+
- DYNAMIC
|
133
|
+
Expect-Ct:
|
134
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
135
|
+
Server:
|
136
|
+
- cloudflare
|
137
|
+
Cf-Ray:
|
138
|
+
- 6ef00f921c8d73d3-MRS
|
139
|
+
body:
|
140
|
+
encoding: UTF-8
|
141
|
+
string: '{"object":"property_item","type":"email","id":"[IFC","email":"nicolas@orbit.love"}'
|
142
|
+
recorded_at: Sun, 20 Mar 2022 17:10:22 GMT
|
143
|
+
recorded_with: VCR 6.0.0
|