base-api-io 1.1.0 → 1.2.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 +5 -5
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +1 -1
- data/lib/base/endpoints/users.rb +14 -1
- data/lib/base/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 42cdec4ca272b8a89ce45864895274784f372c6cf92838a35bb5ab4739ee3bc0
|
4
|
+
data.tar.gz: 2de61d1b70ae7f85b13552e867b93a18c2bbea36e69831fdd833c2e0407de293
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 391d588a22af6ea72224c8e3a19062599efa55cefc6f20c7f043928b271397f38ff84b37517afac187989f27023e089145d4ae05d4322dd812ba7988ecf63a02
|
7
|
+
data.tar.gz: b0e8778baf659dc613615f915283a9d7f3bdef937caab3cbd8ae7a929ce62bf702143f5abd6d0152dfbd1b970839a0e6d9bde7615f382b9d20abe5d9d0be2867
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
base-ruby
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.3
|
data/Gemfile.lock
CHANGED
data/lib/base/endpoints/users.rb
CHANGED
@@ -21,10 +21,11 @@ module Base
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# Creates a user with the given credentials.
|
24
|
-
def create(email:, password:, confirmation:)
|
24
|
+
def create(email:, password:, confirmation:, custom_data: nil)
|
25
25
|
request do
|
26
26
|
response =
|
27
27
|
connection.post('',
|
28
|
+
'custom_data' => custom_data.to_json,
|
28
29
|
'confirmation' => confirmation,
|
29
30
|
'password' => password,
|
30
31
|
'email' => email)
|
@@ -33,6 +34,18 @@ module Base
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
37
|
+
# Updates a user with the given data.
|
38
|
+
def update(id:, email:, custom_data: nil)
|
39
|
+
request do
|
40
|
+
response =
|
41
|
+
connection.post(id,
|
42
|
+
'custom_data' => custom_data.to_json,
|
43
|
+
'email' => email)
|
44
|
+
|
45
|
+
parse(response.body)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
36
49
|
# Gets the details of the user with the given ID.
|
37
50
|
def get(id)
|
38
51
|
request do
|
data/lib/base/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: base-api-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusztáv Szikszai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -104,6 +104,8 @@ files:
|
|
104
104
|
- ".gitignore"
|
105
105
|
- ".rspec"
|
106
106
|
- ".rubocop.yml"
|
107
|
+
- ".ruby-gemset"
|
108
|
+
- ".ruby-version"
|
107
109
|
- CODE_OF_CONDUCT.md
|
108
110
|
- Gemfile
|
109
111
|
- Gemfile.lock
|
@@ -145,8 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
147
|
- !ruby/object:Gem::Version
|
146
148
|
version: '0'
|
147
149
|
requirements: []
|
148
|
-
|
149
|
-
rubygems_version: 2.4.8
|
150
|
+
rubygems_version: 3.0.3
|
150
151
|
signing_key:
|
151
152
|
specification_version: 4
|
152
153
|
summary: Ruby client library for the Base API
|