Official API Client for Go
Requires Go 1.13+.
go get github.com/seven-io/go-client/sms77api
package main
import (
"fmt"
"github.com/seven-io/go-client/sms77api"
)
func main() {
var client = sms77api.New(sms77api.Options{
ApiKey: "InsertSuperSecretSms77ApiKey!",
})
var balance, err = client.Balance.Get()
if err == nil {
fmt.Println(fmt.Sprintf("%f", *balance))
} else {
fmt.Println(err.Error())
}
}
Some basic tests are implemented. Set environment variable SEVEN_API_KEY
for live API keys. Set environment
variable SEVEN_API_KEY_SANDBOX
for sandbox API keys. The dummy key takes preference if both are set. Run all suites by
running go test
.
Need help? Feel free to contact us.