zoom_rb 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c6da2eeba5f955c575c3c727711115b78cbcd1d37b0baa8781fb49d111dc8a8
4
- data.tar.gz: b199c01cfa6ede2a269e6350c358b90f3f630ba0b7eab9fe752a31680cf88f28
3
+ metadata.gz: daad98f9fbc78390d4f9f9bf0c4e1505cc9238e40af0113b5e5bcd36deea3c67
4
+ data.tar.gz: 9c0351755733f9c8e728425679522ee7dc6e1003306ed76694689fe3aaa91ffe
5
5
  SHA512:
6
- metadata.gz: 8cbc44242ca16594d10bb513a520163df99fa050043e197d6341b5c7249d5f811a26bd3920fca7c1226880302649e19933b379a2dcfe5814ba5399e5a1de20c0
7
- data.tar.gz: f5417945d43116b4b104746ea0c5351943418bd9cc7ad3f539d636cebf36982daf6a0c4b3a1e4bf1f7c4d38ad051b5a986913b4a50831f406c2d91c131bde130
6
+ metadata.gz: c2b66e44b5db67db9a9caed1b063fcbec87b4d22276eed265d8f2645fbe47ef42dcd810201d21bd4ad2c1181688b104bb97be7d85dc0422dc11bf289f66e2347
7
+ data.tar.gz: 610a6ed4a5dd99a4360dad225b5b93537fbd15d02c33610ebf8369aece17c17db3391b00e77132245bf194b3cf7ca66ae2a9d0b103dc1364ef9cf9e378f9981c
data/.circleci/config.yml CHANGED
@@ -9,7 +9,7 @@ jobs:
9
9
  CC_TEST_REPORTER_ID: c6c77975186cfe10e41d9548e9b4a4648f87b56cdbb70bd3896a5a58abf08421
10
10
  docker:
11
11
  # specify the version you desire here
12
- - image: circleci/ruby:2.7-node-browsers
12
+ - image: circleci/ruby:3.0-node-browsers
13
13
 
14
14
  # Specify service dependencies here if necessary
15
15
  # CircleCI maintains a library of pre-built images
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zoom_rb (1.1.4)
4
+ zoom_rb (1.1.5)
5
5
  httparty (>= 0.13)
6
6
  json (>= 1.8)
7
7
  jwt
@@ -36,7 +36,7 @@ GEM
36
36
  i18n (1.10.0)
37
37
  concurrent-ruby (~> 1.0)
38
38
  json (2.6.2)
39
- jwt (2.4.1)
39
+ jwt (2.5.0)
40
40
  method_source (1.0.0)
41
41
  mime-types (3.4.1)
42
42
  mime-types-data (~> 3.2015)
@@ -47,9 +47,16 @@ module Zoom
47
47
  # Register for a meeting.
48
48
  patch 'meeting_registrant_questions', '/meeting/:meeting_id/registrants/questions'
49
49
 
50
+ # List users that have registered for a meeting.
51
+ get 'list_meeting_registrants', '/meetings/:meeting_id/registrants',
52
+ permit: %i[occurrence_id status page_size next_page_token]
53
+
50
54
  # Retrieve ended meeting details
51
55
  get 'past_meeting_details', '/past_meetings/:meeting_uuid'
52
56
 
57
+ # Retrieve past meeting instances
58
+ get 'past_meeting_instances', '/past_meetings/:meeting_id/instances'
59
+
53
60
  # Retrieve ended meeting participants
54
61
  get 'past_meeting_participants', '/past_meetings/:meeting_uuid/participants'
55
62
 
@@ -78,6 +78,14 @@ module Zoom
78
78
 
79
79
  get 'webinar_panelist_list', '/webinars/:webinar_id/panelists'
80
80
 
81
+ post 'webinar_panelist_add', '/webinars/:webinar_id/panelists',
82
+ require: :panelists,
83
+ permit: [ panelists: [] ]
84
+
85
+ delete 'webinar_panelist_delete', '/webinars/:webinar_id/panelists/:panelist_id'
86
+
87
+ delete 'webinar_panelists_delete_all', '/webinars/:webinar_id/panelists'
88
+
81
89
  get 'past_webinars_absentees', '/past_webinars/:webinar_uuid/absentees',
82
90
  permit: %i[occurrence_id page_size next_page_token]
83
91
  end
data/lib/zoom/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zoom
4
- VERSION = '1.1.4'
4
+ VERSION = '1.1.5'
5
5
  end
