Class: ChurchCommunityBuilder::Client
- Inherits:
-
Object
- Object
- ChurchCommunityBuilder::Client
- 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
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#subdomain ⇒ Object
readonly
Returns the value of attribute subdomain.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #get(path, options = {}) ⇒ Object
-
#initialize(subdomain, username, password, logger = false) ⇒ Client
constructor
A new instance of Client.
- #post(path, options = {}) ⇒ Object
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
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
16 17 18 |
# File 'lib/church_community_builder/client.rb', line 16 def logger @logger end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
16 17 18 |
# File 'lib/church_community_builder/client.rb', line 16 def password @password end |
#subdomain ⇒ Object (readonly)
Returns the value of attribute subdomain.
16 17 18 |
# File 'lib/church_community_builder/client.rb', line 16 def subdomain @subdomain end |
#username ⇒ Object (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, = {}) connection.get(path, ).body end |
#post(path, options = {}) ⇒ Object
29 30 31 32 |
# File 'lib/church_community_builder/client.rb', line 29 def post(path, = {}) res = connection.post(path, ).body res end |