URL url = apiUrl.buildUrl();
String webpage = requestWebPage(url);
try {
WrapperMovie wrapper = mapper.readValue(webpage, WrapperMovie.class);
TmdbResultsList<MovieDb> results = new TmdbResultsList<MovieDb>(wrapper.getMovies());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
LOG.warn("Failed to get now playing movies: {}", ex.getMessage(), ex);
throw new MovieDbException(MovieDbExceptionType.MAPPING_FAILED, webpage, url, ex);