chimp 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/chimp.gemspec +1 -1
- data/lib/chimp.rb +3 -3
- metadata +6 -7
- data/README +0 -22
data/chimp.gemspec
CHANGED
data/lib/chimp.rb
CHANGED
@@ -10,7 +10,7 @@ class Chimp
|
|
10
10
|
def self.connect(apikey)
|
11
11
|
datacenter = apikey[/-(.+)$/, 1]
|
12
12
|
|
13
|
-
@current
|
13
|
+
@current = new(apikey, datacenter)
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.current
|
@@ -26,8 +26,8 @@ class Chimp
|
|
26
26
|
JSON(post("lists"))
|
27
27
|
end
|
28
28
|
|
29
|
-
def subscribe(email, list_id)
|
30
|
-
post("listSubscribe", email_address: email, id: list_id)
|
29
|
+
def subscribe(email, list_id, opts = {})
|
30
|
+
post("listSubscribe", opts.merge(email_address: email, id: list_id))
|
31
31
|
end
|
32
32
|
|
33
33
|
def unsubscribe(email, list_id)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chimp
|
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,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dep
|
16
|
-
requirement: &
|
16
|
+
requirement: &70359437590520 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70359437590520
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: cutest
|
27
|
-
requirement: &
|
27
|
+
requirement: &70359437590040 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70359437590040
|
36
36
|
description: For those who want something nimble.
|
37
37
|
email:
|
38
38
|
- me@cyrildavid.com
|
@@ -41,7 +41,6 @@ extensions: []
|
|
41
41
|
extra_rdoc_files: []
|
42
42
|
files:
|
43
43
|
- LICENSE
|
44
|
-
- README
|
45
44
|
- rakefile
|
46
45
|
- lib/chimp.rb
|
47
46
|
- chimp.gemspec
|
data/README
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
CHIMP(1)
|
2
|
-
|
3
|
-
NAME
|
4
|
-
chimp -- Super light mailchimp client
|
5
|
-
|
6
|
-
SYNOPSIS
|
7
|
-
chimp = Chimp.connect("acbd18db4cc2f85cedef654fccc4a4d8-us4")
|
8
|
-
|
9
|
-
# Get all lists for your account
|
10
|
-
chimp.lists
|
11
|
-
# => {"total"=>1, "data"=>[{"id"=>"l654321", ...}]]}
|
12
|
-
|
13
|
-
# Add a new email to one of your lists identified by id
|
14
|
-
chimp.subscribe("foo@bar.com", "l654321")
|
15
|
-
# => "true"
|
16
|
-
|
17
|
-
# Unsubscribe an existing email
|
18
|
-
chimp.unsubscribe("foo@bar.com", "l654321")
|
19
|
-
# => "true"
|
20
|
-
|
21
|
-
INSTALLATION
|
22
|
-
$ gem install chimp
|