An experimental Elixir client library for Nexmo
MIT License
This is a work in progress Elixir client library for Nexmo. Functionality will be added for each Nexmo API service. Currently, this library supports the Account, Applications, Number Insight and SMS Nexmo APIs.
The Hex package can be installed by adding nexmo
to your list of dependencies in mix.exs
:
def deps do
[
{:nexmo, "~> 0.4.0", hex: :nexmo_elixir}
]
end
The client library requires environment variables to be supplied in order to enable its functionality. You can find a sample .env file in the root directory of the project. You need to supply your API credentials and the host names for the API endpoints in the .env
file.
Your Nexmo API credentials:
NEXMO_API_KEY
NEXMO_API_SECRET
API host names:
ACCOUNT_API_ENDPOINT="https://rest.nexmo.com/account"
NUMBER_INSIGHT_API_ENDPOINT="https://api.nexmo.com/ni"
SECRETS_API_ENDPOINT="https://api.nexmo.com/accounts"
SMS_API_ENDPOINT="https://rest.nexmo.com/sms/json"
The tests for Nexmo Elixir can be found in /test/
. Each API service has its own testing suite and can be found in /test/#{name_of_service}
, for example the SMS tests can be found in /test/sms
. To run the testing suite execute mix test
from the command line.
This project is built utilizing the wisdom and experience of earlier Nexmo Elixir projects, including from KindyNowApp, cbetta and adamrobbie. Thank you all for your examples of interacting with Nexmo using Elixir!
This project is licensed under the MIT License.