notion-ruby-client 0.0.5 → 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 +32 -0
- data/CODE_OF_CONDUCT.md +128 -0
- data/Gemfile.lock +37 -11
- data/README.md +318 -47
- data/bin/console +31 -0
- data/lib/notion/api/endpoints/blocks.rb +35 -7
- data/lib/notion/api/endpoints/databases.rb +67 -17
- data/lib/notion/api/endpoints/pages.rb +7 -7
- 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/faraday/request.rb +1 -0
- data/lib/notion/pagination/cursor.rb +5 -2
- data/lib/notion/version.rb +3 -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 +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/databases_list.yml +77 -60
- data/spec/fixtures/notion/page.yml +78 -61
- 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/notion/api/endpoints/blocks_spec.rb +37 -11
- data/spec/notion/api/endpoints/databases_spec.rb +43 -9
- data/spec/notion/api/endpoints/pages_spec.rb +15 -13
- 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 +55 -8
- 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/.rspec_status
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
example_id | status | run_time |
|
|
2
|
-
---------------------------------------------------- | ------ | --------------- |
|
|
3
|
-
./spec/notion/api/endpoints/blocks_spec.rb[1:1:1] | passed | 0.01164 seconds |
|
|
4
|
-
./spec/notion/api/endpoints/blocks_spec.rb[1:1:2] | passed | 0.01245 seconds |
|
|
5
|
-
./spec/notion/api/endpoints/blocks_spec.rb[1:1:3] | passed | 0.00697 seconds |
|
|
6
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:1] | passed | 0.00697 seconds |
|
|
7
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:2] | passed | 0.00682 seconds |
|
|
8
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:3] | passed | 0.00741 seconds |
|
|
9
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:4] | passed | 0.00701 seconds |
|
|
10
|
-
./spec/notion/api/endpoints/databases_spec.rb[1:1:5] | passed | 0.00795 seconds |
|
|
11
|
-
./spec/notion/api/endpoints/pages_spec.rb[1:1:1] | passed | 0.00713 seconds |
|
|
12
|
-
./spec/notion/api/endpoints/pages_spec.rb[1:1:2] | passed | 0.00774 seconds |
|
|
13
|
-
./spec/notion/api/endpoints/pages_spec.rb[1:1:3] | passed | 0.00818 seconds |
|
|
14
|
-
./spec/notion/api/endpoints/users_spec.rb[1:1:1] | passed | 0.00703 seconds |
|
|
15
|
-
./spec/notion/api/endpoints/users_spec.rb[1:1:2] | passed | 0.00683 seconds |
|
|
16
|
-
./spec/notion/api/endpoints/users_spec.rb[1:1:3] | passed | 0.00647 seconds |
|
|
17
|
-
./spec/notion/config_spec.rb[1:1:1] | passed | 0.00006 seconds |
|
|
18
|
-
./spec/notion/version_spec.rb[1:1] | passed | 0.00005 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
|