Class: ChurchCommunityBuilder::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/ccb_api.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_passwordObject (readonly)

Returns the value of attribute api_password.



20
21
22
# File 'lib/ccb_api.rb', line 20

def api_password
  @api_password
end

.api_subdomainObject (readonly)

Returns the value of attribute api_subdomain.



20
21
22
# File 'lib/ccb_api.rb', line 20

def api_subdomain
  @api_subdomain
end

.api_usernameObject (readonly)

Returns the value of attribute api_username.



20
21
22
# File 'lib/ccb_api.rb', line 20

def api_username
  @api_username
end

Class Method Details

.connect(username, password, subdomain) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/ccb_api.rb', line 23

def self.connect(username, password, subdomain)
  raise ChurchCommunityBuilderExceptions::UnableToConnectToChurchCommunityBuilder.new('Username, password, and subdomain cannot be nil.') if username.nil? or password.nil? or subdomain.nil?
  @api_username = username
  @api_password = password
  @api_subdomain = subdomain
  true
end