bloomerang_api 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1115ff6cbfd710e29125b2f1dffd2c3a0406f650cab18e5188d92f64384469cf
4
- data.tar.gz: 2329d69106766e001d2bd55376a040f5a0ccda7a3e3117f7e33b519c85bc6200
3
+ metadata.gz: 82264c86f55d5d8fafd369616b8c9e931d782f2193a28d2aa2537f7ee4c599ef
4
+ data.tar.gz: c01b216904ae2f9d5ffd612a2d32bda05e66da6f0fdfd72207f19eb50f403093
5
5
  SHA512:
6
- metadata.gz: 6402efa8347325f403db5f3e9362533ccf0f522678599bff1642a28ef1786a0931f7fc7f6e332390d15b71b8dcca21bf6d645e41107c6ff1155cd8d2c4b12a58
7
- data.tar.gz: 1423f68406509952f130961e78b0e70582d51bf77ada6541fe93a854536f3b3b9552a7ecb5cdba33c0b05a91cc96a083c6d1a0b2c016c69f11d93063eb690b9a
6
+ metadata.gz: a582ee1d67050b0d847520a9078c0ad344834642b1145926a706af7095b31292934243d5296b3fe58aadcf0eab311ead8dff8c1d52d077477704a1d2a00e8070
7
+ data.tar.gz: 37f8a57528d54e387064b74721cba69671ea46dad363bf148ddc37e4116f8303e13fbc5049cdc109e7a4c6de5a8fd0d787701369d64782787229d360ec592438
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bloomerang_api (0.2.0)
4
+ bloomerang_api (1.0.2)
5
5
  faraday (>= 2.7)
6
6
 
7
7
  GEM
@@ -9,21 +9,33 @@ module Bloomerang
9
9
  class Base
10
10
  def self.get(path, params = {})
11
11
  response = connection(params).get(path)
12
+
13
+ puts response.env.url
14
+
12
15
  JSON.parse response.body
13
16
  end
14
17
 
15
18
  def self.delete(path, params = {})
16
19
  response = connection(params).delete(path)
20
+
21
+ puts response.env.url
22
+
17
23
  JSON.parse response.body
18
24
  end
19
25
 
20
26
  def self.post(path, params, body)
21
27
  response = connection(params).post(path, body.to_json)
28
+
29
+ puts response.env.url
30
+
22
31
  JSON.parse response.body
23
32
  end
24
33
 
25
34
  def self.put(path, params, body)
26
35
  response = connection(params).put(path, body.to_json)
36
+
37
+ puts response.env.url
38
+
27
39
  JSON.parse response.body
28
40
  end
29
41
 
@@ -32,7 +44,7 @@ module Bloomerang
32
44
 
33
45
  def connection(params)
34
46
  Faraday.new(
35
- url: Bloomerang.configuration.api_url,
47
+ Bloomerang.configuration.api_url,
36
48
  headers: {
37
49
  "Content-Type" => "application/json",
38
50
  "X-API-Key" => Bloomerang.configuration.api_key
@@ -112,7 +112,7 @@ module Bloomerang
112
112
  # id integer
113
113
  # body see API for fields
114
114
  def self.update_communication_settings(id, body)
115
- put("/constituent/#{id}/updateCommunicationSettings", {}, body)
115
+ put("constituent/#{id}/updateCommunicationSettings", {}, body)
116
116
  end
117
117
 
118
118
  ### Search for constituents and households
@@ -19,7 +19,7 @@ module Bloomerang
19
19
  # Params:
20
20
  # type string, Available values: Constituent, Transaction, Interaction, Note, Benevon
21
21
  def self.categories(type)
22
- get("/customFieldCategories/#{type}/")
22
+ get("customFieldCategories/#{type}/")
23
23
  end
24
24
 
25
25
  ### Fetch CustomFields by type
@@ -29,7 +29,7 @@ module Bloomerang
29
29
  # type string, Available values: Constituent, Transaction, Interaction, Note, Benevon
30
30
  # isActive boolean, Default value: true
31
31
  def self.fields(type, params = {})
32
- get("/customFields/#{type}/", params)
32
+ get("customFields/#{type}/", params)
33
33
  end
34
34
 
35
35
  ### Fetch CustomValues by type
@@ -39,7 +39,7 @@ module Bloomerang
39
39
  # type string, Available values : Constituent, Transaction, Interaction, Note, Benevon
40
40
  # isActive boolean, Default value: true
41
41
  def self.values(type, params = {})
42
- get("/customValues/#{type}/", params)
42
+ get("customValues/#{type}/", params)
43
43
  end
44
44
 
45
45
  ### Fetch CustomValues by type for the given field
@@ -50,7 +50,7 @@ module Bloomerang
50
50
  # fieldId integer
51
51
  # isActive boolean, Default value: true
52
52
  def self.values_by_field(type, field_id, params = {})
53
- get("/customValues/#{type}/#{field_id}", params)
53
+ get("customValues/#{type}/#{field_id}", params)
54
54
  end
55
55
  end
56
56
  end
@@ -49,7 +49,6 @@ module Bloomerang
49
49
  # take integer, default: 50, simple paging system
50
50
  # search string, searches on household name and constituent full name, matches any part of string
51
51
  def self.search(params = {})
52
- # TODO: BREAKING CHANGE: query changed to params
53
52
  Constituent.search(params)
54
53
  end
55
54
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bloomerang
4
- VERSION = "1.0.1".freeze
4
+ VERSION = "1.0.2"
5
5
  end
@@ -18,4 +18,7 @@ Bloomerang.configure do |config|
18
18
  # ENV or dotenv example:
19
19
  # Learn about dotenv gem: https://github.com/bkeepers/dotenv
20
20
  # config.api_key = ENV["BLOOMERANG_API_KEY"]
21
+ ### Other available settings:
22
+ ## api_url: defaults to "https://api.bloomerang.co/v2"
23
+ # config.api_url = "https://api.bloomerang.co/v2"
21
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloomerang_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chiperific