Current section
Files
Jump to
Current section
Files
lib/exgrid.ex
defmodule ExGrid do
defstruct [:api_key, :api_user]
@doc """
Validate credentials
Sendgrid API needs a user and key to authenticate
%{api_key: key, api_user: user}
"""
def credentials(%{api_key: key, api_user: user}) do
{ :ok, %ExGrid{api_key: key, api_user: user} }
end
def credentials(_) do
{:error}
end
end