* @param endDate the end date of the changes, optional
* @return
* @throws MovieDbException
*/
public TmdbResultsMap<String, List<ChangedItem>> getMovieChanges(int movieId, String startDate, String endDate) throws MovieDbException {
ApiUrl apiUrl = new ApiUrl(apiKey, BASE_MOVIE, "/changes");
apiUrl.addArgument(PARAM_ID, movieId);
if (StringUtils.isNotBlank(startDate)) {
apiUrl.addArgument(PARAM_START_DATE, startDate);
}
if (StringUtils.isNotBlank(endDate)) {
apiUrl.addArgument(PARAM_END_DATE, endDate);
}
URL url = apiUrl.buildUrl();
String webpage = requestWebPage(url);
try {
WrapperChanges wrapper = mapper.readValue(webpage, WrapperChanges.class);
Map<String, List<ChangedItem>> results = new HashMap<String, List<ChangedItem>>();