autopilothq 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autopilothq.rb +11 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cd59b911c8f34f7d28ab0a932ff2af9f9808c73
|
4
|
+
data.tar.gz: 99260f3c28ad7032684afd188b1980af4d9096e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c85684c00362e1dff611414cf1692200247f9fb96db9d7227819d6979d93b1e949a178e36d1e6bfc25230a67a79baaea3d701036faeb293eebdd84712c1b404f
|
7
|
+
data.tar.gz: 81720b0d7e203340adc05eaf22a9e9dfe027a7795f6689c1562016016966aa92a707837d87eb3064f833681e6bc9eaaf4c198be990e25b2963163ea60532f920
|
data/lib/autopilothq.rb
CHANGED
@@ -8,19 +8,19 @@ class Autopilothq
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.update_contact(email, custom_attrs)
|
11
|
-
|
12
|
-
|
13
|
-
"
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
if @@api_key.present?
|
12
|
+
attributes = {
|
13
|
+
"contact" => {
|
14
|
+
"Email" => email,
|
15
|
+
"custom" => {}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
custom_attrs.each_pair{ |key, value|
|
19
|
+
attributes['contact']['custom'][get_key_name(key, value)] = value
|
17
20
|
}
|
18
|
-
}
|
19
|
-
custom_attrs.each_pair{ |key, value|
|
20
|
-
attributes['contact']['custom'][get_key_name(key, value)] = value
|
21
|
-
}
|
22
21
|
|
23
|
-
|
22
|
+
response = RestClient.post 'https://api2.autopilothq.com/v1/contact', attributes.to_json, headers
|
23
|
+
end
|
24
24
|
|
25
25
|
return true
|
26
26
|
rescue RestClient::RequestFailed => e
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autopilothq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Culbertson
|
@@ -45,7 +45,7 @@ extensions: []
|
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
47
|
- lib/autopilothq.rb
|
48
|
-
homepage:
|
48
|
+
homepage: https://github.com/jjculber/autopilothq-ruby
|
49
49
|
licenses:
|
50
50
|
- MIT
|
51
51
|
metadata: {}
|