zoom_rb 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +46 -48
- data/lib/zoom/actions/webinar.rb +20 -10
- data/lib/zoom/utils.rb +3 -3
- data/lib/zoom/version.rb +1 -1
- data/spec/fixtures/webinar/create.json +7 -1
- data/spec/lib/zoom/utils_spec.rb +6 -0
- data/zoom_rb.gemspec +6 -6
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c331d1e5c790ce66794e2505ee2482ccea8017c223c71029681848c2fcb402e8
|
4
|
+
data.tar.gz: 12b656b6e1a3e43d31cd619e5f7e1c4e26bcb4fca39906d2109a54482ef6b1f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d84ccc716613ad408e491563461cc3af62397f5baf3ae81a413c45eac7a590029327eed38a502e31017d2fceb3560ad9a95fdcea908483aefd138558ef9ca0
|
7
|
+
data.tar.gz: 46356928a4d9ba8dc595f13833d56616290ac930fd5ec19bac84afdf219e7fe176c37c81fb3f2242816be27c813663816accf303bc882fdb7de1731e429eb8a0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zoom_rb (1.1.
|
5
|
-
httparty (
|
4
|
+
zoom_rb (1.1.1)
|
5
|
+
httparty (>= 0.13)
|
6
6
|
json (>= 1.8)
|
7
7
|
jwt
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (
|
12
|
+
activesupport (7.0.2.2)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (>= 1.6, < 2)
|
15
15
|
minitest (>= 5.1)
|
16
16
|
tzinfo (~> 2.0)
|
17
|
-
zeitwerk (~> 2.3)
|
18
17
|
addressable (2.8.0)
|
19
18
|
public_suffix (>= 2.0.2, < 5.0)
|
20
19
|
ast (2.4.2)
|
@@ -23,7 +22,7 @@ GEM
|
|
23
22
|
concurrent-ruby (1.1.9)
|
24
23
|
crack (0.4.5)
|
25
24
|
rexml
|
26
|
-
diff-lcs (1.
|
25
|
+
diff-lcs (1.5.0)
|
27
26
|
docile (1.4.0)
|
28
27
|
hashdiff (1.0.1)
|
29
28
|
hint-rubocop_style (0.3.6)
|
@@ -34,18 +33,18 @@ GEM
|
|
34
33
|
httparty (0.20.0)
|
35
34
|
mime-types (~> 3.0)
|
36
35
|
multi_xml (>= 0.5.2)
|
37
|
-
i18n (1.
|
36
|
+
i18n (1.10.0)
|
38
37
|
concurrent-ruby (~> 1.0)
|
39
|
-
json (2.
|
38
|
+
json (2.6.1)
|
40
39
|
jwt (2.3.0)
|
41
40
|
method_source (1.0.0)
|
42
41
|
mime-types (3.4.1)
|
43
42
|
mime-types-data (~> 3.2015)
|
44
43
|
mime-types-data (3.2022.0105)
|
45
|
-
minitest (5.
|
44
|
+
minitest (5.15.0)
|
46
45
|
multi_xml (0.6.0)
|
47
|
-
parallel (1.
|
48
|
-
parser (3.
|
46
|
+
parallel (1.21.0)
|
47
|
+
parser (3.1.1.0)
|
49
48
|
ast (~> 2.4.1)
|
50
49
|
pry (0.13.1)
|
51
50
|
coderay (~> 1.1)
|
@@ -55,71 +54,70 @@ GEM
|
|
55
54
|
pry (~> 0.13.0)
|
56
55
|
public_suffix (4.0.6)
|
57
56
|
rack (2.2.3)
|
58
|
-
rainbow (3.
|
59
|
-
regexp_parser (2.
|
57
|
+
rainbow (3.1.1)
|
58
|
+
regexp_parser (2.2.1)
|
60
59
|
rexml (3.2.5)
|
61
|
-
rspec (3.
|
62
|
-
rspec-core (~> 3.
|
63
|
-
rspec-expectations (~> 3.
|
64
|
-
rspec-mocks (~> 3.
|
65
|
-
rspec-core (3.
|
66
|
-
rspec-support (~> 3.
|
67
|
-
rspec-expectations (3.
|
60
|
+
rspec (3.11.0)
|
61
|
+
rspec-core (~> 3.11.0)
|
62
|
+
rspec-expectations (~> 3.11.0)
|
63
|
+
rspec-mocks (~> 3.11.0)
|
64
|
+
rspec-core (3.11.0)
|
65
|
+
rspec-support (~> 3.11.0)
|
66
|
+
rspec-expectations (3.11.0)
|
68
67
|
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
-
rspec-support (~> 3.
|
70
|
-
rspec-mocks (3.
|
68
|
+
rspec-support (~> 3.11.0)
|
69
|
+
rspec-mocks (3.11.0)
|
71
70
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
-
rspec-support (~> 3.
|
73
|
-
rspec-support (3.
|
74
|
-
rspec_junit_formatter (0.
|
71
|
+
rspec-support (~> 3.11.0)
|
72
|
+
rspec-support (3.11.0)
|
73
|
+
rspec_junit_formatter (0.5.1)
|
75
74
|
rspec-core (>= 2, < 4, != 2.12.0)
|
76
|
-
rubocop (1.
|
75
|
+
rubocop (1.25.1)
|
77
76
|
parallel (~> 1.10)
|
78
|
-
parser (>= 3.
|
77
|
+
parser (>= 3.1.0.0)
|
79
78
|
rainbow (>= 2.2.2, < 4.0)
|
80
79
|
regexp_parser (>= 1.8, < 3.0)
|
81
80
|
rexml
|
82
|
-
rubocop-ast (>= 1.
|
81
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
83
82
|
ruby-progressbar (~> 1.7)
|
84
83
|
unicode-display_width (>= 1.4.0, < 3.0)
|
85
|
-
rubocop-ast (1.
|
86
|
-
parser (>= 3.
|
87
|
-
rubocop-performance (1.
|
84
|
+
rubocop-ast (1.16.0)
|
85
|
+
parser (>= 3.1.1.0)
|
86
|
+
rubocop-performance (1.13.2)
|
88
87
|
rubocop (>= 1.7.0, < 2.0)
|
89
88
|
rubocop-ast (>= 0.4.0)
|
90
|
-
rubocop-rails (2.
|
89
|
+
rubocop-rails (2.13.2)
|
91
90
|
activesupport (>= 4.2.0)
|
92
91
|
rack (>= 1.1)
|
93
92
|
rubocop (>= 1.7.0, < 2.0)
|
94
|
-
rubocop-rspec (2.
|
95
|
-
rubocop (~> 1.
|
96
|
-
rubocop-ast (>= 1.1.0)
|
93
|
+
rubocop-rspec (2.8.0)
|
94
|
+
rubocop (~> 1.19)
|
97
95
|
ruby-progressbar (1.11.0)
|
98
|
-
simplecov (0.
|
96
|
+
simplecov (0.21.2)
|
99
97
|
docile (~> 1.1)
|
100
|
-
|
101
|
-
|
102
|
-
simplecov-html (0.
|
98
|
+
simplecov-html (~> 0.11)
|
99
|
+
simplecov_json_formatter (~> 0.1)
|
100
|
+
simplecov-html (0.12.3)
|
101
|
+
simplecov_json_formatter (0.1.4)
|
103
102
|
tzinfo (2.0.4)
|
104
103
|
concurrent-ruby (~> 1.0)
|
105
|
-
unicode-display_width (2.
|
106
|
-
webmock (3.
|
107
|
-
addressable (>= 2.
|
104
|
+
unicode-display_width (2.1.0)
|
105
|
+
webmock (3.14.0)
|
106
|
+
addressable (>= 2.8.0)
|
108
107
|
crack (>= 0.3.2)
|
109
108
|
hashdiff (>= 0.4.0, < 2.0.0)
|
110
|
-
zeitwerk (2.4.2)
|
111
109
|
|
112
110
|
PLATFORMS
|
113
111
|
ruby
|
114
112
|
|
115
113
|
DEPENDENCIES
|
116
|
-
hint-rubocop_style
|
114
|
+
hint-rubocop_style
|
117
115
|
pry-byebug
|
118
|
-
rspec (
|
119
|
-
rspec_junit_formatter (
|
120
|
-
simplecov (
|
121
|
-
webmock (
|
116
|
+
rspec (>= 3.8)
|
117
|
+
rspec_junit_formatter (>= 0.4.1)
|
118
|
+
simplecov (>= 0.16.1)
|
119
|
+
webmock (>= 3.4)
|
122
120
|
zoom_rb!
|
123
121
|
|
124
122
|
BUNDLED WITH
|
125
|
-
2.
|
123
|
+
2.3.8
|
data/lib/zoom/actions/webinar.rb
CHANGED
@@ -6,16 +6,26 @@ module Zoom
|
|
6
6
|
extend Zoom::Actions
|
7
7
|
|
8
8
|
RECURRENCE_KEYS = %i[type repeat_interval weekly_days monthly_day monthly_week
|
9
|
-
|
10
|
-
SETTINGS_KEYS =
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
9
|
+
monthly_week_day end_times end_date_time].freeze
|
10
|
+
SETTINGS_KEYS = [
|
11
|
+
%i[
|
12
|
+
host_video panelists_video practice_session hd_video approval_type
|
13
|
+
registration_type audio auto_recording enforce_login
|
14
|
+
enforce_login_domains alternative_hosts close_registration
|
15
|
+
show_share_button allow_multiple_devices on_demand
|
16
|
+
request_permission_to_unmute_participants global_dial_in_countries
|
17
|
+
contact_name contact_email registrants_restrict_number
|
18
|
+
post_webinar_survey survey_url registrants_email_notification
|
19
|
+
meeting_authentication authentication_option
|
20
|
+
authentication_domains registrants_confirmation_email
|
21
|
+
].freeze,
|
22
|
+
{
|
23
|
+
question_and_answer: %i[
|
24
|
+
allow_anonymous_questions, answer_questions, attendees_can_comment,
|
25
|
+
attendees_can_upvote, enable
|
26
|
+
]
|
27
|
+
}
|
28
|
+
]
|
19
29
|
|
20
30
|
get 'webinar_list', '/users/:host_id/webinars',
|
21
31
|
permit: %i[page_size page_number]
|
data/lib/zoom/utils.rb
CHANGED
@@ -11,14 +11,14 @@ module Zoom
|
|
11
11
|
name ? ArgumentError.new("Unrecognized parameter #{name}") : ArgumentError.new
|
12
12
|
end
|
13
13
|
|
14
|
-
def raise_if_error!(response)
|
14
|
+
def raise_if_error!(response, http_code=200)
|
15
15
|
return response unless response&.key?('code')
|
16
16
|
|
17
17
|
code = response['code']
|
18
18
|
|
19
19
|
raise AuthenticationError, build_error(response) if code == 124
|
20
20
|
error_hash = build_error(response)
|
21
|
-
raise Error.new(error_hash, error_hash) if code >= 300
|
21
|
+
raise Error.new(error_hash, error_hash) if code >= 300 || http_code >= 400
|
22
22
|
end
|
23
23
|
|
24
24
|
def build_error(response)
|
@@ -28,7 +28,7 @@ module Zoom
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def parse_response(http_response)
|
31
|
-
raise_if_error!(http_response.parsed_response) || http_response.code
|
31
|
+
raise_if_error!(http_response.parsed_response, http_response.code) || http_response.code
|
32
32
|
end
|
33
33
|
|
34
34
|
def extract_options!(array)
|
data/lib/zoom/version.rb
CHANGED
@@ -24,6 +24,12 @@
|
|
24
24
|
"allow_multiple_devices": true,
|
25
25
|
"practice_session": false,
|
26
26
|
"hd_video": false,
|
27
|
-
"
|
27
|
+
"question_and_answer": {
|
28
|
+
"allow_anonymous_questions": true,
|
29
|
+
"answer_questions": "all",
|
30
|
+
"attendees_can_comment": true,
|
31
|
+
"attendees_can_upvote": true,
|
32
|
+
"enable": true
|
33
|
+
}
|
28
34
|
}
|
29
35
|
}
|
data/spec/lib/zoom/utils_spec.rb
CHANGED
@@ -29,6 +29,12 @@ describe Zoom::Utils do
|
|
29
29
|
response = {}
|
30
30
|
expect { Utils.raise_if_error!(response) }.to_not raise_error
|
31
31
|
end
|
32
|
+
|
33
|
+
it 'raises Zoom::Error if http code is not 200' do
|
34
|
+
response = { 'code' => 180, 'message' => 'lol error' }
|
35
|
+
expect { Utils.raise_if_error!(response, 400) }.to raise_error(Zoom::Error)
|
36
|
+
end
|
37
|
+
|
32
38
|
end
|
33
39
|
|
34
40
|
describe '#extract_options!' do
|
data/zoom_rb.gemspec
CHANGED
@@ -6,16 +6,16 @@ require 'zoom/version'
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |gem|
|
8
8
|
|
9
|
-
gem.add_dependency 'httparty', '
|
9
|
+
gem.add_dependency 'httparty', '>= 0.13'
|
10
10
|
gem.add_dependency 'json', '>= 1.8'
|
11
11
|
gem.add_dependency 'jwt'
|
12
12
|
|
13
13
|
gem.add_development_dependency 'pry-byebug'
|
14
|
-
gem.add_development_dependency 'hint-rubocop_style'
|
15
|
-
gem.add_development_dependency 'rspec', '
|
16
|
-
gem.add_development_dependency 'rspec_junit_formatter', '
|
17
|
-
gem.add_development_dependency 'simplecov', '
|
18
|
-
gem.add_development_dependency 'webmock', '
|
14
|
+
gem.add_development_dependency 'hint-rubocop_style'
|
15
|
+
gem.add_development_dependency 'rspec', '>= 3.8'
|
16
|
+
gem.add_development_dependency 'rspec_junit_formatter', '>= 0.4.1'
|
17
|
+
gem.add_development_dependency 'simplecov', '>= 0.16.1'
|
18
|
+
gem.add_development_dependency 'webmock', '>= 3.4'
|
19
19
|
|
20
20
|
gem.authors = ['Kyle Boe']
|
21
21
|
gem.email = ['kyle@boe.codes']
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoom_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
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-02-
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.13'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.13'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -70,70 +70,70 @@ dependencies:
|
|
70
70
|
name: hint-rubocop_style
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '3.8'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.8'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec_junit_formatter
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.4.1
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.4.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 0.16.1
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.16.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: webmock
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '3.4'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '3.4'
|
139
139
|
description: A Ruby API wrapper for zoom.us API
|
@@ -470,7 +470,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
470
470
|
- !ruby/object:Gem::Version
|
471
471
|
version: '0'
|
472
472
|
requirements: []
|
473
|
-
rubygems_version: 3.
|
473
|
+
rubygems_version: 3.3.7
|
474
474
|
signing_key:
|
475
475
|
specification_version: 4
|
476
476
|
summary: zoom.us API wrapper
|