zoom_rb 0.9.0 → 0.9.1
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/.gitignore +2 -1
- data/Gemfile.lock +1 -1
- data/lib/zoom/actions/webinar.rb +3 -3
- data/lib/zoom/version.rb +1 -1
- data/spec/fixtures/webinar/past_webinar_list.json +8 -0
- data/spec/lib/zoom/actions/meeting/create_spec.rb +2 -2
- data/spec/lib/zoom/actions/report/webinar_participants_report_spec.rb +2 -2
- data/spec/lib/zoom/actions/user/create_spec.rb +2 -2
- data/spec/lib/zoom/actions/user/delete_spec.rb +2 -2
- data/spec/lib/zoom/actions/user/get_spec.rb +2 -2
- data/spec/lib/zoom/actions/user/list_spec.rb +2 -2
- data/spec/lib/zoom/actions/user/update_spec.rb +2 -2
- data/spec/lib/zoom/actions/webinar/create_spec.rb +2 -2
- data/spec/lib/zoom/actions/webinar/delete_spec.rb +3 -3
- data/spec/lib/zoom/actions/webinar/get_spec.rb +1 -1
- data/spec/lib/zoom/actions/webinar/list_spec.rb +2 -2
- data/spec/lib/zoom/actions/webinar/past_webinar_list_spec.rb +44 -0
- data/spec/lib/zoom/actions/webinar/registrants/add_spec.rb +2 -2
- data/spec/lib/zoom/actions/webinar/registrants/list_spec.rb +2 -2
- data/spec/lib/zoom/actions/webinar/registrants/update_status_spec.rb +1 -1
- data/spec/lib/zoom/actions/webinar/update_spec.rb +2 -2
- metadata +5 -2
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad16279c225cd1874a9923203eafd25dce7b8f122cb9f5abf2cb5126e2792ef6
|
4
|
+
data.tar.gz: 34fbf4d1a4a4d5dbf02c32cc994ea6eaacdee90b613f70a29d573d9b451e3d3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f392deada6b8e9e7ff03007d295ec97981958a14a1ca6b45cfd4ade5ce6cf7445c6603e899a548d3aef5ff904f02e91138a4bd28ea47da7dd892f3fff9a6d566
|
7
|
+
data.tar.gz: 18f7a36b1f5af0073a87cf66ddfb5ee03bb5bfe1b1be6635a39cd493ec6d82b775e14d6979bbd0aa02c20065bfc70b42575ce944e786ae3cf3bbb68ab4b3b317
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/zoom/actions/webinar.rb
CHANGED
@@ -100,9 +100,9 @@ module Zoom
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def past_webinar_list(*args)
|
103
|
-
|
104
|
-
|
105
|
-
|
103
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
104
|
+
params.require(:id)
|
105
|
+
Utils.parse_response self.class.get("/past_webinars/#{params[:id]}/instances", headers: request_headers)
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
data/lib/zoom/version.rb
CHANGED
@@ -15,7 +15,7 @@ describe Zoom::Actions::Meeting do
|
|
15
15
|
zoom_url("/users/#{args[:user_id]}/meetings")
|
16
16
|
).to_return(status: 201,
|
17
17
|
body: json_response('meeting','create'),
|
18
|
-
headers: {
|
18
|
+
headers: { 'Content-Type' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
21
21
|
it "requires user_id param" do
|
@@ -52,7 +52,7 @@ describe Zoom::Actions::Meeting do
|
|
52
52
|
zoom_url("/users/#{args[:user_id]}/meetings")
|
53
53
|
).to_return(status: 404,
|
54
54
|
body: json_response('error', 'user_not_exist'),
|
55
|
-
headers: {
|
55
|
+
headers: { 'Content-Type' => 'application/json' })
|
56
56
|
end
|
57
57
|
|
58
58
|
it 'raises an error' do
|
@@ -14,7 +14,7 @@ describe Zoom::Actions::Report do
|
|
14
14
|
zoom_url("/report/webinars/#{args[:id]}/participants")
|
15
15
|
).to_return(status: 200,
|
16
16
|
body: json_response('report', 'webinar', 'participants'),
|
17
|
-
headers: {
|
17
|
+
headers: { 'Content-Type' => 'application/json' })
|
18
18
|
end
|
19
19
|
|
20
20
|
it "requires a 'id' argument" do
|
@@ -33,7 +33,7 @@ describe Zoom::Actions::Report do
|
|
33
33
|
zoom_url("/report/webinars/#{args[:id]}/participants")
|
34
34
|
).to_return(status: 404,
|
35
35
|
body: json_response('error', 'not_found'),
|
36
|
-
headers: {
|
36
|
+
headers: { 'Content-Type' => 'application/json' })
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'raises an error' do
|
@@ -21,7 +21,7 @@ describe Zoom::Actions::User do
|
|
21
21
|
zoom_url('/users')
|
22
22
|
).to_return(status: 201,
|
23
23
|
body: json_response('user', 'create'),
|
24
|
-
headers: {
|
24
|
+
headers: { 'Content-Type' => 'application/json' })
|
25
25
|
end
|
26
26
|
|
27
27
|
it 'requires action param' do
|
@@ -91,7 +91,7 @@ describe Zoom::Actions::User do
|
|
91
91
|
zoom_url('/users')
|
92
92
|
).to_return(status: 409,
|
93
93
|
body: json_response('error', 'already_exists'),
|
94
|
-
headers: {
|
94
|
+
headers: { 'Content-Type' => 'application/json' })
|
95
95
|
end
|
96
96
|
|
97
97
|
it 'raises an error' do
|
@@ -14,7 +14,7 @@ describe Zoom::Actions::User do
|
|
14
14
|
zoom_url("/users/#{args[:id]}")
|
15
15
|
).to_return(status: 204,
|
16
16
|
body: json_response('user', 'delete'),
|
17
|
-
headers: {
|
17
|
+
headers: { 'Content-Type' => 'application/json' })
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'requires id param' do
|
@@ -33,7 +33,7 @@ describe Zoom::Actions::User do
|
|
33
33
|
zoom_url("/users/#{args[:id]}")
|
34
34
|
).to_return(status: 404,
|
35
35
|
body: json_response('error', 'not_found'),
|
36
|
-
headers: {
|
36
|
+
headers: { 'Content-Type' => 'application/json' })
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'raises an error' do
|
@@ -14,7 +14,7 @@ describe Zoom::Actions::User do
|
|
14
14
|
zoom_url("/users/#{args[:id]}")
|
15
15
|
).to_return(status: 200,
|
16
16
|
body: json_response('user', 'get'),
|
17
|
-
headers: {
|
17
|
+
headers: { 'Content-Type' => 'application/json' })
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'requires id param' do
|
@@ -43,7 +43,7 @@ describe Zoom::Actions::User do
|
|
43
43
|
zoom_url("/users/#{args[:id]}")
|
44
44
|
).to_return(status: 404,
|
45
45
|
body: json_response('error', 'validation'),
|
46
|
-
headers: {
|
46
|
+
headers: { 'Content-Type' => 'application/json' })
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'raises Zoom::Error exception' do
|
@@ -12,7 +12,7 @@ describe Zoom::Actions::User do
|
|
12
12
|
:get,
|
13
13
|
zoom_url('/users')
|
14
14
|
).to_return(body: json_response('user', 'list'),
|
15
|
-
headers: {
|
15
|
+
headers: { 'Content-Type' => 'application/json' })
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'returns a hash' do
|
@@ -39,7 +39,7 @@ describe Zoom::Actions::User do
|
|
39
39
|
zoom_url('/users')
|
40
40
|
).to_return(status: 404,
|
41
41
|
body: json_response('error', 'not_found'),
|
42
|
-
headers: {
|
42
|
+
headers: { 'Content-Type' => 'application/json' })
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'raises Zoom::Error exception' do
|
@@ -16,7 +16,7 @@ describe Zoom::Actions::User do
|
|
16
16
|
zoom_url("/users/#{args[:id]}")
|
17
17
|
).to_return(status: 204,
|
18
18
|
body: json_response('user', 'update'),
|
19
|
-
headers: {
|
19
|
+
headers: { 'Content-Type' => 'application/json' })
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'requires id param' do
|
@@ -34,7 +34,7 @@ describe Zoom::Actions::User do
|
|
34
34
|
zoom_url("/users/#{args[:id]}")
|
35
35
|
).to_return(status: 404,
|
36
36
|
body: json_response('error', 'validation'),
|
37
|
-
headers: {
|
37
|
+
headers: { 'Content-Type' => 'application/json' })
|
38
38
|
end
|
39
39
|
|
40
40
|
it 'raises an error' do
|
@@ -13,7 +13,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
13
13
|
:post,
|
14
14
|
zoom_url("/users/#{args[:host_id]}/webinars")
|
15
15
|
).to_return(body: json_response('webinar', 'create'),
|
16
|
-
headers: {
|
16
|
+
headers: { 'Content-Type' => 'application/json' })
|
17
17
|
end
|
18
18
|
|
19
19
|
it "requires a 'host_id' argument" do
|
@@ -43,7 +43,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
43
43
|
:post,
|
44
44
|
zoom_url("/users/#{args[:host_id]}/webinars")
|
45
45
|
).to_return(body: json_response('error', 'validation'),
|
46
|
-
headers: {
|
46
|
+
headers: { 'Content-Type' => 'application/json' })
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'raises Zoom::Error exception' do
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
describe Zoom::Actions::Webinar do
|
6
|
-
let(:zc) { zoom_client}
|
6
|
+
let(:zc) { zoom_client }
|
7
7
|
let(:args) { { id: '123456789' } }
|
8
8
|
|
9
9
|
describe '#webinar_delete' do
|
@@ -14,7 +14,7 @@ describe Zoom::Actions::Webinar do
|
|
14
14
|
zoom_url("/webinars/#{args[:id]}")
|
15
15
|
).to_return(status: 204,
|
16
16
|
body: json_response('webinar', 'delete'),
|
17
|
-
headers: {
|
17
|
+
headers: { 'Content-Type' => 'application/json' })
|
18
18
|
end
|
19
19
|
|
20
20
|
it "requires a 'id' argument" do
|
@@ -33,7 +33,7 @@ describe Zoom::Actions::Webinar do
|
|
33
33
|
zoom_url("/webinars/#{args[:id]}")
|
34
34
|
).to_return(status: 404,
|
35
35
|
body: json_response('error', 'validation'),
|
36
|
-
headers: {
|
36
|
+
headers: { 'Content-Type' => 'application/json' })
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'raises Zoom::Error exception' do
|
@@ -18,7 +18,7 @@ xdescribe Zoom::Actions::Webinar do
|
|
18
18
|
:post,
|
19
19
|
zoom_url('/webinar/get')
|
20
20
|
).to_return(body: json_response('webinar_get'),
|
21
|
-
headers: {
|
21
|
+
headers: { 'Content-Type' => 'application/json' })
|
22
22
|
end
|
23
23
|
|
24
24
|
it "requires a 'host_id' argument" do
|
@@ -13,7 +13,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
13
13
|
:get,
|
14
14
|
zoom_url("/users/#{args[:host_id]}/webinars")
|
15
15
|
).to_return(body: json_response('webinar', 'list'),
|
16
|
-
headers: {
|
16
|
+
headers: { 'Content-Type' => 'application/json' })
|
17
17
|
end
|
18
18
|
|
19
19
|
it "requires a 'host_id' argument" do
|
@@ -39,7 +39,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
39
39
|
:get,
|
40
40
|
zoom_url("/users/#{args[:host_id]}/webinars")
|
41
41
|
).to_return(body: json_response('error', 'validation'),
|
42
|
-
headers: {
|
42
|
+
headers: { 'Content-Type' => 'application/json' })
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'raises Zoom::Error exception' do
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Zoom::Actions::Webinar do
|
6
|
+
let(:zc) { zoom_client }
|
7
|
+
let(:args) { { id: '123456789' } }
|
8
|
+
|
9
|
+
describe '#past_webinar_list' do
|
10
|
+
context 'with a valid response' do
|
11
|
+
before :each do
|
12
|
+
stub_request(
|
13
|
+
:get,
|
14
|
+
zoom_url("/past_webinars/#{args[:id]}/instances")
|
15
|
+
).to_return(status: 200,
|
16
|
+
body: json_response('webinar', 'past_webinar_list'),
|
17
|
+
headers: { 'Content-Type' => 'application/json' })
|
18
|
+
end
|
19
|
+
|
20
|
+
it "requires a 'id' argument" do
|
21
|
+
expect { zc.past_webinar_list(filter_key(args, :id)) }.to raise_error(Zoom::ParameterMissing, [:id].to_s)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'returns a list of webinar instances as an array' do
|
25
|
+
expect(zc.past_webinar_list(args)['webinars']).to be_kind_of(Array)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'with a 4xx response' do
|
30
|
+
before :each do
|
31
|
+
stub_request(
|
32
|
+
:get,
|
33
|
+
zoom_url("/past_webinars/#{args[:id]}/instances")
|
34
|
+
).to_return(status: 404,
|
35
|
+
body: json_response('error', 'validation'),
|
36
|
+
headers: { 'Content-Type' => 'application/json' })
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'raises Zoom::Error exception' do
|
40
|
+
expect { zc.past_webinar_list(args) }.to raise_error(Zoom::Error)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -17,7 +17,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
17
17
|
zoom_url("/webinars/#{args[:id]}/registrants")
|
18
18
|
).to_return(status: 201,
|
19
19
|
body: json_response('webinar', 'registrant', 'add'),
|
20
|
-
headers: {
|
20
|
+
headers: { 'Content-Type' => 'application/json' })
|
21
21
|
end
|
22
22
|
|
23
23
|
it "requires a 'id' argument" do
|
@@ -53,7 +53,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
53
53
|
zoom_url("/webinars/#{args[:id]}/registrants")
|
54
54
|
).to_return(status: 404,
|
55
55
|
body: json_response('error', 'not_found'),
|
56
|
-
headers: {
|
56
|
+
headers: { 'Content-Type' => 'application/json' })
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'raises Zoom::Error exception' do
|
@@ -13,7 +13,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
13
13
|
:get,
|
14
14
|
zoom_url("/webinars/#{args[:id]}/registrants")
|
15
15
|
).to_return(body: json_response('webinar', 'registrant', 'list'),
|
16
|
-
headers: {
|
16
|
+
headers: { 'Content-Type' => 'application/json' })
|
17
17
|
end
|
18
18
|
|
19
19
|
it "requires a 'id' argument" do
|
@@ -32,7 +32,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
32
32
|
zoom_url("/webinars/#{args[:id]}/registrants")
|
33
33
|
).to_return(status: 404,
|
34
34
|
body: json_response('error', 'validation'),
|
35
|
-
headers: {
|
35
|
+
headers: { 'Content-Type' => 'application/json' })
|
36
36
|
end
|
37
37
|
|
38
38
|
it 'raises Zoom::Error exception' do
|
@@ -31,7 +31,7 @@ RSpec.describe Zoom::Actions::Webinar do
|
|
31
31
|
zoom_url("/webinars/#{args[:id]}/registrants/status")
|
32
32
|
).to_return(status: 404,
|
33
33
|
body: json_response('error', 'validation'),
|
34
|
-
headers: {
|
34
|
+
headers: { 'Content-Type' => 'application/json' })
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'raises Zoom::Error exception' do
|
@@ -14,7 +14,7 @@ describe Zoom::Actions::Webinar do
|
|
14
14
|
zoom_url("/webinars/#{args[:id]}")
|
15
15
|
).to_return(status: 204,
|
16
16
|
body: json_response('webinar', 'update'),
|
17
|
-
headers: {
|
17
|
+
headers: { 'Content-Type' => 'application/json' })
|
18
18
|
end
|
19
19
|
|
20
20
|
it "requires a 'id' argument" do
|
@@ -33,7 +33,7 @@ describe Zoom::Actions::Webinar do
|
|
33
33
|
zoom_url("/webinars/#{args[:id]}")
|
34
34
|
).to_return(status: 404,
|
35
35
|
body: json_response('error', 'not_found'),
|
36
|
-
headers: {
|
36
|
+
headers: { 'Content-Type' => 'application/json' })
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'raises an error' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoom_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Boe
|
@@ -145,7 +145,6 @@ extra_rdoc_files: []
|
|
145
145
|
files:
|
146
146
|
- ".circleci/config.yml"
|
147
147
|
- ".gitignore"
|
148
|
-
- ".ruby-version"
|
149
148
|
- Gemfile
|
150
149
|
- Gemfile.lock
|
151
150
|
- LICENSE
|
@@ -211,6 +210,7 @@ files:
|
|
211
210
|
- spec/fixtures/webinar/create.json
|
212
211
|
- spec/fixtures/webinar/delete.json
|
213
212
|
- spec/fixtures/webinar/list.json
|
213
|
+
- spec/fixtures/webinar/past_webinar_list.json
|
214
214
|
- spec/fixtures/webinar/registrant/add.json
|
215
215
|
- spec/fixtures/webinar/registrant/list.json
|
216
216
|
- spec/fixtures/webinar/update.json
|
@@ -306,6 +306,7 @@ files:
|
|
306
306
|
- spec/lib/zoom/actions/webinar/list_registration_spec.rb
|
307
307
|
- spec/lib/zoom/actions/webinar/list_spec.rb
|
308
308
|
- spec/lib/zoom/actions/webinar/panelists_spec.rb
|
309
|
+
- spec/lib/zoom/actions/webinar/past_webinar_list_spec.rb
|
309
310
|
- spec/lib/zoom/actions/webinar/polls_spec.rb
|
310
311
|
- spec/lib/zoom/actions/webinar/questions_spec.rb
|
311
312
|
- spec/lib/zoom/actions/webinar/register_spec.rb
|
@@ -386,6 +387,7 @@ test_files:
|
|
386
387
|
- spec/fixtures/webinar/create.json
|
387
388
|
- spec/fixtures/webinar/delete.json
|
388
389
|
- spec/fixtures/webinar/list.json
|
390
|
+
- spec/fixtures/webinar/past_webinar_list.json
|
389
391
|
- spec/fixtures/webinar/registrant/add.json
|
390
392
|
- spec/fixtures/webinar/registrant/list.json
|
391
393
|
- spec/fixtures/webinar/update.json
|
@@ -481,6 +483,7 @@ test_files:
|
|
481
483
|
- spec/lib/zoom/actions/webinar/list_registration_spec.rb
|
482
484
|
- spec/lib/zoom/actions/webinar/list_spec.rb
|
483
485
|
- spec/lib/zoom/actions/webinar/panelists_spec.rb
|
486
|
+
- spec/lib/zoom/actions/webinar/past_webinar_list_spec.rb
|
484
487
|
- spec/lib/zoom/actions/webinar/polls_spec.rb
|
485
488
|
- spec/lib/zoom/actions/webinar/questions_spec.rb
|
486
489
|
- spec/lib/zoom/actions/webinar/register_spec.rb
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.6.2
|