Class: PlanningCenter::Client
- Inherits:
-
Object
- Object
- PlanningCenter::Client
- Defined in:
- lib/planning_center/client.rb
Constant Summary collapse
- SITE =
'https://planningcenteronline.com'
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#access_token_secret ⇒ Object
Returns the value of attribute access_token_secret.
-
#consumer_key ⇒ Object
Returns the value of attribute consumer_key.
-
#consumer_secret ⇒ Object
Returns the value of attribute consumer_secret.
Instance Method Summary collapse
- #get(path, headers = {}) ⇒ Object
-
#initialize {|_self| ... } ⇒ Client
constructor
A new instance of Client.
- #organization ⇒ Object
- #post(path, body, headers = {}) ⇒ Object
- #put(path, body, headers = {}) ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Client
Returns a new instance of Client.
18 19 20 |
# File 'lib/planning_center/client.rb', line 18 def initialize yield(self) if block_given? end |
Instance Attribute Details
#access_token ⇒ Object
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_secret ⇒ Object
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_key ⇒ Object
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_secret ⇒ Object
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 |
#organization ⇒ Object
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 |