cirro-ruby-client 2.3.2 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/client.rb +5 -0
- data/lib/cirro_io_v2/resources/epam_heroes/badges.rb +14 -0
- data/lib/cirro_io_v2/resources/user.rb +5 -0
- data/lib/cirro_io_v2/responses/responses.rb +4 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e01d27afc3b2ca9afac09783df0cae430395f2a00d1b7fb6a617e4b0231dfa7
|
4
|
+
data.tar.gz: 9ef82082045a4020406ffe7a4b4ac6bbebfcba9dfcd614db5cb3f9d2a8c65567
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '084b92fe22623087cb81e08927ffafbbf8968f9852fc401cc2fa86b8535d28118f1a5b991aa9542c376e5a582b5d7206bac34c09a3bb123c535ab3698f62bd19'
|
7
|
+
data.tar.gz: ff6163af97d57acf598157839e908ec7eec1cb584e9f0a4b6a411c30f27055f418eb6bd5b5b3616dec4607298a02f5fcb6812a3447530eaad51e71f17707b07b
|
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
|
|
data/lib/cirro_io_v2/client.rb
CHANGED
@@ -13,6 +13,7 @@ require 'cirro_io_v2/resources/payout'
|
|
13
13
|
require 'cirro_io_v2/resources/gig_invitation'
|
14
14
|
require 'cirro_io_v2/resources/user'
|
15
15
|
require 'cirro_io_v2/resources/space_invitation'
|
16
|
+
require 'cirro_io_v2/resources/epam_heroes/badges'
|
16
17
|
|
17
18
|
require 'cirro_io_v2/responses/base'
|
18
19
|
require 'cirro_io_v2/responses/responses'
|
@@ -121,6 +122,10 @@ module CirroIOV2
|
|
121
122
|
Resources::NotificationTemplate.new(self)
|
122
123
|
end
|
123
124
|
|
125
|
+
def EpamHeroesBadges
|
126
|
+
Resources::EpamHeroes::Badges.new(self)
|
127
|
+
end
|
128
|
+
|
124
129
|
# rubocop:enable Naming/MethodName
|
125
130
|
end
|
126
131
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module CirroIOV2
|
2
|
+
module Resources
|
3
|
+
module EpamHeroes
|
4
|
+
class Badges < Base
|
5
|
+
ENDPOINT_PATH = 'epam_heroes/badges'.freeze
|
6
|
+
|
7
|
+
def create(params)
|
8
|
+
response = client.request_client.request(:post, ENDPOINT_PATH, body: params)
|
9
|
+
Responses::EpamHeroesBadgeResponse.new(response.body)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -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)
|
@@ -129,6 +129,10 @@ module CirroIOV2
|
|
129
129
|
include Base
|
130
130
|
end
|
131
131
|
|
132
|
+
EpamHeroesBadgeResponse = Struct.new(:content, :refs, :paging, :hasMoreResults) do
|
133
|
+
include Base
|
134
|
+
end
|
135
|
+
|
132
136
|
# cover the list responses
|
133
137
|
def self.const_missing(name)
|
134
138
|
return const_get(name) if const_defined? name
|
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.5.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-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- lib/cirro_io_v2/request_clients/base.rb
|
128
128
|
- lib/cirro_io_v2/request_clients/jwt.rb
|
129
129
|
- lib/cirro_io_v2/resources/base.rb
|
130
|
+
- lib/cirro_io_v2/resources/epam_heroes/badges.rb
|
130
131
|
- lib/cirro_io_v2/resources/gig.rb
|
131
132
|
- lib/cirro_io_v2/resources/gig_invitation.rb
|
132
133
|
- lib/cirro_io_v2/resources/gig_result.rb
|