diff --git a/cmd/amocli/getleadtup.go b/cmd/amocli/getleadtup.go new file mode 100644 index 0000000..38643fd --- /dev/null +++ b/cmd/amocli/getleadtup.go @@ -0,0 +1,33 @@ +package main + +import "surdeus.su/core/cli/mtool" +import "surdeus.su/core/amo" +import "surdeus.su/core/ss/urlenc" + +type LeadTupleGetter struct{} +func (l LeadTupleGetter) GetValues( + c *amo.Client, + opts ...urlenc.Builder, +) ( + []amo.LeadTuple, + amo.NextFunc[[]amo.LeadTuple], + error, +) { + return c.GetLeadTuples(opts...) +} + +func (l LeadTupleGetter) GetNameMul() string { + return "lead tuples" +} + +func (l LeadTupleGetter) GetFuncName() string { + return "amo.GetLeadTuples" +} + +var getLeadTuple = mtool.T("get-lead-tuples").Func(func( + flags *mtool.Flags, +){ + RunGetter(LeadTupleGetter{}, flags) +}).Usage( + "[id1 id2 ... idN]", +) diff --git a/cmd/amocli/main.go b/cmd/amocli/main.go index cfb4f04..83cbd80 100644 --- a/cmd/amocli/main.go +++ b/cmd/amocli/main.go @@ -17,6 +17,8 @@ var tool = mtool.T("amocli").Subs( updateComs, getContacts, + getLeadTuple, + mtool.T("version").Func(func(flags *mtool.Flags){ bi, ok := debug.ReadBuildInfo() if !ok {