Class: Bloomerang::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/bloomerang/base.rb
Overview
Bloomerang::Base Primary interface for Faraday
Direct Known Subclasses
Address, Appeal, Campaign, Constituent, CustomField, Email, EmailInterest, Fund, Household, Interaction, Note, Phone, Pledge, Refund, Relationship, SoftCredit, Task, Transaction, Tribute
Class Method Summary
collapse
Class Method Details
.delete(path, params = {}) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/bloomerang/base.rb', line 18
def self.delete(path, params = {})
response = connection(params).delete(path)
puts response.env.url
JSON.parse response.body
end
|
.get(path, params = {}) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/bloomerang/base.rb', line 10
def self.get(path, params = {})
response = connection(params).get(path)
puts response.env.url
JSON.parse response.body
end
|
.post(path, params, body) ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/bloomerang/base.rb', line 26
def self.post(path, params, body)
response = connection(params).post(path, body.to_json)
puts response.env.url
JSON.parse response.body
end
|
.put(path, params, body) ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/bloomerang/base.rb', line 34
def self.put(path, params, body)
response = connection(params).put(path, body.to_json)
puts response.env.url
JSON.parse response.body
end
|