notion-sdk-ruby 0.4.1 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +43 -34
- data/.gitignore +13 -13
- data/.rspec +3 -3
- data/.vscode/settings.json +3 -3
- data/Gemfile +4 -4
- data/Gemfile.lock +64 -27
- data/LICENSE.txt +21 -21
- data/README.md +55 -339
- data/Rakefile +12 -7
- data/bin/console +11 -11
- data/bin/rake +29 -0
- data/bin/setup +8 -8
- data/lib/notion-sdk-ruby/api/blocks.rb +56 -0
- data/lib/notion-sdk-ruby/api/databases.rb +47 -0
- data/lib/notion-sdk-ruby/api/pages.rb +36 -0
- data/lib/notion-sdk-ruby/api/search.rb +17 -0
- data/lib/notion-sdk-ruby/api/users.rb +24 -0
- data/lib/notion-sdk-ruby/client.rb +30 -26
- data/lib/notion-sdk-ruby/config.rb +5 -5
- data/lib/notion-sdk-ruby/error.rb +52 -52
- data/lib/notion-sdk-ruby/models/block.rb +7 -0
- data/lib/notion-sdk-ruby/models/database.rb +7 -0
- data/lib/notion-sdk-ruby/models/list.rb +49 -0
- data/lib/notion-sdk-ruby/models/page.rb +7 -0
- data/lib/notion-sdk-ruby/models/user.rb +7 -0
- data/lib/notion-sdk-ruby/request_client.rb +45 -50
- data/lib/notion-sdk-ruby/version.rb +3 -3
- data/lib/notion-sdk-ruby.rb +37 -27
- data/notion-sdk-ruby.gemspec +41 -37
- data/todos.md +11 -0
- metadata +79 -17
- data/.travis.yml +0 -6
- data/lib/notion-sdk-ruby/operations/search.rb +0 -9
- data/lib/notion-sdk-ruby/resources/blocks.rb +0 -25
- data/lib/notion-sdk-ruby/resources/databases.rb +0 -25
- data/lib/notion-sdk-ruby/resources/pages.rb +0 -15
- data/lib/notion-sdk-ruby/resources/users.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d5b161378ab82be49ed012bd3944f0993e73a9f7843a4f16864f89ada94c374
|
4
|
+
data.tar.gz: b082e6d41ccbdd1352d3d96d60579b370778f14e84e407c2c37897638fa9097d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f38433af87b94d11c6816ba62ca2b30f60adb4c7f5c593eaa1ad9278211c6304a997913a7879a3e2fae23ba03f8ba801afd8f425fd566f0a6b85ce1eb26dd1
|
7
|
+
data.tar.gz: 73004d373c49a719820109496206ee3b316e761d47b8d3b3017baa1dffbfd871c1dc2b851e0e2a7f4a77cf4b85a26d06aa3715e79a50c0fb8aa26822997fdb6e
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,34 +1,43 @@
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
2
|
-
# They are provided by a third-party and are governed by
|
3
|
-
# separate terms of service, privacy policy, and support
|
4
|
-
# documentation.
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
-
|
8
|
-
name: ci
|
9
|
-
|
10
|
-
on:
|
11
|
-
push:
|
12
|
-
branches: [main]
|
13
|
-
pull_request:
|
14
|
-
branches: [main]
|
15
|
-
|
16
|
-
jobs:
|
17
|
-
test:
|
18
|
-
runs-on: ubuntu-latest
|
19
|
-
strategy:
|
20
|
-
matrix:
|
21
|
-
ruby-version: ["2.
|
22
|
-
|
23
|
-
steps:
|
24
|
-
- uses: actions/checkout@v2
|
25
|
-
- name: Set up Ruby
|
26
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
27
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
28
|
-
# uses: ruby/setup-ruby@v1
|
29
|
-
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby-version }}
|
32
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
33
|
-
- name: Run tests
|
34
|
-
run: bundle exec rake
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: ci
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [main]
|
13
|
+
pull_request:
|
14
|
+
branches: [main]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
strategy:
|
20
|
+
matrix:
|
21
|
+
ruby-version: ["2.7"]
|
22
|
+
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v2
|
25
|
+
- name: Set up Ruby
|
26
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
27
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
28
|
+
# uses: ruby/setup-ruby@v1
|
29
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby-version }}
|
32
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
33
|
+
- name: Run tests
|
34
|
+
run: bundle exec rake
|
35
|
+
- name: Build docs
|
36
|
+
run: bundle exec rake yard
|
37
|
+
- name: Deploy docs
|
38
|
+
if: ${{ github.ref == 'refs/heads/main' }}
|
39
|
+
uses: peaceiris/actions-gh-pages@v3
|
40
|
+
with:
|
41
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
42
|
+
publish_dir: ./doc
|
43
|
+
publish_branch: gh-pages
|
data/.gitignore
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
|
10
|
-
# rspec failure tracking
|
11
|
-
.rspec_status
|
12
|
-
|
13
|
-
.env
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
|
+
/coverage/
|
5
|
+
/doc/
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/tmp/
|
9
|
+
|
10
|
+
# rspec failure tracking
|
11
|
+
.rspec_status
|
12
|
+
|
13
|
+
.env
|
data/.rspec
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--format documentation
|
2
|
-
--color
|
3
|
-
--require spec_helper
|
1
|
+
--format documentation
|
2
|
+
--color
|
3
|
+
--require spec_helper
|
data/.vscode/settings.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
{
|
2
|
-
"editor.formatOnSave": true,
|
3
|
-
"editor.tabSize": 2
|
1
|
+
{
|
2
|
+
"editor.formatOnSave": true,
|
3
|
+
"editor.tabSize": 2
|
4
4
|
}
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in notion-sdk-ruby.gemspec
|
4
|
-
gemspec
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in notion-sdk-ruby.gemspec
|
4
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,39 +1,69 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
notion-sdk-ruby (0.
|
5
|
-
|
4
|
+
notion-sdk-ruby (0.6.1)
|
5
|
+
faraday (~> 1.8)
|
6
|
+
faraday_middleware (~> 1.1)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
11
|
+
activesupport (6.1.4.1)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
zeitwerk (~> 2.3)
|
10
17
|
addressable (2.7.0)
|
11
18
|
public_suffix (>= 2.0.2, < 5.0)
|
12
19
|
ast (2.4.2)
|
13
20
|
coderay (1.1.3)
|
21
|
+
concurrent-ruby (1.1.9)
|
14
22
|
crack (0.4.5)
|
15
23
|
rexml
|
16
24
|
diff-lcs (1.4.4)
|
17
25
|
dotenv (2.7.6)
|
26
|
+
faraday (1.10.0)
|
27
|
+
faraday-em_http (~> 1.0)
|
28
|
+
faraday-em_synchrony (~> 1.0)
|
29
|
+
faraday-excon (~> 1.1)
|
30
|
+
faraday-httpclient (~> 1.0)
|
31
|
+
faraday-multipart (~> 1.0)
|
32
|
+
faraday-net_http (~> 1.0)
|
33
|
+
faraday-net_http_persistent (~> 1.0)
|
34
|
+
faraday-patron (~> 1.0)
|
35
|
+
faraday-rack (~> 1.0)
|
36
|
+
faraday-retry (~> 1.0)
|
37
|
+
ruby2_keywords (>= 0.0.4)
|
38
|
+
faraday-em_http (1.0.0)
|
39
|
+
faraday-em_synchrony (1.0.0)
|
40
|
+
faraday-excon (1.1.0)
|
41
|
+
faraday-httpclient (1.0.1)
|
42
|
+
faraday-multipart (1.0.4)
|
43
|
+
multipart-post (~> 2)
|
44
|
+
faraday-net_http (1.0.1)
|
45
|
+
faraday-net_http_persistent (1.2.0)
|
46
|
+
faraday-patron (1.0.0)
|
47
|
+
faraday-rack (1.0.0)
|
48
|
+
faraday-retry (1.0.3)
|
49
|
+
faraday_middleware (1.2.0)
|
50
|
+
faraday (~> 1.0)
|
18
51
|
hashdiff (1.0.1)
|
19
|
-
|
20
|
-
|
21
|
-
multi_xml (>= 0.5.2)
|
52
|
+
i18n (1.8.10)
|
53
|
+
concurrent-ruby (~> 1.0)
|
22
54
|
method_source (1.0.0)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
parallel (1.20.1)
|
28
|
-
parser (3.0.1.1)
|
55
|
+
minitest (5.14.4)
|
56
|
+
multipart-post (2.2.3)
|
57
|
+
parallel (1.22.1)
|
58
|
+
parser (3.1.2.0)
|
29
59
|
ast (~> 2.4.1)
|
30
60
|
pry (0.14.1)
|
31
61
|
coderay (~> 1.1)
|
32
62
|
method_source (~> 1.0)
|
33
63
|
public_suffix (4.0.6)
|
34
|
-
rainbow (3.
|
64
|
+
rainbow (3.1.1)
|
35
65
|
rake (12.3.3)
|
36
|
-
regexp_parser (2.
|
66
|
+
regexp_parser (2.5.0)
|
37
67
|
rexml (3.2.5)
|
38
68
|
rspec (3.10.0)
|
39
69
|
rspec-core (~> 3.10.0)
|
@@ -48,44 +78,51 @@ GEM
|
|
48
78
|
diff-lcs (>= 1.2.0, < 2.0)
|
49
79
|
rspec-support (~> 3.10.0)
|
50
80
|
rspec-support (3.10.0)
|
51
|
-
rubocop (1.
|
81
|
+
rubocop (1.29.1)
|
52
82
|
parallel (~> 1.10)
|
53
|
-
parser (>= 3.
|
83
|
+
parser (>= 3.1.0.0)
|
54
84
|
rainbow (>= 2.2.2, < 4.0)
|
55
85
|
regexp_parser (>= 1.8, < 3.0)
|
56
|
-
rexml
|
57
|
-
rubocop-ast (>= 1.
|
86
|
+
rexml (>= 3.2.5, < 4.0)
|
87
|
+
rubocop-ast (>= 1.17.0, < 2.0)
|
58
88
|
ruby-progressbar (~> 1.7)
|
59
89
|
unicode-display_width (>= 1.4.0, < 3.0)
|
60
|
-
rubocop-ast (1.
|
61
|
-
parser (>= 3.
|
62
|
-
rubocop-performance (1.
|
90
|
+
rubocop-ast (1.18.0)
|
91
|
+
parser (>= 3.1.1.0)
|
92
|
+
rubocop-performance (1.13.3)
|
63
93
|
rubocop (>= 1.7.0, < 2.0)
|
64
94
|
rubocop-ast (>= 0.4.0)
|
65
95
|
ruby-progressbar (1.11.0)
|
66
|
-
|
67
|
-
|
68
|
-
rubocop
|
69
|
-
|
70
|
-
|
71
|
-
|
96
|
+
ruby2_keywords (0.0.5)
|
97
|
+
standard (1.12.1)
|
98
|
+
rubocop (= 1.29.1)
|
99
|
+
rubocop-performance (= 1.13.3)
|
100
|
+
tzinfo (2.0.4)
|
101
|
+
concurrent-ruby (~> 1.0)
|
102
|
+
unicode-display_width (2.1.0)
|
103
|
+
vcr (6.1.0)
|
72
104
|
webmock (3.12.2)
|
73
105
|
addressable (>= 2.3.6)
|
74
106
|
crack (>= 0.3.2)
|
75
107
|
hashdiff (>= 0.4.0, < 2.0.0)
|
108
|
+
yard (0.9.26)
|
109
|
+
zeitwerk (2.4.2)
|
76
110
|
|
77
111
|
PLATFORMS
|
78
112
|
ruby
|
79
113
|
x64-mingw32
|
80
114
|
|
81
115
|
DEPENDENCIES
|
116
|
+
activesupport (~> 6.1)
|
82
117
|
dotenv (~> 2.7)
|
83
118
|
notion-sdk-ruby!
|
84
119
|
pry (~> 0.14.1)
|
85
120
|
rake (~> 12.0)
|
86
121
|
rspec (~> 3.0)
|
87
|
-
|
122
|
+
standard (~> 1.0)
|
123
|
+
vcr (~> 6.0)
|
88
124
|
webmock (~> 3.12)
|
125
|
+
yard (~> 0.9.26)
|
89
126
|
|
90
127
|
BUNDLED WITH
|
91
128
|
2.2.3
|
data/LICENSE.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2021 Graham Marlow
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Graham Marlow
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|