stat

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: 3 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 statistic API.

func (*Api) Daily

func (a *Api) Daily(ctx context.Context, date time.Time) (result *Stat, err error)

Daily return daily statistics see documentation https://dadata.ru/api/stat/

type Requester

type Requester interface {
	// Get makes a GET API call. Assumes sending params in a request query string.
	Get(ctx context.Context, apiMethod string, params url.Values, result interface{}) error
}

Requester provides transport level API calls.

type Stat

type Stat struct {
	Date     string `json:"date"`
	Services *struct {
		Merging     int `json:"merging"`
		Suggestions int `json:"suggestions"`
		Clean       int `json:"clean"`
	} `json:"services"`
}

Response usage statistics see docs https://dadata.ru/api/stat/

Jump to

Keyboard shortcuts

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