action_network_rest 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abb5c663b923a0f30bfcaf0b70fd43de40baf9f59752154eaead286acf7259a7
4
- data.tar.gz: dbd808c9166b1047c70d87df247a5d624851f1e69a4271da6edb70ca578a9161
3
+ metadata.gz: 0d8ccace61c21488260b04d902f02bf58cea6c834f7d118efec1d4ab1118e25e
4
+ data.tar.gz: 13e514a3edb2121263a1cea07ecf67ae809609dbfd596f51d7297e559ef9f48b
5
5
  SHA512:
6
- metadata.gz: 71b0865b95a6d0ac618f6d9a35379b9998391c05dee7714c5b12dc0c8215e2ade7163cd8d2e81b3bd1a5d4743d6599207c22d48b22a7a5f9e724ccbc99ebe907
7
- data.tar.gz: afac667e373e1ce51641edd1cde82d4269220ef95b847cc589fd9ffa079419e559f42c677210a87a91888e978a40ac07c5199179e684923f2feebc8c032849a8
6
+ metadata.gz: d48ea50aef6bdc81d44e79e396c7386ca87042af2991ab016205b56e3491868e95ed213f3ed744ddbef3ad5846a72bd2dbd0cd0f80d22195bcdb6b4ba2085300
7
+ data.tar.gz: c83e23dbbd65671efc3c9498a1f26406f66156b834f643ae801221b83eefb8220c9e4b0fc9d949db834f7ee8189f52896b736457096045dd20c4ac1a5c809cfc
@@ -1,5 +1,6 @@
1
1
  AllCops:
2
2
  DisabledByDefault: true
3
+ NewCops: enable
3
4
 
4
5
  Security:
5
6
  Enabled: true
data/README.md CHANGED
@@ -23,6 +23,8 @@ Or install it yourself as:
23
23
  ## Usage
24
24
 
25
25
  ```
26
+ require 'action_network_rest'
27
+
26
28
  client = ActionNetworkRest.new(api_key: YOUR_API_KEY)
27
29
 
28
30
  # Check that our API key is working. Returns true or false.
@@ -51,10 +53,13 @@ person = client.people.get(person_id)
51
53
  puts person.email_addresses
52
54
 
53
55
  # Retrieve a Person's data by their email address
54
- person = client.people.find_by_email(person_email
56
+ person = client.people.find_by_email(person_email)
55
57
  person_id = person.action_network_id
56
58
  puts person.email_addresses
57
59
 
60
+ # Update a Person
61
+ client.people.update(person_id, {custom_fields: {custom_id: "12345"}})
62
+
58
63
  # Unsubscribe a Person
59
64
  client.people.unsubscribe(person_id)
60
65
 
@@ -41,6 +41,12 @@ module ActionNetworkRest
41
41
  end
42
42
  end
43
43
 
44
+ def update(id, person_data)
45
+ people_path = "#{base_path}#{url_escape(id)}"
46
+ response = client.put_request people_path, person_data
47
+ object_from_response(response)
48
+ end
49
+
44
50
  private
45
51
 
46
52
  def osdi_key
@@ -1,3 +1,3 @@
1
1
  module ActionNetworkRest
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_network_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grey Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vertebrae