getcom.go 654 B

12345678910111213141516171819202122232425262728293031323334
  1. package main
  2. import "surdeus.su/core/amo"
  3. import "surdeus.su/core/ss/urlenc"
  4. import "surdeus.su/core/cli/mtool"
  5. //import "encoding/json"
  6. //import "strconv"
  7. //import "log"
  8. //import "fmt"
  9. //import "os"
  10. type CompanyGetter struct{}
  11. func (l CompanyGetter) GetValues(
  12. c *amo.Client,
  13. opts ...urlenc.Builder,
  14. ) ([]amo.Company, amo.NextFunc[[]amo.Company], error) {
  15. return c.GetCompanies(opts...)
  16. }
  17. func (l CompanyGetter) GetNameMul() string {
  18. return "companies"
  19. }
  20. func (l CompanyGetter) GetFuncName() string {
  21. return "amo.GetCompanies"
  22. }
  23. var getComs = mtool.T("get-companies").Func(func(
  24. flags *mtool.Flags,
  25. ){
  26. RunGetter(CompanyGetter{}, flags)
  27. })