Skip to content

Commit

Permalink
add support for reading apikey from system properties
Browse files Browse the repository at this point in the history
  • Loading branch information
pelle committed Sep 26, 2012
1 parent 179cfbd commit d622c46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Subscribe an email address:


## Configuring API Keys ## 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*. Alternatively you can create a dynamic binding for *mc-api-key*.


Expand Down
2 changes: 1 addition & 1 deletion src/climp/core.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


(def ^:dynamic *mc-api-key* (def ^:dynamic *mc-api-key*
(let [env (System/getenv)] (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 (defn mailchimp-dc
"Return the MailChimp Datacenter for API KEY" "Return the MailChimp Datacenter for API KEY"
Expand Down

0 comments on commit d622c46

Please sign in to comment.