Stats gets the stats of a Crawler.
(crawlerID string)
| 271 | |
| 272 | // Stats gets the stats of a Crawler. |
| 273 | func (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. |