address

package
v3.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressService

type AddressService struct {
	// contains filtered or unexported fields
}

func NewAddressService

func NewAddressService(token string) *AddressService

func (*AddressService) LookupPostcode

func (t *AddressService) LookupPostcode(request *LookupPostcodeRequest) (*LookupPostcodeResponse, error)

Lookup a list of UK addresses by postcode

type LookupPostcodeRequest

type LookupPostcodeRequest struct {
	// UK postcode e.g SW1A 2AA
	Postcode string `json:"postcode"`
}

type LookupPostcodeResponse

type LookupPostcodeResponse struct {
	Addresses []Record `json:"addresses"`
}

type Record

type Record struct {
	// building name
	BuildingName string `json:"buildingName"`
	// the county
	County string `json:"county"`
	// line one of address
	LineOne string `json:"lineOne"`
	// line two of address
	LineTwo string `json:"lineTwo"`
	// dependent locality
	Locality string `json:"locality"`
	// organisation if present
	Organisation string `json:"organisation"`
	// the postcode
	Postcode string `json:"postcode"`
	// the premise
	Premise string `json:"premise"`
	// street name
	Street string `json:"street"`
	// the complete address
	Summary string `json:"summary"`
	// post town
	Town string `json:"town"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL