diff options
author | Rawane Zossou <dev@raw1z.fr> | 2015-09-19 04:04:59 +0200 |
---|---|---|
committer | Rawane Zossou <dev@raw1z.fr> | 2015-09-19 04:04:59 +0200 |
commit | 8b77bf7207380748ba0370715b3123afff42aba7 (patch) | |
tree | dec6c55016f112750e79162b459ed9efcdeb9a13 /lib | |
parent | d46896cf276579618afb9b6ad46100f78b77bb25 (diff) | |
download | mailchimp-8b77bf7207380748ba0370715b3123afff42aba7.tar.gz mailchimp-8b77bf7207380748ba0370715b3123afff42aba7.tar.xz |
remove old apis from Mailchimp module
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mailchimp.ex | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/lib/mailchimp.ex b/lib/mailchimp.ex index fa8eb1d..914c54b 100644 --- a/lib/mailchimp.ex +++ b/lib/mailchimp.ex @@ -11,41 +11,5 @@ defmodule Mailchimp do opts = [strategy: :one_for_one, name: Aliver.Supervisor] Supervisor.start_link(children, opts) end - - def get_account_details do - GenServer.call(:mailchimp, :account_details) - end - - def get_all_lists do - GenServer.call(:mailchimp, :all_lists) - end - - def get_list_members(list_id) do - GenServer.call(:mailchimp, {:list_members, list_id}) - end - - def add_member(list_id, email) do - GenServer.call(:mailchimp, {:add_member, list_id, email}) - end - - ### Server API - def handle_call(:account_details, _from, config) do - details = Mailchimp.Account.get_details(config) - {:reply, details, config} - end - - def handle_call(:all_lists, _from, config) do - lists = Mailchimp.List.all(config) - {:reply, lists, config} - end - - def handle_call({:list_members, list_id}, _from, config) do - members = Mailchimp.List.members(config, list_id) - {:reply, members, config} - end - - def handle_call({:add_member, list_id, email}, _from, config) do - member = Mailchimp.List.add_member(config, %{"list_id" => list_id, "email" => email}) - {:reply, member, config} - end end + |