notion-sdk-ruby 0.3.1 → 0.4.0
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 +34 -34
- data/.gitignore +13 -13
- data/.rspec +3 -3
- data/.travis.yml +6 -6
- data/.vscode/settings.json +3 -3
- data/Gemfile +4 -4
- data/Gemfile.lock +3 -3
- data/LICENSE.txt +21 -21
- data/README.md +263 -263
- data/Rakefile +7 -7
- data/bin/console +11 -11
- data/bin/setup +8 -8
- data/lib/notion-sdk-ruby.rb +27 -27
- data/lib/notion-sdk-ruby/client.rb +26 -26
- data/lib/notion-sdk-ruby/config.rb +5 -5
- data/lib/notion-sdk-ruby/error.rb +52 -52
- data/lib/notion-sdk-ruby/operations/search.rb +9 -9
- data/lib/notion-sdk-ruby/request_client.rb +50 -50
- data/lib/notion-sdk-ruby/resources/blocks.rb +17 -17
- data/lib/notion-sdk-ruby/resources/databases.rb +19 -15
- data/lib/notion-sdk-ruby/resources/pages.rb +15 -15
- data/lib/notion-sdk-ruby/resources/users.rb +11 -11
- data/lib/notion-sdk-ruby/version.rb +3 -3
- data/notion-sdk-ruby.gemspec +37 -37
- metadata +7 -7
@@ -1,15 +1,15 @@
|
|
1
|
-
module Notion
|
2
|
-
class Pages
|
3
|
-
def retrieve(id)
|
4
|
-
RequestClient.active_client.get("/v1/pages/#{id}")
|
5
|
-
end
|
6
|
-
|
7
|
-
def create(body)
|
8
|
-
RequestClient.active_client.post("/v1/pages", body: body.to_json)
|
9
|
-
end
|
10
|
-
|
11
|
-
def update(id, body)
|
12
|
-
RequestClient.active_client.patch("/v1/pages/#{id}", body: body.to_json)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
1
|
+
module Notion
|
2
|
+
class Pages
|
3
|
+
def retrieve(id)
|
4
|
+
RequestClient.active_client.get("/v1/pages/#{id}")
|
5
|
+
end
|
6
|
+
|
7
|
+
def create(body)
|
8
|
+
RequestClient.active_client.post("/v1/pages", body: body.to_json)
|
9
|
+
end
|
10
|
+
|
11
|
+
def update(id, body)
|
12
|
+
RequestClient.active_client.patch("/v1/pages/#{id}", body: body.to_json)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
module Notion
|
2
|
-
class Users
|
3
|
-
def list
|
4
|
-
RequestClient.active_client.get("/v1/users")
|
5
|
-
end
|
6
|
-
|
7
|
-
def retrieve(id)
|
8
|
-
RequestClient.active_client.get("/v1/users/#{id}")
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
1
|
+
module Notion
|
2
|
+
class Users
|
3
|
+
def list
|
4
|
+
RequestClient.active_client.get("/v1/users")
|
5
|
+
end
|
6
|
+
|
7
|
+
def retrieve(id)
|
8
|
+
RequestClient.active_client.get("/v1/users/#{id}")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module Notion
|
2
|
-
VERSION = "0.
|
3
|
-
end
|
1
|
+
module Notion
|
2
|
+
VERSION = "0.4.0"
|
3
|
+
end
|
data/notion-sdk-ruby.gemspec
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require_relative "lib/notion-sdk-ruby/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "notion-sdk-ruby"
|
7
|
-
spec.version = Notion::VERSION
|
8
|
-
spec.authors = ["Graham Marlow"]
|
9
|
-
spec.email = ["mgmarlow@hey.com"]
|
10
|
-
|
11
|
-
spec.summary = "Notion SDK"
|
12
|
-
spec.homepage = "https://github.com/mgmarlow/notion-sdk-ruby"
|
13
|
-
spec.license = "MIT"
|
14
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
15
|
-
|
16
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
-
spec.metadata["source_code_uri"] = "https://github.com/mgmarlow/notion-sdk-ruby"
|
18
|
-
spec.metadata["changelog_uri"] = "https://github.com/mgmarlow/notion-sdk-ruby/blob/master/CHANGELOG.md"
|
19
|
-
|
20
|
-
# Specify which files should be added to the gem when it is released.
|
21
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
-
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
23
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
-
end
|
25
|
-
spec.bindir = "exe"
|
26
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
-
spec.require_paths = ["lib"]
|
28
|
-
|
29
|
-
spec.add_dependency "httparty", "~> 0.18.1"
|
30
|
-
|
31
|
-
spec.add_development_dependency "rake", "~> 12.0"
|
32
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
33
|
-
spec.add_development_dependency "standardrb", "~> 1.0"
|
34
|
-
spec.add_development_dependency "webmock", "~> 3.12"
|
35
|
-
spec.add_development_dependency "pry", "~> 0.14.1"
|
36
|
-
spec.add_development_dependency "dotenv", "~> 2.7"
|
37
|
-
end
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require_relative "lib/notion-sdk-ruby/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "notion-sdk-ruby"
|
7
|
+
spec.version = Notion::VERSION
|
8
|
+
spec.authors = ["Graham Marlow"]
|
9
|
+
spec.email = ["mgmarlow@hey.com"]
|
10
|
+
|
11
|
+
spec.summary = "Notion SDK"
|
12
|
+
spec.homepage = "https://github.com/mgmarlow/notion-sdk-ruby"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/mgmarlow/notion-sdk-ruby"
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/mgmarlow/notion-sdk-ruby/blob/master/CHANGELOG.md"
|
19
|
+
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
23
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
+
end
|
25
|
+
spec.bindir = "exe"
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_dependency "httparty", "~> 0.18.1"
|
30
|
+
|
31
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
32
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
33
|
+
spec.add_development_dependency "standardrb", "~> 1.0"
|
34
|
+
spec.add_development_dependency "webmock", "~> 3.12"
|
35
|
+
spec.add_development_dependency "pry", "~> 0.14.1"
|
36
|
+
spec.add_development_dependency "dotenv", "~> 2.7"
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notion-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Marlow
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '2.7'
|
111
|
-
description:
|
111
|
+
description:
|
112
112
|
email:
|
113
113
|
- mgmarlow@hey.com
|
114
114
|
executables: []
|
@@ -146,7 +146,7 @@ metadata:
|
|
146
146
|
homepage_uri: https://github.com/mgmarlow/notion-sdk-ruby
|
147
147
|
source_code_uri: https://github.com/mgmarlow/notion-sdk-ruby
|
148
148
|
changelog_uri: https://github.com/mgmarlow/notion-sdk-ruby/blob/master/CHANGELOG.md
|
149
|
-
post_install_message:
|
149
|
+
post_install_message:
|
150
150
|
rdoc_options: []
|
151
151
|
require_paths:
|
152
152
|
- lib
|
@@ -161,8 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.
|
165
|
-
signing_key:
|
164
|
+
rubygems_version: 3.2.3
|
165
|
+
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Notion SDK
|
168
168
|
test_files: []
|