cirro-ruby-client 2.3.1 → 2.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/Gemfile.lock +1 -1
- data/README.md +22 -0
- data/lib/cirro_io/client/version.rb +1 -1
- data/lib/cirro_io_v2/resources/user.rb +5 -0
- data/lib/cirro_io_v2/responses/responses.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51f21878ceddfec5a1035267e14859340dfdb7150bb2d79202e2a52fd3df6705
|
4
|
+
data.tar.gz: eff5d3328607b2eed8db0f8d51cbe257fbd05386f9ee7152e62c3f75b9000eab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca00f723db98046a8471acd0731e7476a145805d20c0a6b5098f472b72d923ea788eb71b26c38eb71881a6461d7e6d51f0faeadda289141259d8484c5233d105
|
7
|
+
data.tar.gz: 7a8624699a21941d70a8859f70e7cfc2f71997f0df5171d4ff7008bc7d201e7bebca34ce8eebb4c74a3589ec5c5b3b019a423671cee5a47c2850f2d63eaecad3
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -127,6 +127,28 @@ client.User.update_notification_preference({
|
|
127
127
|
})
|
128
128
|
```
|
129
129
|
|
130
|
+
### Seed user (staging/dev only)
|
131
|
+
|
132
|
+
```ruby
|
133
|
+
# With params (all of them optional)
|
134
|
+
# Password must include at least: 2 letters, 2 digits, 2 special characters
|
135
|
+
# Email must be unique
|
136
|
+
client.User.create(
|
137
|
+
first_name: 'Human',
|
138
|
+
last_name: 'Being',
|
139
|
+
email: 'iamhuman@test.io',
|
140
|
+
time_zone: 'Berlin',
|
141
|
+
country_code: 'DE',
|
142
|
+
birthday: '1975-11-22',
|
143
|
+
password: '@123456abc@'
|
144
|
+
)
|
145
|
+
# => User object
|
146
|
+
|
147
|
+
# Without params (nimbus-style, all params are seeded by Cirro)
|
148
|
+
client.User.create
|
149
|
+
# => User object
|
150
|
+
```
|
151
|
+
|
130
152
|
## Gig
|
131
153
|
### Create a gig
|
132
154
|
|
@@ -1,6 +1,11 @@
|
|
1
1
|
module CirroIOV2
|
2
2
|
module Resources
|
3
3
|
class User < Base
|
4
|
+
def create(params = nil)
|
5
|
+
response = client.request_client.request(:post, resource_root, body: params)
|
6
|
+
CirroIOV2::Responses::UserResponse.new(response.body)
|
7
|
+
end
|
8
|
+
|
4
9
|
def find(id)
|
5
10
|
response = client.request_client.request(:get, "#{resource_root}/#{id}")
|
6
11
|
CirroIOV2::Responses::UserResponse.new(response.body)
|
@@ -15,12 +15,12 @@ module CirroIOV2
|
|
15
15
|
:NotificationTemplateListResponse,
|
16
16
|
].freeze
|
17
17
|
|
18
|
-
UserResponse = Struct.new(:id, :object, :first_name, :last_name, :time_zone, :
|
18
|
+
UserResponse = Struct.new(:id, :object, :first_name, :last_name, :time_zone, :birthday, :country_code, :epam, :worker) do
|
19
19
|
include Base
|
20
20
|
end
|
21
21
|
|
22
22
|
UserNotificationPreferenceResponse = Struct.new(:id, :object, :locale, :topics) do
|
23
|
-
self::NESTED_RESPONSES = { topics: :
|
23
|
+
self::NESTED_RESPONSES = { topics: :NotificationTopicPreferenceListResponse }.freeze
|
24
24
|
include Base
|
25
25
|
end
|
26
26
|
|
@@ -87,7 +87,6 @@ module CirroIOV2
|
|
87
87
|
end
|
88
88
|
|
89
89
|
NotificationTopicPreferenceResponse = Struct.new(:id, :object, :preferences, :notification_topic_id, :user_id) do
|
90
|
-
self::NESTED_RESPONSES = { preferences: :NotificationTopicPreferenceListResponse }.freeze
|
91
90
|
include Base
|
92
91
|
end
|
93
92
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cirro-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cirro Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|