Class: ChurchCommunityBuilder::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/church_community_builder/client.rb,
lib/church_community_builder/resources/fund.rb,
lib/church_community_builder/resources/campus.rb,
lib/church_community_builder/resources/person.rb,
lib/church_community_builder/resources/contribution.rb

Defined Under Namespace

Modules: Campus, Contribution, Fund, Person

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subdomain, username, password, logger = false) ⇒ Client

Returns a new instance of Client.



18
19
20
21
22
23
# File 'lib/church_community_builder/client.rb', line 18

def initialize(subdomain, username, password, logger = false)
  @subdomain = subdomain
  @username  = username
  @password  = password
  @logger    = logger
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



16
17
18
# File 'lib/church_community_builder/client.rb', line 16

def logger
  @logger
end

#passwordObject (readonly)

Returns the value of attribute password.



16
17
18
# File 'lib/church_community_builder/client.rb', line 16

def password
  @password
end

#subdomainObject (readonly)

Returns the value of attribute subdomain.



16
17
18
# File 'lib/church_community_builder/client.rb', line 16

def subdomain
  @subdomain
end

#usernameObject (readonly)

Returns the value of attribute username.



16
17
18
# File 'lib/church_community_builder/client.rb', line 16

def username
  @username
end

Instance Method Details

#get(path, options = {}) ⇒ Object



25
26
27
# File 'lib/church_community_builder/client.rb', line 25

def get(path, options = {})
  connection.get(path, options).body
end

#post(path, options = {}) ⇒ Object



29
30
31
32
# File 'lib/church_community_builder/client.rb', line 29

def post(path, options = {})
  res = connection.post(path, options).body
  res
end