Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhamelink authored Dec 14, 2017
1 parent f3cb90e commit 4adfa15
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

SmsBlitz is a library for elixir that allows you to send SMS messages through multiple different providers.

SmsBlitz provides a generic behaviour to make it easy to write conforming client libraries, while also making it simple for developers to choose which provider to use (you could use [elibphonenumber](https://github.com/johnhamelink/elibphonenumber) to detect the destination country and use the cheapest provider for that country, for example).
SmsBlitz provides a generic behaviour to make it easy to write conforming client libraries, while also making it simple for developers to choose which provider to use (you could use [ex_phone_number](https://github.com/socialpaymentsbv/ex_phone_number) to detect the destination country and use the cheapest provider for that country, for example).

## Installation

Expand All @@ -29,22 +29,23 @@ Setting up with SmsBlitz is easy. You simply add the authentication details for
config :sms_blitz, plivo: {"api_token", "api_key"}
config :sms_blitz, itagg: {"username", "password", "route"}
config :sms_blitz, twilio: {"account_sid"}
config :sms_blitz, nexmo: {"account_key", "account_secret"}
```

Then you can send the SMS to the provider as simply as this:
You can find out which adapters are available like so (note that the list of adapters is not the same as the list of adapters which has been configured correctly!):

```elixir
SmsBlitz.send_sms(:itagg, from: "Johnny", to: "07123456789", message: "Here's Johnny!")

# Or...

SmsBlitz.send_sms(:plivo, from: "Johnny", to: "07123456789", message: "Here's Johnny!")
SmsBlitz.adapters
# [:plivo, :itagg, :twilio, :nexmo]
```

# Or...
Then you can send the SMS to the provider as simply as this:

SmsBlitz.send_sms(:twilio, from: "Johnny", to: "07123456789", message: "Here's Johnny!")
```elixir
SmsBlitz.send_sms(:adapter, from: "Johnny", to: "07123456789", message: "Here's Johnny!")
```

Where `:adapter` is the adapter you've chosen from the list.


The output of the `send_sms/2` command above will either be like:
Expand Down

0 comments on commit 4adfa15

Please sign in to comment.