Official API Client forGo
Requires Go 1.13+.
go get github.com/seven-io/go-client/sms77api
packagemain
import(
"fmt"
"github.com/seven-io/go-client/sms77api"
)
funcmain() {
varclient=sms77api.New(sms77api.Options{
ApiKey:"InsertSuperSecretSms77ApiKey!",
})
varbalance,err=client.Balance.Get()
iferr==nil{
fmt.Println(fmt.Sprintf("%f",*balance))
}else{
fmt.Println(err.Error())
}
}
Some basic tests are implemented. Set environment variableSEVEN_API_KEY
for live API keys. Set environment
variableSEVEN_API_KEY_SANDBOX
for sandbox API keys. The dummy key takes preference if both are set. Run all suites by
runninggo test
.
Need help? Feel free tocontact us.