bgetting-hominid 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +13 -8
- data/VERSION.yml +1 -1
- data/hominid.gemspec +1 -1
- metadata +1 -1
data/README.textile
CHANGED
@@ -4,8 +4,6 @@ Hominid is a GemPlugin wrapper to the "Mailchimp API":http://www.mailchimp.com/a
|
|
4
4
|
|
5
5
|
h2. Installation
|
6
6
|
|
7
|
-
There are a few options for installing Hominid.
|
8
|
-
|
9
7
|
Install as a Rails plugin:
|
10
8
|
|
11
9
|
<pre><code>script/plugin install git://github.com/bgetting/hominid.git</code></pre>
|
@@ -20,7 +18,9 @@ Use the GemPlugin:
|
|
20
18
|
|
21
19
|
h2. Configuration
|
22
20
|
|
23
|
-
|
21
|
+
You can either use a master config file, which Hominid expects to find at @/config/hominid.yml@ or (thanks to "ron":http://github.com/ron) you can pass a hash of config options when calling Hominid. _If you are using Hominid as a Rails plugin, the config file will be created for you. If you are using Hominid as a gem, you will need to create the config file._
|
22
|
+
|
23
|
+
You will also need to create a Mailchimp account to get your API key (available at "http://admin.mailchimp.com/account/api/":http://admin.mailchimp.com/account/api/) for configuration.
|
24
24
|
|
25
25
|
h2. Example
|
26
26
|
|
@@ -28,7 +28,11 @@ To interact with the Mailchimp API, simply create a new Hominid object:
|
|
28
28
|
|
29
29
|
<pre><code>@hominid = Hominid.new</code></pre>
|
30
30
|
|
31
|
-
|
31
|
+
_or_
|
32
|
+
|
33
|
+
<pre><code>@hominid = Hominid.new({:username => 'USERNAME', :password => 'PASSWORD', :api_key => 'API_KEY', :send_goodbye => false, :send_notify => false, :double_opt => false})</code></pre>
|
34
|
+
|
35
|
+
You will need to have the @list ID@ of the mailing list you want to work with. You can find the @list ID@ of a list by:
|
32
36
|
|
33
37
|
<pre><code>
|
34
38
|
def find_list_id(list_name)
|
@@ -39,7 +43,7 @@ def find_list_id(list_name)
|
|
39
43
|
end
|
40
44
|
</code></pre>
|
41
45
|
|
42
|
-
|
46
|
+
To subscribe someone:
|
43
47
|
|
44
48
|
<pre><code>@hominid.subscribe(@list_id, "email@example.com", {:FNAME => 'Bob', :LNAME => 'Smith'}, 'html')</code></pre>
|
45
49
|
|
@@ -61,11 +65,12 @@ Campaign methods are also supported. You can get all the campaigns for a particu
|
|
61
65
|
|
62
66
|
Leave the @@list_id@ out and it will return all the campaigns for your Mailchimp account.
|
63
67
|
|
64
|
-
|
65
68
|
h2. Other Stuff
|
66
69
|
|
67
|
-
For the most part, this whole thing was an attempt to optimize the acts_as_mailchimp plugin, and incorporates all the great work from "C.G. Brown":http://www.projectlocker.com/ and "Kelly Mahan":http://digimedia.com/, as well as "Matthew Carlson":http://mandarinsoda.com/, whose plugin inspired nearly all of this work.
|
70
|
+
For the most part, this whole thing was an attempt to optimize the acts_as_mailchimp plugin, and incorporates all the great work from "C.G. Brown":http://www.projectlocker.com/ and "Kelly Mahan":http://digimedia.com/, as well as "Matthew Carlson":http://mandarinsoda.com/, whose plugin inspired nearly all of this work. Recently, "ron":http://github.com/ron and "netguru":http://github.com/netguru have also provided useful changes as well.
|
71
|
+
|
72
|
+
I encourage anyone using this gem to please fork it, improve it, and send me a pull request. I typically only use this gem in a minimal capacity, primarily for just managing whether or not a user is signed up for a mailing list. I do not intend to continue maintaining the "Acts As Mailchimp":http://github.com/bgetting/acts_as_mailchimp in the future, since I personally prefer to just use the Hominid gem.
|
68
73
|
|
69
|
-
|
74
|
+
So please, help us to improve this gem!
|
70
75
|
|
71
76
|
Copyright (c) 2009 Brian Getting, released under the MIT license.
|
data/VERSION.yml
CHANGED
data/hominid.gemspec
CHANGED