Method: RedboothRuby::Client#initialize

Defined in:
lib/redbooth-ruby/client.rb

#initialize(session, options = {}) ⇒ Client

Creates an client object using the given Redbooth session. existing account.

Parameters:

  • session (Redbooth::Session)

    redbooth session object with the correct authorization

  • options (Hash) (defaults to: {})

    client options

Options Hash (options):

  • retry (Proc) — default: the client will handle

    Retry block to be executed when client hits an async endpoint

Raises:



19
20
21
22
23
24
# File 'lib/redbooth-ruby/client.rb', line 19

def initialize(session, options={})
  raise RedboothRuby::AuthenticationError unless session.valid?
  @session = session
  @options = options
  self
end