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 +4 -4
- data/.rubocop.yml +1 -0
- data/README.md +6 -1
- data/lib/action_network_rest/people.rb +6 -0
- data/lib/action_network_rest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d8ccace61c21488260b04d902f02bf58cea6c834f7d118efec1d4ab1118e25e
|
4
|
+
data.tar.gz: 13e514a3edb2121263a1cea07ecf67ae809609dbfd596f51d7297e559ef9f48b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d48ea50aef6bdc81d44e79e396c7386ca87042af2991ab016205b56e3491868e95ed213f3ed744ddbef3ad5846a72bd2dbd0cd0f80d22195bcdb6b4ba2085300
|
7
|
+
data.tar.gz: c83e23dbbd65671efc3c9498a1f26406f66156b834f643ae801221b83eefb8220c9e4b0fc9d949db834f7ee8189f52896b736457096045dd20c4ac1a5c809cfc
|
data/.rubocop.yml
CHANGED
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
|
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.
|
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-
|
11
|
+
date: 2020-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vertebrae
|