Skip to content

seedco/go-lob

Repository files navigation

go-lob

Lob.com API client in Go.

Install

Install with

go get github.com/seedco/go-lob

Use

Use by creating a Lob struct with NewLob, and calling the methods it offers.

// fill in your API key and user agent here
l := lob.NewLob(lob.BaseAPI, apiKey, userAgent)

testAddress := &Address{
  Name:           "Lobster Test",
  Email:          "[email protected]",
  Phone:          "5555555555",
  AddressLine1:   "1005 W Burnside St", // Powell's City of Books, the best book store in the world.
  AddressCity:    "Portland",
  AddressState:   "OR",
  AddressZip:     "97209",
  AddressCountry: "US",
}

verify, err := l.VerifyAddress(testAddress)
// ...

You can see the full docs here.

Test

You can run the tests if you set the TEST_LOB_API_KEY environment variable, i.e.,

TEST_LOB_API_KEY=test_yourtestkeyhere go test .

License

Licensed under the MIT license. See LICENSE for more details.

About

Lob.com API client in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages