notion-sdk-ruby 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -11
- data/Gemfile.lock +2 -2
- data/README.md +9 -1
- data/lib/notion/client.rb +1 -0
- data/lib/notion/endpoints/blocks.rb +1 -1
- data/lib/notion/endpoints/databases.rb +1 -1
- data/lib/notion/endpoints/pages.rb +2 -2
- data/lib/notion/endpoints/search.rb +1 -1
- data/lib/notion/version.rb +1 -1
- data/notion-sdk-ruby.gemspec +9 -0
- metadata +101 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 876930491da71b978c0a95bb00e5d8838eb1ad4655489ab10d7d66e291708bba
|
4
|
+
data.tar.gz: e4a1998ecbc4719fc3697fc0e562d31f59830d9f736a2b29e825a908fde368a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 318989ffe70cd56b2c91fa08ee04a265fd246cb0b36c9b0a1b72b78d60532159a30412ad2d0e74291af723dc1044acc19737692d2ccc10bf1c91c6830a2cf735
|
7
|
+
data.tar.gz: d3e6a6101aeb1c53667c4402498c6b6594170d40fb84513c8375ca4371bbf1dc8600bb0ce28d7ca97c89daf371ae8948f91fafca9abc3b52f8590f1748510526
|
data/Gemfile
CHANGED
@@ -2,14 +2,3 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in notion-sdk-ruby.gemspec
|
4
4
|
gemspec
|
5
|
-
|
6
|
-
gem "httparty", "~> 0.18.1"
|
7
|
-
|
8
|
-
group :development, :test do
|
9
|
-
gem "rake", "~> 12.0"
|
10
|
-
gem "rspec", "~> 3.0"
|
11
|
-
gem "standardrb", "~> 1.0"
|
12
|
-
gem "webmock", "~> 3.12"
|
13
|
-
gem "pry", "~> 0.14.1"
|
14
|
-
gem "dotenv", "~> 2.7"
|
15
|
-
end
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
notion-sdk-ruby (0.2.
|
4
|
+
notion-sdk-ruby (0.2.2)
|
5
|
+
httparty (~> 0.18.1)
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
@@ -79,7 +80,6 @@ PLATFORMS
|
|
79
80
|
|
80
81
|
DEPENDENCIES
|
81
82
|
dotenv (~> 2.7)
|
82
|
-
httparty (~> 0.18.1)
|
83
83
|
notion-sdk-ruby!
|
84
84
|
pry (~> 0.14.1)
|
85
85
|
rake (~> 12.0)
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Notion Ruby SDK
|
2
2
|
|
3
|
+
Unofficial Ruby client for the [Notion APIs](https://developers.notion.com/).
|
4
|
+
|
3
5
|
## Installation
|
4
6
|
|
5
7
|
Add this line to your application's Gemfile:
|
@@ -18,8 +20,14 @@ Or install it yourself as:
|
|
18
20
|
|
19
21
|
## Usage
|
20
22
|
|
23
|
+
Initialize `Notion::Client` with your app's [integration secret](https://developers.notion.com/docs/getting-started#create-a-new-integration).
|
24
|
+
|
21
25
|
```rb
|
22
|
-
|
26
|
+
require "notion-sdk-ruby"
|
27
|
+
client = Notion::Client.new(token: ENV["NOTION_API_SECRET"])
|
28
|
+
|
29
|
+
# get users
|
30
|
+
client.get_users
|
23
31
|
```
|
24
32
|
|
25
33
|
### Databases
|
data/lib/notion/client.rb
CHANGED
@@ -6,11 +6,11 @@ module Notion
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def create_page(body)
|
9
|
-
self.class.post("/v1/pages", body: body)
|
9
|
+
self.class.post("/v1/pages", body: body.to_json)
|
10
10
|
end
|
11
11
|
|
12
12
|
def update_page(id, body)
|
13
|
-
self.class.patch("/v1/pages/#{id}", body: body)
|
13
|
+
self.class.patch("/v1/pages/#{id}", body: body.to_json)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/notion/version.rb
CHANGED
data/notion-sdk-ruby.gemspec
CHANGED
@@ -23,4 +23,13 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.bindir = "exe"
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_dependency 'httparty', "~> 0.18.1"
|
28
|
+
|
29
|
+
spec.add_development_dependency 'rake', "~> 12.0"
|
30
|
+
spec.add_development_dependency 'rspec', "~> 3.0"
|
31
|
+
spec.add_development_dependency 'standardrb', "~> 1.0"
|
32
|
+
spec.add_development_dependency 'webmock', "~> 3.12"
|
33
|
+
spec.add_development_dependency 'pry', "~> 0.14.1"
|
34
|
+
spec.add_development_dependency 'dotenv', "~> 2.7"
|
26
35
|
end
|
metadata
CHANGED
@@ -1,15 +1,113 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notion-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Marlow
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
12
|
-
dependencies:
|
11
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.18.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.18.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '12.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '12.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: standardrb
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.12'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.12'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.14.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.14.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: dotenv
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.7'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.7'
|
13
111
|
description:
|
14
112
|
email:
|
15
113
|
- mgmarlow@hey.com
|