notion-ruby-client 0.0.8 → 0.1.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/.github/workflows/ci.yml +1 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +9 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +29 -7
- data/README.md +245 -55
- data/bin/console +31 -0
- data/lib/notion/api/endpoints/blocks.rb +35 -7
- data/lib/notion/api/endpoints/databases.rb +65 -37
- data/lib/notion/api/endpoints/pages.rb +6 -6
- data/lib/notion/api/endpoints/search.rb +41 -0
- data/lib/notion/api/endpoints/users.rb +6 -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 +3 -1
- 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 +67 -58
- data/spec/fixtures/notion/create_page.yml +68 -59
- data/spec/fixtures/notion/database.yml +78 -61
- data/spec/fixtures/notion/database_query.yml +81 -62
- data/spec/fixtures/notion/databases_list.yml +77 -60
- data/spec/fixtures/notion/page.yml +70 -57
- 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 +71 -59
- data/spec/fixtures/notion/users.yml +69 -56
- data/spec/fixtures/notion/users_list.yml +143 -130
- data/spec/notion/api/endpoints/blocks_spec.rb +37 -11
- data/spec/notion/api/endpoints/databases_spec.rb +25 -17
- data/spec/notion/api/endpoints/pages_spec.rb +7 -16
- data/spec/notion/api/endpoints/search_spec.rb +26 -0
- data/spec/notion/api/endpoints/users_spec.rb +4 -4
- data/spec/notion/pagination/cursor_spec.rb +126 -0
- metadata +52 -8
- data/.rspec_status +0 -19
- data/notion-ruby-client-0.0.4.gem +0 -0
- data/scratchpad.rb +0 -22
- data/screenshots/create_notion_bot.png +0 -0
data/.rspec_status
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
---------------------------------------------------- | ------ | --------------- |
|
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 |
|
Binary file
|
data/scratchpad.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Notion.configure do |config|
|
2
|
-
config.token = ENV['NOTION_API_TOKEN']
|
3
|
-
end
|
4
|
-
|
5
|
-
client = Notion::Client.new(token: 'token')
|
6
|
-
|
7
|
-
|
8
|
-
client = Notion::Client.new
|
9
|
-
client.auth_test
|
10
|
-
|
11
|
-
client.database(id)
|
12
|
-
client.database_query(id, options)
|
13
|
-
|
14
|
-
client.page(id)
|
15
|
-
client.create_page(options)
|
16
|
-
client.update_page(id, options)
|
17
|
-
|
18
|
-
client.user(id)
|
19
|
-
client.list_users(options)
|
20
|
-
|
21
|
-
|
22
|
-
# https://c15c8970-daea-4c88-9bcd-93726522a93e.mock.pstmn.io
|
Binary file
|