aklapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrRequest

type AddrRequest struct {
	ResultCount     int    `json:"ResultCount"`
	SearchText      string `json:"SearchText"`
	RateKeyRequired bool   `json:"RateKeyRequired"`
}

AddrRequest is the address request.

type AddrResponse

type AddrResponse []Address

AddrResponse is the address response.

func AddressLookup

func AddressLookup(addr string) (AddrResponse, error)

AddressLookup is a convenience function to get addresses.

func MatchingPropertyAddresses

func MatchingPropertyAddresses(addrReq *AddrRequest) (AddrResponse, error)

MatchingPropertyAddresses wrapper around the AKL Council API.

type Address

type Address struct {
	ACRateAccountKey string `json:"ACRateAccountKey"`
	Address          string `json:"Address"`
	Suggestion       string `json:"Suggestion"`
}

AddrSuggestion is the address suggestion.

func (Address) String

func (s Address) String() string

type CollectionDayDetailResult

type CollectionDayDetailResult struct {
	Collections []RubbishCollection
	Address     *Address
}

CollectionDayDetailResult contains the information about Rubbish and Recycling collection.

func CollectionDayDetail

func CollectionDayDetail(addr string) (*CollectionDayDetailResult, error)

CollectionDayDetail returns a collection day details for the specified address as reported by the Auckland Council Website.

func (*CollectionDayDetailResult) NextRecycle

func (res *CollectionDayDetailResult) NextRecycle() time.Time

NextRecycle returns the next recycle collection date.

func (*CollectionDayDetailResult) NextRubbish

func (res *CollectionDayDetailResult) NextRubbish() time.Time

NextRubbish returns the next rubbish collection date.

type RubbishCollection

type RubbishCollection struct {
	Day     string
	Date    time.Time
	Rubbish bool
	Recycle bool
}

RubbishCollection contains the date and type of collection.

Jump to

Keyboard shortcuts

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