getlead.go 559 B

1234567891011121314151617181920212223242526272829
  1. package main
  2. import "surdeus.su/core/cli/mtool"
  3. import "surdeus.su/core/amo"
  4. import "surdeus.su/core/ss/urlenc"
  5. type LeadGetter struct {}
  6. func (l LeadGetter) GetValues(
  7. c *amo.Client,
  8. opts ...urlenc.Builder,
  9. ) ([]amo.Lead, amo.NextFunc[[]amo.Lead], error) {
  10. return c.GetLeads(opts...)
  11. }
  12. func (l LeadGetter) GetNameMul() string {
  13. return "leads"
  14. }
  15. func (l LeadGetter) GetFuncName() string {
  16. return "amo.GetLeads"
  17. }
  18. var getLead = mtool.T("get-leads").Func(func(
  19. flags *mtool.Flags,
  20. ){
  21. RunGetter(LeadGetter{}, flags)
  22. }).Usage(
  23. "[id1 id2 ... idN]",
  24. )