public async Task <MovieSuggestions> GetMovieSuggestions(int id) { HttpResponseMessage response = await client.GetAsync("https://yts.am/api/v2/movie_suggestions.json?movie_id=" + id); if (response.IsSuccessStatusCode) { movieSuggestions = await response.Content.ReadAsAsync <MovieSuggestions>(); // response.TryGetContentValue<MovieDetail>(out name); } return(movieSuggestions); }
// GET api/<controller> public async Task <String> Get() { _movieSuggestions = await _movieSuggestions_Services.GetMovieSuggestions(15); return(_movieSuggestions.ToString()); }