@@ -0,0 +1,8 @@
1
+ {
2
+ "meetings": [
3
+ {
4
+ "start_time": "2022-03-26T05:37:59Z",
5
+ "uuid": "Vg8IdgluR5WDeWIkpJlElQ=="
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "id": "567456745674",
3
+ "updated_at": "2022-03-26T07:30:16Z"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "id": "123456789",
3
+ "deleted_at": "2012-11-25T12:00:00Z"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "id": "123456789",
3
+ "deleted_at": "2012-11-25T12:00:00Z"
4
+ }
@@ -46,4 +46,24 @@ describe Zoom::Actions::Meeting do
46
46
  }.to raise_error(NoMethodError)
47
47
  end
48
48
  end
49
+
50
+ describe '#past_meeting_instances' do
51
+ before :each do
52
+ stub_request(
53
+ :get,
54
+ zoom_url("/past_meetings/#{args[:meeting_id]}/instances")
55
+ ).to_return(
56
+ status: 200,
57
+ body: json_response('meeting','instances'){},
58
+ headers: { 'Content-Type' => 'application/json' }
59
+ )
60
+ end
61
+
62
+ it 'returns meeting instances' do
63
+ res = zc.past_meeting_instances(args)
64
+
65
+ expect(res['meetings'][0]['start_time']).to eq('2022-03-26T05:37:59Z')
66
+ expect(res['meetings'][0]['uuid']).to eq('Vg8IdgluR5WDeWIkpJlElQ==')
67
+ end
68
+ end
49
69
  end
@@ -0,0 +1,54 @@
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) { { webinar_id: '123456789',
8
+ panelists: [{email: "foo@bar.com", name: "Foo Bar"}] } }
9
+
10
+ describe '#webinar_panelist_add' do
11
+ context 'with a valid response' do
12
+ before :each do
13
+ stub_request(
14
+ :post,
15
+ zoom_url("/webinars/#{args[:webinar_id]}/panelists")
16
+ ).to_return(status: 201,
17
+ body: json_response('webinar', 'panelist_add'),
18
+ headers: { 'Content-Type' => 'application/json' })
19
+ end
20
+
21
+ it "requires a 'webinar id' argument" do
22
+ expect { zc.webinar_panelist_add(filter_key(args, :webinar_id)) }.to raise_error(Zoom::ParameterMissing, [:webinar_id].to_s)
23
+ end
24
+
25
+ it "requires a 'panelists' argument" do
26
+ expect { zc.webinar_panelist_add(filter_key(args, :panelists)) }.to raise_error(Zoom::ParameterMissing, [:panelists].to_s)
27
+ end
28
+
29
+ it 'returns an Hash' do
30
+ expect(zc.webinar_panelist_add(args)).to be_kind_of(Hash)
31
+ end
32
+
33
+ it 'returns an "id"' do
34
+ res = zc.webinar_panelist_add(args)
35
+ expect(res['id']).not_to be nil
36
+ end
37
+ end
38
+
39
+ context 'with a 4xx response' do
40
+ before :each do
41
+ stub_request(
42
+ :post,
43
+ zoom_url("/webinars/#{args[:webinar_id]}/panelists")
44
+ ).to_return(status: 404,
45
+ body: json_response('error', 'validation'),
46
+ headers: { 'Content-Type' => 'application/json' })
47
+ end
48
+
49
+ it 'raises Zoom::Error exception' do
50
+ expect { zc.webinar_panelist_add(args) }.to raise_error(Zoom::Error)
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,50 @@
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) { { webinar_id: '123456789',
8
+ panelist_id: '12345' } }
9
+
10
+ describe '#webinar_panelist_delete' do
11
+ context 'with a valid response' do
12
+ before :each do
13
+ stub_request(
14
+ :delete,
15
+ zoom_url("/webinars/#{args[:webinar_id]}/panelists/#{args[:panelist_id]}")
16
+ ).to_return(status: 204,
17
+ body: json_response('webinar', 'panelist_delete'),
18
+ headers: { 'Content-Type' => 'application/json' })
19
+ end
20
+
21
+ it "requires a 'webinar id' argument" do
22
+ expect { zc.webinar_panelist_delete(filter_key(args, :webinar_id)) }.to raise_error(Zoom::ParameterMissing, [:webinar_id].to_s)
23
+ end
24
+
25
+ it "requires a 'panelist id' argument" do
26
+ expect { zc.webinar_panelist_delete(filter_key(args, :panelist_id)) }.to raise_error(Zoom::ParameterMissing, [:panelist_id].to_s)
27
+ end
28
+
29
+ it 'returns the http status code as a number' do
30
+ expect(zc.webinar_panelist_delete(args)).to eql(204)
31
+ end
32
+
33
+ end
34
+
35
+ context 'with a 4xx response' do
36
+ before :each do
37
+ stub_request(
38
+ :delete,
39
+ zoom_url("/webinars/#{args[:webinar_id]}/panelists/#{args[:panelist_id]}")
40
+ ).to_return(status: 404,
41
+ body: json_response('error', 'validation'),
42
+ headers: { 'Content-Type' => 'application/json' })
43
+ end
44
+
45
+ it 'raises Zoom::Error exception' do
46
+ expect { zc.webinar_panelist_delete(args) }.to raise_error(Zoom::Error)
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,45 @@
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) { { webinar_id: '123456789' } }
8
+
9
+ describe '#webinar_panelists_delete_all' do
10
+ context 'with a valid response' do
11
+ before :each do
12
+ stub_request(
13
+ :delete,
14
+ zoom_url("/webinars/#{args[:webinar_id]}/panelists")
15
+ ).to_return(status: 204,
16
+ body: json_response('webinar', 'panelist_delete_all'),
17
+ headers: { 'Content-Type' => 'application/json' })
18
+ end
19
+
20
+ it "requires a 'webinar id' argument" do
21
+ expect { zc.webinar_panelists_delete_all(filter_key(args, :webinar_id)) }.to raise_error(Zoom::ParameterMissing, [:webinar_id].to_s)
22
+ end
23
+
24
+ it 'returns the http status code as a number' do
25
+ expect(zc.webinar_panelists_delete_all(args)).to eql(204)
26
+ end
27
+
28
+ end
29
+
30
+ context 'with a 4xx response' do
31
+ before :each do
32
+ stub_request(
33
+ :delete,
34
+ zoom_url("/webinars/#{args[:webinar_id]}/panelists")
35
+ ).to_return(status: 404,
36
+ body: json_response('error', 'validation'),
37
+ headers: { 'Content-Type' => 'application/json' })
38
+ end
39
+
40
+ it 'raises Zoom::Error exception' do
41
+ expect { zc.webinar_panelist_delete(args) }.to raise_error(Zoom::Error)
42
+ end
43
+ end
44
+ end
45
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zoom_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Boe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2022-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -240,6 +240,7 @@ files:
240
240
  - spec/fixtures/meeting/add_registrant.json
