Пример #1
0
        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));
        }
Пример #2
0
 public IEnumerable <ScraperModel> Index() => ScraperManager.Instance.GetRegisteredScrapers().Select(s => ScraperModel.CreateFromScraper(s));