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

Method Run

api/crawler/client.go:232–242  ·  view source on GitHub ↗

Run runs a Crawler. It returns the Task ID if successful.

(crawlerID string)

Source from the content-addressed store, hash-verified

230// Run runs a Crawler.
231// It returns the Task ID if successful.
232func (c *Client) Run(crawlerID string) (string, error) {
233 var res TaskIDResponse
234 path := fmt.Sprintf("crawlers/%s/run", crawlerID)
235
236 err := c.request(&res, http.MethodPost, path, nil, nil)
237 if err != nil {
238 return "", err
239 }
240
241 return res.TaskID, nil
242}
243
244// Pause pauses a Crawler.
245// It returns the Task ID if successful.

Callers

nothing calls this directly

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected