Class: PlanningCenter::Client

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

Constant Summary collapse

SITE =
'https://planningcenteronline.com'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Client

Returns a new instance of Client.

Yields:

  • (_self)

Yield Parameters:



18
19
20
# File 'lib/planning_center/client.rb', line 18

def initialize
  yield(self) if block_given?
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



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

def access_token
  @access_token
end

#access_token_secretObject

Returns the value of attribute access_token_secret.



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

def access_token_secret
  @access_token_secret
end

#consumer_keyObject

Returns the value of attribute consumer_key.



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

def consumer_key
  @consumer_key
end

#consumer_secretObject

Returns the value of attribute consumer_secret.



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

def consumer_secret
  @consumer_secret
end

Instance Method Details

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



26
27
28
# File 'lib/planning_center/client.rb', line 26

def get(path, headers = {})
  request(:get, path, headers)
end

#organizationObject



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

def organization
  Organization.find(self)
end

#post(path, body, headers = {}) ⇒ Object



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

def post(path, body, headers = {})
  request_with_body(:post, path, body, headers)
end

#put(path, body, headers = {}) ⇒ Object



34
35
36
# File 'lib/planning_center/client.rb', line 34

def put(path, body, headers = {})
  request_with_body(:put, path, body, headers)
end