Skip to content

seven-io/go-client

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Official API Client for Go

Installation

Requires Go 1.13+.

go get github.com/seven-io/go-client/sms77api

Usage

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())
	}
}

Tests

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.

Support

Need help? Feel free to contact us.

MIT