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

Method Stats

api/crawler/client.go:273–283  ·  view source on GitHub ↗

Stats gets the stats of a Crawler.

(crawlerID string)

Source from the content-addressed store, hash-verified

271
272// Stats gets the stats of a Crawler.
273func (c *Client) Stats(crawlerID string) (*StatsResponse, error) {
274 var res StatsResponse
275 path := fmt.Sprintf("crawlers/%s/stats/urls", crawlerID)
276
277 err := c.request(&res, http.MethodGet, path, nil, nil)
278 if err != nil {
279 return nil, err
280 }
281
282 return &res, nil
283}
284
285// CrawlURLs crawls the specified URLs on the specified Crawler.
286// It returns the Task ID if successful.

Callers 1

runStatsCmdFunction · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected