Lob.com API client in Go.
Install with
go get github.com/seedco/go-lob
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.
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 .
Licensed under the MIT license. See LICENSE for more details.