Skip to content

alphaspark/easypost-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EasyPost API v2 client for Go

Currently, this is a minimal implementation of the EasyPost API. It will be expanded as time permits. It's in use in production, but the API is not stable currently.

Getting Started

More defined models should be added later. Maps are used for now for simplicity.

c = easypost.NewClient(secretKey)

fromAddressId := "adr_..."
toAddress := map[string]interface{}{
	// Match documented API fields
}
parcel := map[string]interface{}{
	// Match documented API fields
}
shipment, err := c.NewShipment(fromAddressId, toAddress, parcel)

customsInfo := map[string]interface{}{
	// Match documented API fields
}
internationalShipment, isErr := c.NewShipmentWithCustoms(fromAddressId, toAddress, parcel, customsInfo)

selectedRate := "rate_..."
updatedShipment, rErr :=c.BuyShipmentRate(shipment, selectedRate)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages