cirro-ruby-client 2.5.9 → 2.5.10
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 +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
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62d67c74b39ad3cfdf6a3b4fc702f66ffe2226c74251744da6f945ea22cf83de
|
4
|
+
data.tar.gz: b364f193db66511a8bf7d08748caf10afd2da444592142026b83d84309d74661
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3eda62148e1c0425c39921b60c4a0396cf767a53bddbe9969974c5f34cc8670cb79b2085c9e08c3a7514e205f4107aa6dbe0c71e689bd7c9d32a950cc372f1f8
|
7
|
+
data.tar.gz: '0105583b3f11ac000db1c5d837d4a7f7d9f19f07fa702e9d612f65837eb860e5a242e278664cee10fb442af1d64a28eb052176ebc5abaacbf2f4ae2da9bea706'
|
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.10)
|
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
|