scrunchie 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.
Files changed (3) hide show
  1. data/README.md +20 -3
  2. data/lib/scrunchie/version.rb +1 -1
  3. metadata +2 -2
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Scrunchie
2
2
 
3
- TODO: Write a gem description
3
+ This gem interfaces with the Elastic Email's API at <http://www.elasticemail.com>.
4
4
 
5
5
  ## Installation
6
6
 
@@ -16,9 +16,26 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install scrunchie
18
18
 
19
- ## Usage
19
+ ## Example Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Set the configuration in a file that is loaded by Rails autoload path or create a new folder in app/
22
+ and set create a class to hold the email address you register at Elastic Email and the API key.
23
+
24
+ class CharmBlast
25
+ def initialize(params)
26
+ @params = params
27
+ @faraday = Scrunchie::Blast.new('your-email@address.com', 'your-authentication-token', 'Name of List')
28
+ end
29
+
30
+ def deliver
31
+ @resp = @faraday.create_contact(@params)
32
+ @parsed = Scrunchie::XML.parse(@resp.body)
33
+ end
34
+ end
35
+
36
+ Get the response:
37
+
38
+ @resp = CharmBlast.new(email: 'email@address.com', first_name: 'email', last_name: 'address').deliver
22
39
 
23
40
  ## Contributing
24
41
 
@@ -1,3 +1,3 @@
1
1
  module Scrunchie
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrunchie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
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: 2013-02-03 00:00:00.000000000 Z
12
+ date: 2013-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday