Class: Zoom::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty, Actions::Account, Actions::Billing, Actions::Dashboard, Actions::Groups, Actions::IM::Chat, Actions::IM::Group, Actions::M323Device, Actions::Meeting, Actions::Phone, Actions::Recording, Actions::Report, Actions::Roles, Actions::SipAudio, Actions::Token, Actions::User, Actions::Webinar
Defined in:
lib/zoom/client.rb,
lib/zoom/clients/jwt.rb,
lib/zoom/clients/oauth.rb,
lib/zoom/clients/server_to_server_oauth.rb

Direct Known Subclasses

JWT, OAuth, ServerToServerOAuth

Defined Under Namespace

Classes: JWT, OAuth, ServerToServerOAuth

Constant Summary

Constants included from Actions::Webinar

Actions::Webinar::RECURRENCE_KEYS, Actions::Webinar::SETTINGS_KEYS

Constants included from Actions::Recording

Actions::Recording::RECORDING_SETTINGS_KEYS

Instance Method Summary collapse

Methods included from Actions

determine_request_options, extract_path_keys, make_request, parse_path

Instance Method Details

#auth_tokenObject



54
55
56
# File 'lib/zoom/client.rb', line 54

def auth_token
  Base64.encode64("#{Zoom.configuration.api_key}:#{Zoom.configuration.api_secret}").delete("\n")
end

#bearer_authorization_headerObject



44
45
46
47
48
# File 'lib/zoom/client.rb', line 44

def bearer_authorization_header
  {
    'Authorization' => "Bearer #{access_token}"
  }
end

#headersObject



29
30
31
32
33
34
# File 'lib/zoom/client.rb', line 29

def headers
  {
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
  }
end

#oauth_request_headersObject



36
37
38
39
40
41
42
# File 'lib/zoom/client.rb', line 36

def oauth_request_headers
  {
    'Authorization' => "Basic #{auth_token}",
    'Accept' => 'application/json',
    'Content-Type' => 'application/x-www-form-urlencoded',
  }
end

#request_headersObject



50
51
52
# File 'lib/zoom/client.rb', line 50

def request_headers
  bearer_authorization_header.merge(headers)
end