![]() I will be using this method for doing the actor search (by their names) through this API. HTTP GET Index Action Method: It has 2 parameters – string peopleName, int? page. ![]() Let me explain you the above code of the Controller. ![]() TheMovieDb.also_known_as = string.Join(", ", rootObject.also_known_as) TheMovieDb.profile_path = rootObject.profile_path = null ? Url.Content("~/Content/Image/no-image.png") : "" + rootObject.profile_path TheMovieDb.birthday = rootObject.birthday TheMovieDb.biography = rootObject.biography TheMovieDb theMovieDb = new TheMovieDb() ResponsePerson rootObject = JsonConvert.DeserializeObject(apiResponse) StreamReader reader = new StreamReader(response.GetResponseStream()) Using (HttpWebResponse response = apiRequest.GetResponse() as HttpWebResponse) HttpWebRequest apiRequest = WebRequest.Create("" + id + "?api_key=" + apiKey + "&language=en-US") as HttpWebRequest PagingInfo.TotalItems = rootObject.total_results ![]() PagingInfo pagingInfo = new PagingInfo() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |