Skip to content

📦 This repository offers a Go client developed by BloomCredit for seamless integration with the YAddress Web API. Through this client, users can effortlessly make calls for postal address correction, validation, standardization, and geocoding.

License

bloomcredit/yaddress-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAddress Web API Go Client

Makes calls into YAddress Web API for postal address correction, validation, standardization and geocoding.

Find more about YAddress Web API at http://www.yaddress.net/WebApi

Usage

Yaddress

func main() {
    logger := yaddress.DefaultLogger()
    yd := yaddress.NewClient("123", yaddress.WithLogger(logger))
	
    
    request := yaddress.Request{AddressLine1: "506 Fourth Avenue Unit 1", AddressLine2: "Asbury Prk, NJ"}

    resp, err := yd.ProcessAddress(request)
}

You are able to provide:logger, httpClient

Each one is called with following syntax:

With logger

    logger := yaddress.DefaultLogger()
    yd, err := yaddress.NewClient("123", yaddress.WithLogger(logger))

With client

	client := &http.Client{Timeout: time.Second * 10}
	
	yd, err := yaddress.NewClient("", yaddress.WithClient(client))

With both

	logger := yaddress.DefaultLogger()
	client := &http.Client{Timeout: time.Second * 10}
	
	yd, err := yaddress.NewClient("", yaddress.WithLogger(logger), yaddress.WithClient(client))

Warning Gives you first 1,000 transactions for free. You can find later pricing plans here

Tests

Tests are written using table driven technique

You can run tests:

go test -v -cover

About

📦 This repository offers a Go client developed by BloomCredit for seamless integration with the YAddress Web API. Through this client, users can effortlessly make calls for postal address correction, validation, standardization, and geocoding.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages