elixir-bandwidth
An Elixir client library for the Bandwidth Application Platform
Install
Add as a dependency:
defp deps() do
[{:bandwidth, "~> 1.0.0"}]
endFetch and compile:
mix do deps.get, deps.compileOr install as archive:
git clone https://github.com/wtcross/elixir-bandwidth.git
cd elixir-bandwidth
mix installUsage
use Bandwidth
# Create a client
client = Client.new("user-id", "api-token", "api-secret")
# Find a message
case Messages.find(client, "m-slkdfjskldjfklsjfdlk") do
{:ok, {200, message, headers}} -> IO.inspect message
{:ok, {404, _, _}} -> IO.puts "not found :("
{:error, reason} -> IO.inspect reason
end