clean

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Client Requester
}

Api provides "clean" API.

func (*Api) Address

func (a *Api) Address(ctx context.Context, addresses ...string) (result []*model.Address, err error)

Address clean all provided addresses Call https://dadata.ru/api/v2/clean/address

func (*Api) Birthday

func (a *Api) Birthday(ctx context.Context, birthdates ...string) (result []*model.Birthday, err error)

Birthday clean all provided birthdates Call https://dadata.ru/api/v2/clean/birthdate

func (*Api) Email

func (a *Api) Email(ctx context.Context, emails ...string) (result []*model.Email, err error)

Email clean all provided emails Call https://dadata.ru/api/v2/clean/email

func (*Api) Name

func (a *Api) Name(ctx context.Context, names ...string) (result []*model.Name, err error)

Name clean all provided names Call https://dadata.ru/api/v2/clean/name

func (*Api) Passport

func (a *Api) Passport(ctx context.Context, passports ...string) (result []*model.Passport, err error)

Passport clean all provided passports Call https://dadata.ru/api/v2/clean/passport

func (*Api) Phone

func (a *Api) Phone(ctx context.Context, phones ...string) (result []*model.Phone, err error)

Phone clean all provided phones Call https://dadata.ru/api/v2/clean/phone

func (*Api) Vehicle

func (a *Api) Vehicle(ctx context.Context, vehicles ...string) (result []*model.Vehicle, err error)

Vehicle clean all provided vehicles Call https://dadata.ru/api/v2/clean/vehicle

type Requester

type Requester interface {
	// Post makes a POST API call. Assumes sending json-encoded params in a request body.
	Post(ctx context.Context, apiMethod string, params, result interface{}) error
}

Requester provides transport level API calls.

Jump to

Keyboard shortcuts

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