Class: Zoom::Client

Constant Summary

Constants included from Actions::Webinar

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

Instance Method Summary collapse

Methods included from Actions::IM::Chat

#chat_get, #chat_list

Methods included from Actions::Recording

#mc_recording_list, #recording_delete, #recording_get, #recording_list

Methods included from Actions::Report

#daily_report, #hosts_report, #meeting_details_report, #meeting_participants_report, #meeting_polls_report, #meetings_report, #telephone_report, #webinar_details_report, #webinar_participants_report, #webinar_polls_report, #webinar_qa_report

Methods included from Actions::Webinar

#past_webinar_list, #webinar_create, #webinar_delete, #webinar_get, #webinar_list, #webinar_panelist_add, #webinar_panelist_delete, #webinar_panelists_delete_all, #webinar_panelists_list, #webinar_registrant_add, #webinar_registrants_list, #webinar_registrants_status_update, #webinar_status_update, #webinar_update

Methods included from Actions::Metrics

#metrics_crc, #metrics_meetingdetail, #metrics_meetings

Methods included from Actions::Meeting

#meeting_create, #meeting_delete, #meeting_end, #meeting_get, #meeting_list, #meeting_live, #meeting_register, #meeting_update, #meeting_update_status, #past_meeting_details, #past_meeting_participants

Methods included from Actions::User

#user_assistants_create, #user_assistants_delete, #user_assistants_delete_all, #user_assistants_list, #user_create, #user_delete, #user_email_check, #user_get, #user_list, #user_password_update, #user_permissions_get, #user_schedulers_delete, #user_schedulers_delete_all, #user_schedulers_list, #user_settings_get, #user_settings_update, #user_status_update, #user_token_delete, #user_token_get, #user_update, #user_upload_picture, #user_vanity_name_check

Methods included from Actions::Account

#account_billing_get, #account_billing_update, #account_create, #account_delete, #account_get, #account_list, #account_options_update, #account_plans_list, #account_settings_get, #account_settings_update, #some_method

Constructor Details

#initialize(config) ⇒ Client

Returns a new instance of Client.



26
27
28
29
30
# File 'lib/zoom/client.rb', line 26

def initialize(config)
  Utils.require_params(%i[api_key api_secret], config)
  config.each { |k, v| instance_variable_set("@#{k}", v) }
  self.class.default_timeout(@timeout)
end

Instance Method Details

#access_tokenObject



40
41
42
# File 'lib/zoom/client.rb', line 40

def access_token
  JWT.encode({ iss: @api_key, exp: Time.now.to_i + @timeout }, @api_secret, 'HS256', { typ: 'JWT' })
end

#request_headersObject



32
33
34
35
36
37
38
# File 'lib/zoom/client.rb', line 32

def request_headers
  {
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'Authorization' => "Bearer #{access_token}"
  }
end