amocrm.go 557 B

12345678910111213141516171819202122232425262728293031323334
  1. package amo
  2. import (
  3. "surdeus.su/core/amo/api"
  4. "surdeus.su/core/amo/leads"
  5. "surdeus.su/core/amo/companies"
  6. "surdeus.su/core/amo/contacts"
  7. "surdeus.su/core/amo/events"
  8. )
  9. type Lead = leads.Lead
  10. type Company = companies.Company
  11. type Contact = contacts.Contact
  12. type Event = events.Event
  13. const (
  14. MEPR = api.MaxEntitiesPerRequest
  15. )
  16. type Client struct {
  17. API *api.Client
  18. }
  19. func NewClient(secretPath string) (*Client, error) {
  20. apiClient, err := api.NewAPI(secretPath)
  21. if err != nil {
  22. return nil, err
  23. }
  24. return &Client{
  25. API: apiClient,
  26. }, nil
  27. }