// scrape show by ID from TV maze api public Show ScrapeShowById(int id) { Show Show = new Show(); var URL = $"http://api.tvmaze.com/shows/{id}"; ScrapedShow ScrapedShow = HTTPServices.GetHTTPService <ScrapedShow>(URL); if (ScrapedShow != null) { Show = new Show { id = ScrapedShow.id, name = ScrapedShow.name }; // transfer data } List <Cast> CastMembers = ScrapeCastByShowId(id); if (CastMembers != null) { Show.cast = CastMembers; } return(Show); }
/// <summary> /// Sends the scrape result. /// </summary> /// <param name="show">The show that was just read.</param> /// <returns>A Task.</returns> public Task SendScrapeResult(ScrapedShow show) { return(this.Clients.All.SendAsync("ShowFound", show)); }