private void ProcSearchNaverApi(string movieName) { string clientID = "QaMNyOF2DDPCUiXXrFPb"; string clientSecret = "BZB8i_mI35"; string openApiUrl = $"https://openapi.naver.com/v1/search/movie?start=1&display=30&query={movieName}"; string resJson = Commons.GetOpenAPIResult(openApiUrl, clientID, clientSecret); var parsedJson = JObject.Parse(resJson); int total = Convert.ToInt32(parsedJson["total"]); int display = Convert.ToInt32(parsedJson["display"]); StsResult.Content = $"{total} 중 {display} 호출 성공"; var items = parsedJson["items"]; var json_array = (JArray)items; List <MovieItem> movieItems = new List <MovieItem>(); foreach (var item in json_array) { MovieItem movie = new MovieItem( Commons.StripHTMLTag(item["title"].ToString()), item["link"].ToString(), item["image"].ToString(), item["subtitle"].ToString(), item["pubDate"].ToString(), Commons.StripPipe(item["director"].ToString()), Commons.StripPipe(item["actor"].ToString()), item["userRating"].ToString()); movieItems.Add(movie); } this.DataContext = movieItems; }