# Websms
[](https://raw.githubusercontent.com/jshmrtn/websms/master/LICENSE)

[](https://hex.pm/packages/websms)
[](https://coveralls.io/github/jshmrtn/websms?branch=master)
websms.ch client
## Installation
The package can be installed by adding `websms` to your list of dependencies
in `mix.exs`:
```elixir
def deps do
[
{:websms, "~> 0.1.0"}
]
end
```
## Usage
### Send Text Message
```elixir
{:ok,
{200, %{smsCount: 0, statusCode: 2000, statusMessage: "OK", transferId: _}, _client}} =
Websms.post_smsmessaging_text(%{
body: %{
messageContent: "Test",
test: true,
recipientAddressList: ["+41787245790"]
},
headers: %{"authorization" => "Bearer #{@auth_token}"}
})
```
### Send Binary Message
```elixir
{:ok,
{200, %{smsCount: 0, statusCode: 2000, statusMessage: "OK", transferId: _}, _client}} =
Websms.post_smsmessaging_binary(%{
body: %{
messageContent: [Base.encode64("Test")],
test: true,
recipientAddressList: ["+41787245790"]
},
headers: %{"authorization" => "Bearer #{@auth_token}"}
})
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). The docs can be found at
[https://hexdocs.pm/websms](https://hexdocs.pm/websms).