//public static async Task<MyMovieList> GetDataFromAPI(string souceCompany)
        public static async Task <List <MyMovieData> > GetDataFromAPI(string souceCompany)
        {
            string apiURL = GetUrlString(souceCompany, false);

            MyMovieList movieWorldData = await GetRequest(apiURL, souceCompany);

            MyMovieData        moviveDetailData = new MyMovieData();
            MyMovieData        detailData       = new MyMovieData();
            List <MyMovieData> movieFinalList   = new List <MyMovieData>();

            if (movieWorldData != null)
            {
                List <MyMovieData> movieList = movieWorldData.Movies;

                Parallel.ForEach(movieList, (item, loopState) =>

                {
                    moviveDetailData = item;

                    //Console.WriteLine("after to get movie detail");
                    detailData = Program.getDetailDataFromAPI(item, souceCompany).GetAwaiter().GetResult();
                    movieFinalList.Add(detailData);
                });
            }


            return(movieFinalList);
        }
        static async Task <MyMovieList> GetRequest(string url, string dataSource)
        {
            int numberOfRetry = 0;
            HttpResponseMessage responseData = new HttpResponseMessage();

            try
            {
                using (HttpClient client = new HttpClient())
                {
                    do
                    {
                        using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url))
                        {
                            requestMessage.Headers.Add("x-access-token", "sjd1HfkjU83ksdsm3802k");
                            requestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                            var response = await client.SendAsync(requestMessage);

                            numberOfRetry++;

                            if (responseData.IsSuccessStatusCode)
                            {
                                using (HttpContent content = response.Content)
                                {
                                    MyMovieList myMovieData = new MyMovieList();
                                    myMovieData = await content.ReadAsAsync <MyMovieList>();

                                    //myMovieData.DataSource = dataSource;
                                    //Console.WriteLine(myMovieData.Movies.Count);

                                    return(myMovieData);
                                }
                            }
                        }
                    } while (responseData.IsSuccessStatusCode == false & numberOfRetry < 5);
                }
                return(null);
            }


            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }