public ActionResult <ScraperModel> Get(int id) { var scrapers = ScraperManager.Instance.GetRegisteredScrapers().ToList(); if (scrapers.Count <= id) { return(BadRequest("Invalid scraper index")); } var target = scrapers[id]; return(ScraperModel.CreateFromScraper(target)); }
public IEnumerable <ScraperModel> Index() => ScraperManager.Instance.GetRegisteredScrapers().Select(s => ScraperModel.CreateFromScraper(s));