amo/amocrm.go

29 lines
399 B
Go
Raw Normal View History

2024-01-15 00:04:00 +03:00
package amo
import (
2024-05-19 21:00:41 +03:00
"surdeus.su/core/amo/api"
2024-01-15 00:04:00 +03:00
)
2024-05-30 11:43:10 +03:00
const (
// Maximum entities for once.
// It is set to be the most effective
// but in fact can be greater.
MaxEnt = 50
)
2024-01-15 03:48:01 +03:00
2024-01-15 00:04:00 +03:00
type Client struct {
2024-05-30 11:43:10 +03:00
API *api.Client
2024-01-15 00:04:00 +03:00
}
2024-05-30 11:43:10 +03:00
func NewClient(secretPath string) (*Client, error) {
apiClient, err := api.NewAPI(secretPath)
2024-01-15 00:04:00 +03:00
if err != nil {
return nil, err
2024-01-15 00:04:00 +03:00
}
return &Client{
2024-05-30 11:43:10 +03:00
API: apiClient,
}, nil
2024-01-15 00:04:00 +03:00
}