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