Sha256: 68a2b5cd50413d2a4b7090baa4331cf68f962fbe44cea0d17f0b2526718c1279

Contents?: true

Size: 1.22 KB

Versions: 4

Compression:

Stored size: 1.22 KB

Contents

# frozen_string_literal: true

require 'httparty'

module Zoom
  class Client
    include HTTParty
    include Actions::Account
    include Actions::Billing
    include Actions::Dashboard
    include Actions::Groups
    include Actions::M323Device
    include Actions::Meeting
    include Actions::Phone
    include Actions::Recording
    include Actions::Report
    include Actions::Roles
    include Actions::SipAudio
    include Actions::Token
    include Actions::User
    include Actions::Webinar
    include Actions::IM::Chat
    include Actions::IM::Group

    base_uri 'https://api.zoom.us/v2'
    headers 'Accept' => 'application/json'
    headers 'Content-Type' => 'application/json'

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

    def oauth_request_headers
      {
        'Authorization' => "Basic #{auth_token}"
      }.merge(headers)
    end

    def request_headers
      {
        'Authorization' => "Bearer #{access_token}"
      }.merge(headers)
    end

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

require 'zoom/clients/jwt'
require 'zoom/clients/oauth'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zoom_rb-1.0.2 lib/zoom/client.rb
zoom_rb-1.0.1 lib/zoom/client.rb
zoom_rb-1.0.0 lib/zoom/client.rb
zoom_rb-0.11.0 lib/zoom/client.rb