Nexmo REST API client for Go.
Hugely inspired by: https://github.com/kevinburke/twilio-go
As it's a WIP it only supports SMS and TTS Call sending by now.
Assuming you have your $GOPATH set:
$> go get github.com/lopezator/nexmo-go
$> cd $GOPATH/src/lopezator/nexmo-go
$> make install
nexmo-go is pretty straightforward to use, anyway, you can find some examples ready to run in the examples/ folder in addition to usage info below.
const apiKey = "my-api-key"
const apiSecret = "my-api-secret"
// Create a client
client := nexmo.NewClient(apiKey, apiSecret, nil)
// Send a message
// Nexmo allows to use your either a random text as `from` value or your nexmo phone with country code but without "+" or "00" prefix
msg, err := client.Messages.SendMessage("ME", "34666666666", "Message sent via nexmo-go")
const apiKey = "my-api-key"
const apiSecret = "my-api-secret"
// Create a client
client := nexmo.NewClient(apiKey, apiSecret, nil)
// Make a TTS call
msg, err := client.Calls.MakeTTSCall("15111111111", "34666666666", "TTS call sent via nexmo-go", "5")