bandwidth

[Deprecated] An Elixir client library for the Bandwidth Voice and Messaging APIs

Latest version: 1.2.1 registry icon
Maintenance score
0
Safety score
0
Popularity score
70
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
1.2.1 0 0 0 0 0
1.1.1 0 0 0 0 0
1.1.0 0 0 0 0 0
1.0.0 0 0 0 0 0
0.2.0 0 0 0 0 0

Stability
Latest release:

1.2.1 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



elixir-bandwidth

An Elixir client library for the Bandwidth Application Platform

Hex Version

SDK for Bandwidth HTTP Voice and Messaging

Install

Add as a dependency:

defp deps() do
  [{:bandwidth, "~> 1.2.2"}]
end

Fetch and compile:

mix do deps.get, deps.compile

Or install as archive:

git clone https://github.com/bandwidth/elixir-bandwidth.git
cd elixir-bandwidth
mix install

Usage

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

# Send a message
message = %{from: "+12223334444", to: "+13334445555", text: "hello bandwidth"}
case Messages.create(client, message) do
  {:ok, {201, _, headers}} -> IO.puts "message sent!"
  {:error, reason}         -> IO.inspect reason
end

# Search for a local number
case AvailableNumbers.Local.search(client, zip: 22303) do
  {:ok, {200, numbers, headers}} -> IO.inspect numbers
  {:error, reason}               -> IO.inspect reason
end

Documentation