zoom_rb 0.11.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -0
- data/Gemfile.lock +6 -6
- data/README.md +0 -4
- data/lib/zoom/actions/account.rb +18 -51
- data/lib/zoom/actions/billing.rb +30 -27
- data/lib/zoom/actions/dashboard.rb +11 -22
- data/lib/zoom/actions/groups.rb +11 -9
- data/lib/zoom/actions/im/chat.rb +11 -24
- data/lib/zoom/actions/meeting.rb +34 -67
- data/lib/zoom/actions/phone.rb +5 -17
- data/lib/zoom/actions/recording.rb +8 -26
- data/lib/zoom/actions/report.rb +10 -20
- data/lib/zoom/actions/roles.rb +11 -28
- data/lib/zoom/actions/sip_audio.rb +16 -57
- data/lib/zoom/actions/token.rb +21 -24
- data/lib/zoom/actions/user.rb +65 -123
- data/lib/zoom/actions/webinar.rb +37 -77
- data/lib/zoom/actions.rb +68 -0
- data/lib/zoom/client.rb +10 -4
- data/lib/zoom/clients/oauth.rb +9 -3
- data/lib/zoom/utils.rb +10 -7
- data/lib/zoom/version.rb +1 -1
- data/lib/zoom_rb.rb +1 -0
- data/spec/fixtures/error/admin_cannot_activated.json +4 -0
- data/spec/fixtures/error/group_not_exist.json +4 -0
- data/spec/fixtures/error/not_found_administrator.json +4 -0
- data/spec/fixtures/groups/create.json +5 -0
- data/spec/fixtures/groups/update.json +0 -0
- data/spec/fixtures/token/revoke_token.json +3 -0
- data/spec/fixtures/user/update_email.json +0 -0
- data/spec/fixtures/user/update_status.json +0 -0
- data/spec/lib/zoom/actions/groups/create_spec.rb +96 -1
- data/spec/lib/zoom/actions/groups/update_spec.rb +59 -0
- data/spec/lib/zoom/actions/meeting/create_spec.rb +1 -1
- data/spec/lib/zoom/actions/token/access_token_spec.rb +34 -8
- data/spec/lib/zoom/actions/token/data_compliance_spec.rb +6 -1
- data/spec/lib/zoom/actions/token/refresh_token_spec.rb +33 -8
- data/spec/lib/zoom/actions/token/revoke_token_spec.rb +52 -0
- data/spec/lib/zoom/actions/user/create_spec.rb +18 -46
- data/spec/lib/zoom/actions/user/update_email_spec.rb +59 -0
- data/spec/lib/zoom/actions/user/update_status_spec.rb +59 -0
- data/spec/lib/zoom/actions_spec.rb +117 -0
- data/spec/lib/zoom/utils_spec.rb +1 -1
- metadata +33 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1daca097d96a5590a12307f6fb353a613e8c74ae5c0a0ab93fde738fcd3518b
|
4
|
+
data.tar.gz: 33bbfbb55bb2343c296cddfd92906b799fd57ded467f7755e836971b58f675ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c02b9b0964774320e19da1a8269e864c012b86ea32e4383d1e69618dc6d6a2e927fb263782009c199a57003c3b11b6c928b3d5945a955df8aaf4050fabd0721
|
7
|
+
data.tar.gz: a5b0c0c8ae5d8c59e30967a4b48e1372dccd0642dd90a5bc8551b917b0a91f8a912dfe2a4c056caae6659ac477812cfd79b745659ac361b63649edbc2a163c86
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,58 @@
|
|
1
|
+
# 1.1.0
|
2
|
+
|
3
|
+
### New features
|
4
|
+
* Support the new Zoom API OAuth security measures which are described here:
|
5
|
+
https://marketplace.zoom.us/docs/guides/stay-up-to-date/announcements/#zoom-oauth-security-updates
|
6
|
+
* Support the code_verifier parameter in the access_tokens call.
|
7
|
+
|
8
|
+
# 1.0.2
|
9
|
+
|
10
|
+
### Fixes:
|
11
|
+
* Fix meeting_recording_get endpoint.
|
12
|
+
|
13
|
+
# 1.0.1
|
14
|
+
|
15
|
+
### Fixes:
|
16
|
+
* Fix OAuth requests in Zoom::Actions::Token.
|
17
|
+
|
18
|
+
# 1.0.0
|
19
|
+
|
20
|
+
The 1.0 release and a major refactor of all endpoint definitions.
|
21
|
+
|
22
|
+
### Breaking Change
|
23
|
+
* The `user_create` endpoint now requires its arguments to match the actual Zoom API.
|
24
|
+
This is done to simplify the code and encourage consistency.
|
25
|
+
This means that instead of passing:
|
26
|
+
```
|
27
|
+
{
|
28
|
+
action: 'create',
|
29
|
+
email: 'foo@bar.com',
|
30
|
+
type: 1,
|
31
|
+
first_name: 'Zoomie',
|
32
|
+
last_name: 'Userton',
|
33
|
+
password: 'testerino'
|
34
|
+
}
|
35
|
+
```
|
36
|
+
You will instead have to pass:
|
37
|
+
```
|
38
|
+
{
|
39
|
+
action: 'create',
|
40
|
+
user_info: {
|
41
|
+
email: 'foo@bar.com',
|
42
|
+
type: 1,
|
43
|
+
first_name: 'Zoomie',
|
44
|
+
last_name: 'Userton',
|
45
|
+
password: 'testerino'
|
46
|
+
}
|
47
|
+
}
|
48
|
+
```
|
49
|
+
Zoom API reference for user creation: https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate
|
50
|
+
|
51
|
+
### New features
|
52
|
+
* Greatly simplified new syntax when adding endpoints. This reduces repetition and makes it easier.
|
53
|
+
* On `user_settings_get`, permit `option` and `custom_query_fields`.
|
54
|
+
* Add `group_create` and `group_update`.
|
55
|
+
|
1
56
|
# 0.11.0
|
2
57
|
|
3
58
|
This is the first CHANGELOG entry.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zoom_rb (
|
4
|
+
zoom_rb (1.1.0)
|
5
5
|
httparty (~> 0.13)
|
6
6
|
json (>= 1.8)
|
7
7
|
jwt
|
@@ -31,17 +31,17 @@ GEM
|
|
31
31
|
rubocop-performance (>= 1.3.0)
|
32
32
|
rubocop-rails (>= 2.0.0)
|
33
33
|
rubocop-rspec (>= 1.33.0)
|
34
|
-
httparty (0.
|
34
|
+
httparty (0.20.0)
|
35
35
|
mime-types (~> 3.0)
|
36
36
|
multi_xml (>= 0.5.2)
|
37
37
|
i18n (1.8.10)
|
38
38
|
concurrent-ruby (~> 1.0)
|
39
39
|
json (2.5.1)
|
40
|
-
jwt (2.
|
40
|
+
jwt (2.3.0)
|
41
41
|
method_source (1.0.0)
|
42
|
-
mime-types (3.
|
42
|
+
mime-types (3.4.1)
|
43
43
|
mime-types-data (~> 3.2015)
|
44
|
-
mime-types-data (3.
|
44
|
+
mime-types-data (3.2022.0105)
|
45
45
|
minitest (5.14.4)
|
46
46
|
multi_xml (0.6.0)
|
47
47
|
parallel (1.20.1)
|
@@ -122,4 +122,4 @@ DEPENDENCIES
|
|
122
122
|
zoom_rb!
|
123
123
|
|
124
124
|
BUNDLED WITH
|
125
|
-
2.2.
|
125
|
+
2.2.32
|
data/README.md
CHANGED
@@ -21,8 +21,6 @@ Or install it yourself as:
|
|
21
21
|
The Zoom API uses OAuth or JWT to [Authenticate](https://marketplace.zoom.us/docs/api-reference/Authentication) API request. By default, a JWT client will be used.
|
22
22
|
|
23
23
|
```ruby
|
24
|
-
require 'zoom'
|
25
|
-
|
26
24
|
Zoom.configure do |c|
|
27
25
|
c.api_key = 'xxx'
|
28
26
|
c.api_secret = 'xxx'
|
@@ -43,8 +41,6 @@ Which will result in a redirect to your app with code in the url params
|
|
43
41
|
then use this code to get an access token and a refresh token.
|
44
42
|
|
45
43
|
```ruby
|
46
|
-
require 'zoom'
|
47
|
-
|
48
44
|
auth = Zoom::Client::OAuth.new(auth_code: auth_code, redirect_uri: redirect_uri, timeout: 15).auth
|
49
45
|
|
50
46
|
zoom_client = Zoom::Client::OAuth.new(access_token: auth['access_token'], timeout: 15)
|
data/lib/zoom/actions/account.rb
CHANGED
@@ -3,66 +3,33 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Account
|
6
|
-
|
7
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
8
|
-
params.permit(%i[page_size page_number])
|
9
|
-
Utils.parse_response self.class.get('/accounts', query: params, headers: request_headers)
|
10
|
-
end
|
6
|
+
extend Zoom::Actions
|
11
7
|
|
12
|
-
|
13
|
-
|
14
|
-
params.require(%i[first_name last_name email password]).permit(options: %i[share_rc room_connectors share_mc meeting_connectors pay_mode])
|
15
|
-
Utils.parse_response self.class.post('/accounts', body: params.to_json, headers: request_headers)
|
16
|
-
end
|
8
|
+
get 'account_list', '/accounts',
|
9
|
+
permit: %i[page_size page_number]
|
17
10
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}", headers: request_headers)
|
22
|
-
end
|
11
|
+
post 'account_create', '/accounts',
|
12
|
+
require: %i[first_name last_name email password],
|
13
|
+
permit: { options: %i[share_rc room_connectors share_mc meeting_connectors pay_mode] }
|
23
14
|
|
24
|
-
|
25
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
26
|
-
params.require(:account_id)
|
27
|
-
Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}", headers: request_headers)
|
28
|
-
end
|
15
|
+
get 'account_get', '/accounts/:account_id'
|
29
16
|
|
30
|
-
|
31
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
32
|
-
params.require(:account_id).permit(%i[share_rc room_connectors share_mc meeting_connectors pay_mode])
|
33
|
-
Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/options", body: params.except(:account_id).to_json, headers: request_headers)
|
34
|
-
end
|
17
|
+
delete 'account_delete', '/accounts/:account_id'
|
35
18
|
|
36
|
-
|
37
|
-
|
38
|
-
params.require(:account_id).permit(:option)
|
39
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/settings", query: params.except(:account_id), headers: request_headers)
|
40
|
-
end
|
19
|
+
patch 'account_options_update', '/accounts/:account_id/options',
|
20
|
+
permit: %i[share_rc room_connectors share_mc meeting_connectors pay_mode]
|
41
21
|
|
42
|
-
|
43
|
-
|
44
|
-
params.require(:account_id).permit(:option, Zoom::Constants::Account::Settings::PERMITTED_KEYS)
|
45
|
-
params.permit_value(:option, Zoom::Constants::Account::Settings::PERMITTED_OPTIONS)
|
46
|
-
Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/settings", query: params.slice(:option), body: params.except(%i[account_id option]).to_json, headers: request_headers)
|
47
|
-
end
|
22
|
+
get 'account_settings_get', '/accounts/:account_id/settings',
|
23
|
+
permit: :option
|
48
24
|
|
49
|
-
|
50
|
-
|
51
|
-
params.require(:account_id)
|
52
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/managed_domains", headers: request_headers)
|
53
|
-
end
|
25
|
+
patch 'account_settings_update', '/accounts/:account_id/settings',
|
26
|
+
permit: [:option, Zoom::Constants::Account::Settings::PERMITTED_KEYS]
|
54
27
|
|
55
|
-
|
56
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
57
|
-
params.require(:account_id)
|
58
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/lock_settings", headers: request_headers)
|
59
|
-
end
|
28
|
+
get 'account_managed_domains', '/accounts/:account_id/managed_domains'
|
60
29
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/trusted_domains", headers: request_headers)
|
65
|
-
end
|
30
|
+
get 'account_get_locked_settings', '/accounts/:account_id/lock_settings'
|
31
|
+
|
32
|
+
get 'account_trusted_domains', '/accounts/:account_id/trusted_domains'
|
66
33
|
end
|
67
34
|
end
|
68
35
|
end
|
data/lib/zoom/actions/billing.rb
CHANGED
@@ -3,36 +3,39 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Billing
|
6
|
-
|
7
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
8
|
-
params.require(:account_id)
|
9
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/billing", headers: request_headers)
|
10
|
-
end
|
6
|
+
extend Zoom::Actions
|
11
7
|
|
12
|
-
|
13
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
14
|
-
params.require(:account_id).permit(%i[first_name last_name email phone_number address apt city state zip country])
|
15
|
-
Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/billing", body: params.except(:account_id).to_json, headers: request_headers)
|
16
|
-
end
|
8
|
+
get 'billing_get', '/accounts/:account_id/billing'
|
17
9
|
|
18
|
-
|
19
|
-
|
20
|
-
params.require(:account_id)
|
21
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/plans", headers: request_headers)
|
22
|
-
end
|
10
|
+
patch 'billing_update', '/accounts/:account_id/billing',
|
11
|
+
permit: %i[first_name last_name email phone_number address apt city state zip country]
|
23
12
|
|
24
|
-
|
25
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
26
|
-
params.require(:account_id)
|
27
|
-
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/plans/usage", headers: request_headers)
|
28
|
-
end
|
13
|
+
get 'billing_plans_list', '/accounts/:account_id/plans'
|
29
14
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
15
|
+
get 'billing_plans_usage', '/accounts/:account_id/plans/usage'
|
16
|
+
|
17
|
+
post 'billing_plans_subscribe', '/accounts/:account_id/plans',
|
18
|
+
require: {
|
19
|
+
contact: %i[first_name last_name email phone_number address city state zip country],
|
20
|
+
plan_base: %i[type hosts]
|
21
|
+
},
|
22
|
+
permit: [
|
23
|
+
:plan_recording,
|
24
|
+
{
|
25
|
+
contact: %i[apt],
|
26
|
+
plan_zoom_rooms: %i[type hosts],
|
27
|
+
plan_room_connector: %i[type hosts],
|
28
|
+
plan_large_meeting: %i[type hosts],
|
29
|
+
plan_zoom_events: %i[type hosts],
|
30
|
+
plan_webinar: %i[type hosts],
|
31
|
+
plan_audio: %i[type tollfree_countries premium_countries callout_countries ddi_numbers],
|
32
|
+
plan_phone: {
|
33
|
+
plan_base: %i[type callout_countries],
|
34
|
+
plan_calling: %i[type hosts],
|
35
|
+
plan_number: %i[type hosts]
|
36
|
+
}
|
37
|
+
}
|
38
|
+
]
|
36
39
|
end
|
37
40
|
end
|
38
|
-
end
|
41
|
+
end
|
@@ -3,31 +3,20 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Dashboard
|
6
|
-
|
7
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
8
|
-
params.require(%i[from to])
|
9
|
-
Utils.process_datetime_params!(%i[from to], params)
|
10
|
-
Utils.parse_response self.class.get('/metrics/crc', query: params, headers: request_headers)
|
11
|
-
end
|
6
|
+
extend Zoom::Actions
|
12
7
|
|
13
|
-
|
14
|
-
|
15
|
-
params.require(%i[from to]).permit(%i[next_page_token page_size type])
|
16
|
-
Utils.process_datetime_params!(%i[from to], params)
|
17
|
-
Utils.parse_response self.class.get('/metrics/meetings', query: params, headers: request_headers)
|
18
|
-
end
|
8
|
+
get 'dashboard_crc', '/metrics/crc',
|
9
|
+
require: %i[from to]
|
19
10
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Utils.parse_response self.class.get("/metrics/meetings/#{params[:meeting_id]}", query: params.except(:meeting_id), headers: request_headers)
|
24
|
-
end
|
11
|
+
get 'dashboard_meetings', '/metrics/meetings',
|
12
|
+
require: %i[from to],
|
13
|
+
permit: %i[next_page_token page_size type]
|
25
14
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
15
|
+
get 'dashboard_meeting_details', '/metrics/meetings/:meeting_id',
|
16
|
+
permit: :type
|
17
|
+
|
18
|
+
get 'dashboard_meeting_participants', '/metrics/meetings/:meeting_id/participants',
|
19
|
+
permit: %i[next_page_token page_size type]
|
31
20
|
end
|
32
21
|
end
|
33
22
|
end
|
data/lib/zoom/actions/groups.rb
CHANGED
@@ -3,15 +3,17 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Groups
|
6
|
-
|
7
|
-
Utils.parse_response self.class.get('/groups', headers: request_headers)
|
8
|
-
end
|
6
|
+
extend Zoom::Actions
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
get 'groups_list', '/groups'
|
9
|
+
|
10
|
+
get 'groups_get', '/groups/:group_id'
|
11
|
+
|
12
|
+
post 'group_create', '/groups',
|
13
|
+
permit: :name
|
14
|
+
|
15
|
+
patch 'group_update', '/groups/:group_id',
|
16
|
+
permit: :name
|
15
17
|
end
|
16
18
|
end
|
17
|
-
end
|
19
|
+
end
|
data/lib/zoom/actions/im/chat.rb
CHANGED
@@ -4,35 +4,22 @@ module Zoom
|
|
4
4
|
module Actions
|
5
5
|
module IM
|
6
6
|
module Chat
|
7
|
-
|
8
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
9
|
-
params.require(:channel_id)
|
10
|
-
Utils.parse_response self.class.get("/chat/channels/#{params[:channel_id]}", headers: request_headers)
|
11
|
-
end
|
7
|
+
extend Zoom::Actions
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
9
|
+
get 'get_chat_channels', '/chat/channels/:channel_id'
|
10
|
+
|
11
|
+
get 'get_chat_user_channels', '/chat/users/:user_id/channels',
|
12
|
+
permit: %i[next_page_token page_size]
|
18
13
|
|
19
14
|
# Get chat messages for a specified period.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
# TODO: handle date format for `from` and `to` params
|
24
|
-
# TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
25
|
-
Utils.parse_response self.class.post('/chat/get', query: options)
|
26
|
-
end
|
15
|
+
# TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
16
|
+
get 'chat_get', '/chat/get',
|
17
|
+
require: [ :access_token, :session_id, :from, :to ]
|
27
18
|
|
28
19
|
# Get chat history list for a specified time period.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
# TODO: handle date format for `from` and `to` params
|
33
|
-
# TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
34
|
-
Utils.parse_response self.class.post('/chat/list', query: options)
|
35
|
-
end
|
20
|
+
# TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
21
|
+
get 'chat_list', '/chat/list',
|
22
|
+
require: [ :access_token, :from, :to ]
|
36
23
|
end
|
37
24
|
end
|
38
25
|
end
|
data/lib/zoom/actions/meeting.rb
CHANGED
@@ -3,95 +3,62 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Meeting
|
6
|
+
extend Zoom::Actions
|
7
|
+
|
6
8
|
# List all the scheduled meetings on Zoom.
|
7
|
-
|
8
|
-
|
9
|
-
params.require(:user_id).permit(%i[type page_size next_page_token page_number])
|
10
|
-
Utils.parse_response self.class.get("/users/#{params[:user_id]}/meetings", query: params.except(:user_id), headers: request_headers)
|
11
|
-
end
|
9
|
+
get 'meeting_list', '/users/:user_id/meetings',
|
10
|
+
permit: %i[type page_size next_page_token page_number]
|
12
11
|
|
13
12
|
# Create a meeting on Zoom, return the created meeting URL
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
13
|
+
post 'meeting_create', '/users/:user_id/meetings',
|
14
|
+
permit: %i[
|
15
|
+
topic type start_time duration schedule_for timezone password agenda tracking_fields
|
16
|
+
recurrence settings template_id
|
17
|
+
]
|
20
18
|
|
21
19
|
# Get a meeting on Zoom via meeting ID, return the meeting info.
|
22
|
-
|
23
|
-
|
24
|
-
params.require(:meeting_id).permit(%i[occurrence_id show_previous_occurrences])
|
25
|
-
Utils.parse_response self.class.get("/meetings/#{params[:meeting_id]}", query: params.except(:meeting_id), headers: request_headers)
|
26
|
-
end
|
20
|
+
get 'meeting_get', '/meetings/:meeting_id/',
|
21
|
+
permit: %i[occurrence_id show_previous_occurrences]
|
27
22
|
|
28
23
|
# Update meeting info on Zoom via meeting ID.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
# TODO Verify `password` attr, may only contain the following characters: a-z A-Z 0-9 @ - _
|
36
|
-
# TODO Handle `option_audio` attr, Can be "both", "telephony", "voip".
|
37
|
-
# TODO Handle `option_auto_record_type`, Can be "local", “cloud” or "none".
|
38
|
-
Utils.parse_response self.class.patch("/meetings/#{params[:meeting_id]}", body: params.except(:meeting_id).to_json, headers: request_headers)
|
39
|
-
end
|
24
|
+
# TODO Handle `topic` attr, Max of 300 characters.
|
25
|
+
# TODO Handle `timezone` attr, refer to the id value in timezone list JSON file. like "America/Los_Angeles"
|
26
|
+
# TODO Verify `password` attr, may only contain the following characters: a-z A-Z 0-9 @ - _
|
27
|
+
# TODO Handle `option_audio` attr, Can be "both", "telephony", "voip".
|
28
|
+
# TODO Handle `option_auto_record_type`, Can be "local", “cloud” or "none".
|
29
|
+
patch 'meeting_update', '/meetings/:meeting_id'
|
40
30
|
|
41
31
|
# Delete a meeting on Zoom, return the deleted meeting ID.
|
42
|
-
|
43
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
44
|
-
params.require(:meeting_id)
|
45
|
-
Utils.parse_response self.class.delete("/meetings/#{params[:meeting_id]}", query: params.except(:meeting_id), headers: request_headers)
|
46
|
-
end
|
32
|
+
delete 'meeting_delete', '/meetings/:meeting_id'
|
47
33
|
|
48
34
|
# Update a meeting's status
|
49
|
-
|
50
|
-
|
51
|
-
params.require(:meeting_id).permit(:action)
|
52
|
-
Utils.parse_response self.class.put("/meetings/#{params[:meeting_id]}/status", body: params.except(:meeting_id).to_json, headers: request_headers)
|
53
|
-
end
|
35
|
+
put 'meeting_update_status', '/meetings/:meeting_id/status',
|
36
|
+
permit: :action
|
54
37
|
|
55
38
|
# Register for a meeting.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
39
|
+
post 'meeting_add_registrant', '/meetings/:meeting_id/registrants',
|
40
|
+
require: %i[email first_name],
|
41
|
+
permit: %i[
|
42
|
+
last_name address city country zip state phone industry org job_title
|
43
|
+
purchasing_time_frame role_in_purchase_process no_of_employees comments custom_questions
|
44
|
+
language occurrence_ids
|
45
|
+
]
|
61
46
|
|
62
47
|
# Register for a meeting.
|
63
|
-
|
64
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
65
|
-
params.require(:meeting_id)
|
66
|
-
Utils.parse_response self.class.patch("/meetings/#{params[:meeting_id]}/registrants/questions", body: params.except(:meeting_id).to_json, headers: request_headers)
|
67
|
-
end
|
48
|
+
patch 'meeting_registrant_questions', '/meeting/:meeting_id/registrants/questions'
|
68
49
|
|
69
50
|
# Retrieve ended meeting details
|
70
|
-
|
71
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
72
|
-
params.require(:meeting_uuid)
|
73
|
-
Utils.parse_response self.class.get("/past_meetings/#{params[:meeting_uuid]}", headers: request_headers)
|
74
|
-
end
|
51
|
+
get 'past_meeting_details', '/past_meetings/:meeting_uuid'
|
75
52
|
|
76
53
|
# Retrieve ended meeting participants
|
77
|
-
|
78
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
79
|
-
params.require(:meeting_uuid)
|
80
|
-
Utils.parse_response self.class.get("/past_meetings/#{params[:meeting_uuid]}/participants", headers: request_headers)
|
81
|
-
end
|
54
|
+
get 'past_meeting_participants', '/past_meetings/:meeting_uuid/participants'
|
82
55
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
Utils.parse_response self.class.patch("/meetings/#{params[:meeting_id]}/livestream", body: params.except(:meeting_id).to_json, headers: request_headers)
|
87
|
-
end
|
56
|
+
patch 'livestream', '/meetings/:meeting_id/livestream',
|
57
|
+
require: %i[stream_url stream_key],
|
58
|
+
permit: :page_url
|
88
59
|
|
89
60
|
# Get a meeting on Zoom via meeting ID, return the meeting info.
|
90
|
-
|
91
|
-
params = Zoom::Params.new(Utils.extract_options!(args))
|
92
|
-
params.require(:meeting_id)
|
93
|
-
Utils.parse_response self.class.get("/meetings/#{params[:meeting_id]}/invitation", headers: request_headers)
|
94
|
-
end
|
61
|
+
get 'meeting_invitation', '/meetings/:meeting_id/invitation'
|
95
62
|
end
|
96
63
|
end
|
97
64
|
end
|
data/lib/zoom/actions/phone.rb
CHANGED
@@ -3,25 +3,13 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Phone
|
6
|
-
|
7
|
-
options = Zoom::Params.new(Utils.extract_options!(args))
|
8
|
-
options.require(%i[user_id])
|
9
|
-
response = self.class.get("/phone/users/#{options[:user_id]}/call_logs", query: options.except(:user_id), headers: request_headers)
|
10
|
-
Utils.parse_response(response)
|
11
|
-
end
|
6
|
+
extend Zoom::Actions
|
12
7
|
|
13
|
-
|
14
|
-
options = Zoom::Params.new(Utils.extract_options!(args))
|
15
|
-
response = self.class.get("/phone/users", query: options, headers: request_headers)
|
16
|
-
Utils.parse_response(response)
|
17
|
-
end
|
8
|
+
get 'call_logs', '/phone/users/:user_id/call_logs'
|
18
9
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
response = self.class.get("/phone/users/#{options[:user_id]}/recordings", query: options.except(:user_id), headers: request_headers)
|
23
|
-
Utils.parse_response(response)
|
24
|
-
end
|
10
|
+
get 'phone_users_list', '/phone/users'
|
11
|
+
|
12
|
+
get 'call_recordings', '/phone/users/:user_id/recordings'
|
25
13
|
end
|
26
14
|
end
|
27
15
|
end
|
@@ -3,40 +3,22 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Recording
|
6
|
+
extend Zoom::Actions
|
7
|
+
|
6
8
|
RECORDING_SETTINGS_KEYS = %i[share_recording recording_authentication
|
7
9
|
authentication_option authentication_domains viewer_download password
|
8
10
|
on_demand approval_type send_email_to_host show_social_share_buttons].freeze
|
9
11
|
|
10
|
-
|
11
|
-
options = Zoom::Params.new(Utils.extract_options!(args))
|
12
|
-
options.require(:user_id)
|
13
|
-
Utils.process_datetime_params!(%i[from to], options)
|
14
|
-
Utils.parse_response self.class.get("/users/#{options[:user_id]}/recordings", query: options.except(:user_id), headers: request_headers)
|
15
|
-
end
|
12
|
+
get 'recording_list', '/users/:user_id/recordings'
|
16
13
|
|
17
|
-
|
18
|
-
options = Zoom::Params.new(Utils.extract_options!(args))
|
19
|
-
options.require(:meeting_id)
|
20
|
-
Utils.parse_response self.class.get("/meetings/#{options[:meeting_id]}/recordings/settings", query: options.except(:meeting_id), headers: request_headers)
|
21
|
-
end
|
14
|
+
get 'meeting_recording_get', '/meetings/:meeting_id/recordings'
|
22
15
|
|
23
|
-
|
24
|
-
options = Zoom::Params.new(Utils.extract_options!(args))
|
25
|
-
options.require(:meeting_id)
|
26
|
-
Utils.parse_response self.class.get("/meetings/#{options[:meeting_id]}/recordings/settings", query: options.except(:meeting_id), headers: request_headers)
|
27
|
-
end
|
16
|
+
get 'meeting_recording_settings_get', '/meetings/:meeting_id/recordings/settings'
|
28
17
|
|
29
|
-
|
30
|
-
|
31
|
-
options.require(:meeting_id).permit(RECORDING_SETTINGS_KEYS)
|
32
|
-
Utils.parse_response self.class.patch("/meetings/#{options[:meeting_id]}/recordings/settings", body: options.except(:meeting_id).to_json, headers: request_headers)
|
33
|
-
end
|
18
|
+
patch 'meeting_recording_settings_update', '/meetings/:meeting_id/recordings/settings',
|
19
|
+
permit: RECORDING_SETTINGS_KEYS
|
34
20
|
|
35
|
-
|
36
|
-
options = Zoom::Params.new(Utils.extract_options!(args))
|
37
|
-
options.require(%i[meeting_id recording_id])
|
38
|
-
Utils.parse_response self.class.delete("/meetings/#{options[:meeting_id]}/recordings/#{options[:recording_id]}", query: options.except(:meeting_id, :recording_id), headers: request_headers)
|
39
|
-
end
|
21
|
+
delete 'meeting_recording_file_delete', '/meetings/:meeting_id/recordings/:recording_id'
|
40
22
|
end
|
41
23
|
end
|
42
24
|
end
|