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