cirro-ruby-client 2.5.9 → 2.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -10
- data/README.md +21 -1
- data/lib/cirro_io/client/version.rb +1 -1
- data/lib/cirro_io_v2/resources/gig.rb +7 -0
- data/lib/cirro_io_v2/responses/responses.rb +1 -1
- 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: 2ce81e7b0822c3a040876d798246e58e6e3c1d4d53ae65a00d8f8c31a1b93376
|
4
|
+
data.tar.gz: 2a6ba790c9021d73593c657de850874ee30483b9defbe909be87b4cd5af44d1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e7c815ff399fce832806acd5e5e02af6f55c74de231390cbdf7f24cacc17eadf0c2608888e6e6a299c2eed96a3bb3c46ba0ad3a791509bb91bf732464e4194a
|
7
|
+
data.tar.gz: 63ed1f73437dad7695725311b279c06b3dc57209d9a2211cfc305eafcacd7103ed110a933c7b3b524a5976b8eb55db24c6a256825a3c7c55adaccb76b2861e81
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cirro-ruby-client (2.5.
|
4
|
+
cirro-ruby-client (2.5.11)
|
5
5
|
activesupport
|
6
6
|
faraday (< 1.2.0)
|
7
7
|
faraday_middleware
|
@@ -11,14 +11,13 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activemodel (
|
15
|
-
activesupport (=
|
16
|
-
activesupport (
|
14
|
+
activemodel (7.0.4.2)
|
15
|
+
activesupport (= 7.0.4.2)
|
16
|
+
activesupport (7.0.4.2)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 1.6, < 2)
|
19
19
|
minitest (>= 5.1)
|
20
20
|
tzinfo (~> 2.0)
|
21
|
-
zeitwerk (~> 2.3)
|
22
21
|
addressable (2.8.0)
|
23
22
|
public_suffix (>= 2.0.2, < 5.0)
|
24
23
|
ast (2.4.1)
|
@@ -43,10 +42,10 @@ GEM
|
|
43
42
|
faraday (>= 0.15.2, < 2.0)
|
44
43
|
faraday_middleware (>= 0.9.0, < 2.0)
|
45
44
|
rack (>= 0.2)
|
46
|
-
jwt (2.
|
45
|
+
jwt (2.7.0)
|
47
46
|
method_source (1.0.0)
|
48
47
|
minitest (5.17.0)
|
49
|
-
multipart-post (2.
|
48
|
+
multipart-post (2.3.0)
|
50
49
|
parallel (1.19.2)
|
51
50
|
parser (2.7.2.0)
|
52
51
|
ast (~> 2.4.1)
|
@@ -54,7 +53,7 @@ GEM
|
|
54
53
|
coderay (~> 1.1)
|
55
54
|
method_source (~> 1.0)
|
56
55
|
public_suffix (4.0.6)
|
57
|
-
rack (3.0.
|
56
|
+
rack (3.0.4.1)
|
58
57
|
rainbow (3.0.0)
|
59
58
|
rake (12.3.3)
|
60
59
|
regexp_parser (1.8.1)
|
@@ -87,14 +86,13 @@ GEM
|
|
87
86
|
rubocop (~> 0.87)
|
88
87
|
ruby-progressbar (1.10.1)
|
89
88
|
ruby2_keywords (0.0.5)
|
90
|
-
tzinfo (2.0.
|
89
|
+
tzinfo (2.0.6)
|
91
90
|
concurrent-ruby (~> 1.0)
|
92
91
|
unicode-display_width (1.7.0)
|
93
92
|
webmock (3.9.1)
|
94
93
|
addressable (>= 2.3.6)
|
95
94
|
crack (>= 0.3.2)
|
96
95
|
hashdiff (>= 0.4.0, < 2.0.0)
|
97
|
-
zeitwerk (2.6.6)
|
98
96
|
|
99
97
|
PLATFORMS
|
100
98
|
ruby
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ Or install it yourself as:
|
|
38
38
|
|
39
39
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
40
40
|
|
41
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then
|
41
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then wait for circle CI to complete, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
42
42
|
|
43
43
|
## License
|
44
44
|
|
@@ -186,6 +186,26 @@ client.Gig.create(
|
|
186
186
|
# => Gig object
|
187
187
|
```
|
188
188
|
|
189
|
+
### Manually invite user to a gig
|
190
|
+
|
191
|
+
##### Invite single user
|
192
|
+
```ruby
|
193
|
+
gig_id = 1
|
194
|
+
app_user_id = 1
|
195
|
+
|
196
|
+
client.Gig.invite(gig_id, { user_id: app_user_id })
|
197
|
+
# => GigInvitation object
|
198
|
+
```
|
199
|
+
|
200
|
+
##### Invite multiple users and overwrite no_reward
|
201
|
+
```ruby
|
202
|
+
gig_id = 1
|
203
|
+
users = [{ id: 1, no_reward: true }, { id: 2, no_reward: true }]
|
204
|
+
|
205
|
+
client.Gig.invite(gig_id, { users: users })
|
206
|
+
# => GigInvitationList object
|
207
|
+
```
|
208
|
+
|
189
209
|
## GigInvitation
|
190
210
|
### Get list of gig invitations
|
191
211
|
|
@@ -35,6 +35,13 @@ module CirroIOV2
|
|
35
35
|
response = client.request_client.request(:post, "#{resource_root}/#{gig_id}/tasks/#{task_id}", body: params)
|
36
36
|
Responses::GigTaskResponse.new(response.body)
|
37
37
|
end
|
38
|
+
|
39
|
+
def invite(id, params)
|
40
|
+
response = client.request_client.request(:post, "#{resource_root}/#{id}/invite", body: params)
|
41
|
+
|
42
|
+
return Responses::GigInvitationResponse.new(response.body) if response.body['object'] == 'gig_invitation'
|
43
|
+
return Responses::GigInvitationListResponse.new(response.body) if response.body['object'] == 'list'
|
44
|
+
end
|
38
45
|
end
|
39
46
|
end
|
40
47
|
end
|
@@ -15,7 +15,7 @@ module CirroIOV2
|
|
15
15
|
:NotificationTemplateListResponse,
|
16
16
|
].freeze
|
17
17
|
|
18
|
-
UserResponse = Struct.new(:id, :object, :first_name, :last_name, :time_zone, :birthday, :country_code, :epam, :worker) do
|
18
|
+
UserResponse = Struct.new(:id, :object, :first_name, :last_name, :time_zone, :birthday, :country_code, :epam, :worker, :anonymous_email) do
|
19
19
|
include Base
|
20
20
|
end
|
21
21
|
|
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.5.
|
4
|
+
version: 2.5.11
|
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: 2023-02-
|
11
|
+
date: 2023-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|