Elixir Whatsapp Cloud API SDK
If available in Hex, the package can be installed
by adding ex_waca
to your list of dependencies in mix.exs
:
def deps do
[
{:ex_waca, "~> 0.1.0"}
]
end
Get the dependencies:
mix deps.get
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_waca.
Setup ENV variables
cp .env.sample .env
iex -S mix
access_token = "TODO: Set me up"
sender_id = "TODO: Set me up"
recipient_number = "TODO: Set me up"
client = ExWaca.Client.client(access_token)
ExWaca.APIs.Messages.send_text(
sender_id: sender_id,
recipient_number: recipient_number,
message: "Hello from ExWaca",
client: client
)
mix docs
Host the docs:
npx serve doc
source .env.sample
mix test --cover
Host the coverage:
npx serve cover