Permalink
Browse files

add support for reading apikey from system properties

  • Loading branch information...
1 parent 179cfbd commit d622c46c41a4a8e8a0a174efdafa5772229e3caa @pelle pelle committed Sep 26, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 README.md
  2. +1 −1 src/climp/core.clj
View
@@ -28,7 +28,7 @@ Subscribe an email address:
## Configuring API Keys
-The easiest way to set it up is to set your api key in the MC_API_KEY environment variable.
+The easiest way to set it up is to set your api key in the MC_API_KEY environment variable or system property.
Alternatively you can create a dynamic binding for *mc-api-key*.
View
@@ -4,7 +4,7 @@
(def ^:dynamic *mc-api-key*
(let [env (System/getenv)]
- (get env "MC_API_KEY" (get env "MAILCHIMP_API_KEY"))))
+ (get env "MC_API_KEY" (get env "MAILCHIMP_API_KEY" (System/getProperty "MC_API_KEY")))))
(defn mailchimp-dc
"Return the MailChimp Datacenter for API KEY"

0 comments on commit d622c46

Please sign in to comment.