From 7d8afae5a52e9e8b28b9e82556e412bfdfe30297 Mon Sep 17 00:00:00 2001 From: surdeus Date: Wed, 5 Jun 2024 22:16:47 +0500 Subject: [PATCH] ... --- lead-tuple.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lead-tuple.go b/lead-tuple.go index a5f4bc9..91d572e 100644 --- a/lead-tuple.go +++ b/lead-tuple.go @@ -19,14 +19,20 @@ func (client *Client) GetLeadTuples( "/api/v4/leads?%s", urlenc.Join(opts...).Encode, ) - return client.GetLeadTuplesByFuncURL( + return client.GetLeadTuplesByURL(res) +} + +func (client *Client) GetLeadTuplesByURL( + u string, +) ([]LeadTuple, NextFunc[[]LeadTuple], error) { + return client.getLeadTuplesByFuncURL( func() ([]Lead, NextFunc[[]Lead], error){ - return client.GetLeadsByURL(res) + return client.GetLeadsByURL(u) }, ) } -func (client *Client) GetLeadTuplesByFuncURL( +func (client *Client) getLeadTuplesByFuncURL( // The function describes way of getting leads. callback func() ( []Lead, @@ -122,7 +128,7 @@ func (client *Client) GetLeadTuplesByFuncURL( if next != nil { fn = NextFunc[[]LeadTuple]( func() ([]LeadTuple, NextFunc[[]LeadTuple], error) { - return client.GetLeadTuplesByFuncURL( + return client.getLeadTuplesByFuncURL( next, ) },