public void ConfigureRottenTomatoesData(IMovieCharacteristics movieCharacteristics) { var resultImdb = (movieCharacteristics.Ratings as List <string>).Find(x => x.Contains("RottenTomatoes")); var newRatings = new List <string>(); newRatings.Add(resultImdb); movieCharacteristics.Ratings = newRatings; }
public IMovieCharacteristics GetData(IMovieCharacteristics movieCharacteristics) { Console.WriteLine("Getting Data from External REST API"); movieCharacteristics.MovieName = "The Dark Knight"; movieCharacteristics.ReleaseDate = "2018"; movieCharacteristics.Genre = new List <string>(); movieCharacteristics.Genre.Add("Drama"); movieCharacteristics.Genre.Add("Thriller"); movieCharacteristics.Ratings = new List <string>(); movieCharacteristics.Ratings.Add("IMDB:9"); movieCharacteristics.Ratings.Add("RottenTomatoes:94%"); movieCharacteristics.Ratings.Add("MetaCritic:84%"); Console.WriteLine("You have been charged 1$ for last API call."); return(movieCharacteristics); }
public void SendDataToRottenTomatoes(IMovieCharacteristics movieCharacteristics) { Console.WriteLine("Sending to RottenTomatoes data: " + movieCharacteristics); }
public void ConfigureGeneralGenre(IMovieCharacteristics movieCharacteristics) { movieCharacteristics.Genre.Add("SuperHero"); }
public void SendDataToImdb(IMovieCharacteristics movieCharacteristics) { Console.WriteLine("Sending to IMDB data: " + movieCharacteristics); }