241
241
  - spec/fixtures/meeting/create.json
242
242
  - spec/fixtures/meeting/get.json
243
+ - spec/fixtures/meeting/instances.json
243
244
  - spec/fixtures/meeting/invitation.json
244
245
  - spec/fixtures/meeting/list.json
245
246
  - spec/fixtures/meeting/live_stream/errors/meeting_not_found.json
@@ -296,6 +297,9 @@ files:
296
297
  - spec/fixtures/webinar/create.json
297
298
  - spec/fixtures/webinar/delete.json
298
299
  - spec/fixtures/webinar/list.json
300
+ - spec/fixtures/webinar/panelist_add.json
301
+ - spec/fixtures/webinar/panelist_delete.json
302
+ - spec/fixtures/webinar/panelist_delete_all.json
299
303
  - spec/fixtures/webinar/panelist_list.json
300
304
  - spec/fixtures/webinar/past_webinar_list.json
301
305
  - spec/fixtures/webinar/past_webinars_absentees.json
@@ -434,7 +438,10 @@ files:
434
438
  - spec/lib/zoom/actions/webinar/get_spec.rb
435
439
  - spec/lib/zoom/actions/webinar/list_registration_spec.rb
436
440
  - spec/lib/zoom/actions/webinar/list_spec.rb
441
+ - spec/lib/zoom/actions/webinar/panelist_add_spec.rb
442
+ - spec/lib/zoom/actions/webinar/panelist_delete_spec.rb
437
443
  - spec/lib/zoom/actions/webinar/panelist_list_spec.rb
444
+ - spec/lib/zoom/actions/webinar/panelists_delete_all_spec.rb
438
445
  - spec/lib/zoom/actions/webinar/past_webinar_absentees_spec.rb
439
446
  - spec/lib/zoom/actions/webinar/past_webinar_list_spec.rb
440
447
  - spec/lib/zoom/actions/webinar/poll_get_spec.rb
@@ -523,6 +530,7 @@ test_files:
523
530
  - spec/fixtures/meeting/add_registrant.json
524
531
  - spec/fixtures/meeting/create.json
525
532
  - spec/fixtures/meeting/get.json
533
+ - spec/fixtures/meeting/instances.json
526
534
  - spec/fixtures/meeting/invitation.json
527
535
  - spec/fixtures/meeting/list.json
528
536
  - spec/fixtures/meeting/live_stream/errors/meeting_not_found.json
@@ -579,6 +587,9 @@ test_files:
579
587
  - spec/fixtures/webinar/create.json
580
588
  - spec/fixtures/webinar/delete.json
581
589
  - spec/fixtures/webinar/list.json
590
+ - spec/fixtures/webinar/panelist_add.json
591
+ - spec/fixtures/webinar/panelist_delete.json
592
+ - spec/fixtures/webinar/panelist_delete_all.json
582
593
  - spec/fixtures/webinar/panelist_list.json
583
594
  - spec/fixtures/webinar/past_webinar_list.json
584
595
  - spec/fixtures/webinar/past_webinars_absentees.json
@@ -717,7 +728,10 @@ test_files:
717
728
  - spec/lib/zoom/actions/webinar/get_spec.rb
718
729
  - spec/lib/zoom/actions/webinar/list_registration_spec.rb
719
730
  - spec/lib/zoom/actions/webinar/list_spec.rb
731
+ - spec/lib/zoom/actions/webinar/panelist_add_spec.rb
732
+ - spec/lib/zoom/actions/webinar/panelist_delete_spec.rb
720
733
  - spec/lib/zoom/actions/webinar/panelist_list_spec.rb
734
+ - spec/lib/zoom/actions/webinar/panelists_delete_all_spec.rb
721
735
  - spec/lib/zoom/actions/webinar/past_webinar_absentees_spec.rb
722
736
  - spec/lib/zoom/actions/webinar/past_webinar_list_spec.rb
723
737
  - spec/lib/zoom/actions/webinar/poll_get_spec.rb