diff options
author | Mentor Ágil <mentoragil@gmail.com> | 2015-05-13 00:17:43 -0300 |
---|---|---|
committer | Mentor Ágil <mentoragil@gmail.com> | 2015-05-13 00:17:43 -0300 |
commit | c3cf131c703e5140a14fac37ae54ce7e100b3e7b (patch) | |
tree | 6a5b7832063706eedca2d83c9fc0942e76b1ccc0 | |
parent | 1db11146a60f436c29842a2c43aa161cdcfafda8 (diff) | |
download | mailchimp-c3cf131c703e5140a14fac37ae54ce7e100b3e7b.tar.gz mailchimp-c3cf131c703e5140a14fac37ae54ce7e100b3e7b.tar.xz |
fixing GenServer start_link
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | lib/mailchimp.ex | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -2,3 +2,4 @@ /deps erl_crash.dump *.ez +/config/config.exs @@ -26,7 +26,7 @@ end 2. Start a new process: - Mailchimp.start + Mailchimp.start_link [] ### Getting Account Details diff --git a/lib/mailchimp.ex b/lib/mailchimp.ex index e09f1e6..6239544 100644 --- a/lib/mailchimp.ex +++ b/lib/mailchimp.ex @@ -6,7 +6,7 @@ defmodule Mailchimp do @apikey Application.get_env :mailchimp, :apikey ### Public API - def start do + def start_link(_opts) do shard = get_shard apiroot = "https://#{shard}.api.mailchimp.com/3.0/" config = %{apiroot: apiroot, apikey: @apikey} |