MCPcopy Create free account
hub / github.com/algolia/cli / ListAll

Method ListAll

api/crawler/client.go:192–212  ·  view source on GitHub ↗

ListAll lists all Crawlers

(name, appID string)

Source from the content-addressed store, hash-verified

190
191// ListAll lists all Crawlers
192func (c *Client) ListAll(name, appID string) ([]*CrawlerListItem, error) {
193 var crawlers []*CrawlerListItem
194
195 while := true
196 page := 0
197 for while {
198 page++
199 res, err := c.List(20, page, name, appID)
200 if err != nil {
201 return nil, err
202 }
203
204 crawlers = append(crawlers, res.Items...)
205
206 if len(crawlers) >= res.Total {
207 while = false
208 }
209 }
210
211 return crawlers, nil
212}
213
214// Get gets a Crawler.
215func (c *Client) Get(crawlerID string, withConfig bool) (*Crawler, error) {

Callers 2

CrawlerIDsFunction · 0.80
runListCmdFunction · 0.80

Calls 1

ListMethod · 0.95

Tested by

no test coverage detected