Module: WebinarJam

Defined in:
lib/webinarjam.rb,
lib/webinarjam/client.rb,
lib/webinarjam/errors.rb,
lib/webinarjam/version.rb

Defined Under Namespace

Classes: APIError, AuthenticationError, Client, ConfigurationError, Error, RateLimitError

Constant Summary collapse

VERSION =
"0.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject



11
12
13
# File 'lib/webinarjam.rb', line 11

def api_key
  @api_key || ENV["WEBINARJAM_API_KEY"]
end

Class Method Details

.client(**options) ⇒ Object

Convenience constructor honoring the module-level configuration.



22
23
24
# File 'lib/webinarjam.rb', line 22

def client(**options)
  Client.new(api_key: api_key, **options)
end

.configure {|_self| ... } ⇒ Object

WebinarJam.configure { |config| config.api_key = "..." }

Yields:

  • (_self)

Yield Parameters:

  • _self (WebinarJam)

    the object that the method was called on



16
17
18
19
# File 'lib/webinarjam.rb', line 16

def configure
  yield self
  self
end