Golang client for DaData.ru
Go to file
2021-09-07 15:05:55 +03:00
api add missing fields 2021-09-07 15:43:09 +05:00
client Fix tests. 2019-04-09 17:13:34 +03:00
.gitignore Forked and cleaned. 2019-04-08 14:49:07 +03:00
.travis.yml Party by ID suggestion. 2020-12-14 19:00:36 +03:00
dadata_test.go Party by ID suggestion. 2020-12-14 19:00:36 +03:00
dadata.go V2. 2019-04-09 17:08:32 +03:00
go.mod Party by ID suggestion. 2020-12-14 19:00:36 +03:00
go.sum V2. 2019-04-09 17:08:32 +03:00
LICENSE Initial commit 2019-04-08 11:54:10 +03:00
README.md Fix installation instructions 2021-09-07 14:17:59 +05:00

Client for DaData.ru

Forked from https://github.com/webdeskltd/dadata.

Build Status GitHub release Go Report Card GoDoc

DaData API v2

Implemented Clean and Suggest methods.

Installation

go get github.com/ekomobile/dadata/v2

Usage

import (
	"context"
	"fmt"

	"github.com/ekomobile/dadata/v2"
	"github.com/ekomobile/dadata/v2/api/suggest"
)

func DaDataExample()  {
	api := dadata.NewSuggestApi()

	params := suggest.RequestParams{
		Query: "ул Свободы",
	}

	suggestions, err := api.Address(context.Background(), &params)
	if err != nil {
		return
	}

	for _, s := range suggestions {
		fmt.Printf("%s", s.Value)
	}
}

Licence

MIT see LICENSE