getcontact.go 563 B

1234567891011121314151617181920212223242526
  1. package main
  2. import "surdeus.su/core/amo"
  3. import "surdeus.su/core/ss/urlenc"
  4. import "surdeus.su/core/cli/mtool"
  5. type ContactGetter struct{}
  6. func (l ContactGetter) GetValues(
  7. c *amo.Client,
  8. opts ...urlenc.Builder,
  9. ) ([]amo.Contact, amo.NextFunc[[]amo.Contact], error) {
  10. return c.GetContacts(opts...)
  11. }
  12. func (l ContactGetter) GetNameMul() string {
  13. return "companies"
  14. }
  15. func (l ContactGetter) GetFuncName() string {
  16. return "amo.GetCompanies"
  17. }
  18. var getContacts = mtool.T("get-contacts").
  19. Func(func(flags *mtool.Flags){
  20. RunGetter(ContactGetter{}, flags)
  21. })