Module: Zoom::Actions
- Included in:
- Account, Billing, Dashboard, Groups, IM::Chat, Meeting, Phone, Recording, Report, Roles, SipAudio, Token, User, Webinar
- Defined in:
- lib/zoom/actions.rb,
lib/zoom/actions/user.rb,
lib/zoom/actions/phone.rb,
lib/zoom/actions/roles.rb,
lib/zoom/actions/token.rb,
lib/zoom/actions/groups.rb,
lib/zoom/actions/report.rb,
lib/zoom/actions/account.rb,
lib/zoom/actions/billing.rb,
lib/zoom/actions/im/chat.rb,
lib/zoom/actions/meeting.rb,
lib/zoom/actions/webinar.rb,
lib/zoom/actions/im/group.rb,
lib/zoom/actions/dashboard.rb,
lib/zoom/actions/recording.rb,
lib/zoom/actions/sip_audio.rb,
lib/zoom/actions/m323_device.rb
Defined Under Namespace
Modules: Account, Billing, Dashboard, Groups, IM, M323Device, Meeting, Phone, Recording, Report, Roles, SipAudio, Token, User, Webinar
Class Method Summary
collapse
Class Method Details
.determine_request_options(client, oauth) ⇒ Object
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/zoom/actions.rb', line 18
def self.determine_request_options(client, oauth)
if oauth
{
headers: client.,
base_uri: 'https://zoom.us/'
}
else
{ headers: client. }
end
end
|
5
6
7
|
# File 'lib/zoom/actions.rb', line 5
def self.(path)
path.scan(/:\w+/).map { |match| match[1..-1].to_sym }
end
|
.make_request(args) ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/zoom/actions.rb', line 29
def self.make_request(args)
client, method, parsed_path, params, request_options, oauth =
args.values_at :client, :method, :parsed_path, :params, :request_options, :oauth
case method
when :get, :delete
request_options[:query] = params
when :post, :put, :patch
request_options[:body] =
oauth ? URI.encode_www_form(params.to_a) : params.to_json
end
client.class.public_send(method, parsed_path, **request_options)
end
|
.parse_path(path, path_keys, params) ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/zoom/actions.rb', line 9
def self.parse_path(path, path_keys, params)
parsed_path = path.dup
path_keys.each do |key|
value = params[key].to_s
parsed_path = parsed_path.sub(":#{key}", value)
end
parsed_path
end
|