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, ) },