email-opened 0.0.2 → 0.0.3
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.
- data/lib/email-opened.rb +6 -6
- data/lib/email-opened/version.rb +1 -1
- metadata +2 -2
data/lib/email-opened.rb
CHANGED
@@ -2,7 +2,7 @@ require "email-opened/version"
|
|
2
2
|
|
3
3
|
class EmailOpened
|
4
4
|
def initialize(api_key)
|
5
|
-
eo_api_key = api_key
|
5
|
+
@eo_api_key = api_key
|
6
6
|
end
|
7
7
|
|
8
8
|
# To send a message:
|
@@ -13,19 +13,19 @@ class EmailOpened
|
|
13
13
|
# {
|
14
14
|
# email: "person@example.co",
|
15
15
|
# name: "One Person"
|
16
|
+
# shoe-size: 10
|
16
17
|
# },
|
17
18
|
# {
|
18
19
|
# email: "another@example.com",
|
19
|
-
# name: "Another
|
20
|
+
# name: "Another Person",
|
21
|
+
# url: "http://awesome.com"
|
20
22
|
# }
|
21
23
|
# ],
|
22
|
-
#
|
23
|
-
# from: "Just Me <me@example.com>", // OR from: "me@example.com"
|
24
|
-
# template_id: 19
|
24
|
+
# message_token: "dz5t0r"
|
25
25
|
# )
|
26
26
|
|
27
27
|
def send(message = {})
|
28
|
-
url = "http://app.lvh.me:3000/#{eo_api_key}/api/v1/messages"
|
28
|
+
url = "http://app.lvh.me:3000/#{@eo_api_key}/api/v1/messages"
|
29
29
|
response = RestClient.post url, { accept: :json, message: message }
|
30
30
|
puts response
|
31
31
|
end
|
data/lib/email-opened/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email-opened
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|