private static Movie GetMovie(string movieName) { CsfdApi api = new CsfdApi(); Movie movie = api.SearchMovie(movieName); return(movie); }
private static HashSet <string> GetMovieNamesBySearchCriteria(Country country, Genre zaner, YearRange yearRange) { CsfdApi api = new CsfdApi(); HashSet <string> movieList = new HashSet <string>(); string originCountry = ((int)country).ToString(); string genre = ((int)zaner).ToString(); string searchUrl = $"https://www.csfd.cz/zebricky/specificky-vyber/?type=0&origin={originCountry}&genre={genre}&year_from={yearRange.YearFrom}&year_to={yearRange.YearTo}&actor=&director=&ok=Zobrazit&_form_=charts&show=complete"; api.GetSearch(movieList, searchUrl); //todo: uloz zoznam filmov ziskanych z danej url var movieInfo = searchUrl + " --> " + String.Join(";", movieList); using (StreamWriter file = new StreamWriter(@"C:\Users\Public\MovieInfo.txt", true)) { file.WriteLine(movieInfo); } return(movieList); }