public StatusCode removeFromWatchList(String sessionId, int accountId, Integer movieId) throws MovieDbException {
return modifyWatchList(sessionId, accountId, movieId, false);
}
private StatusCode modifyWatchList(String sessionId, int accountId, Integer movieId, boolean add) throws MovieDbException {
ApiUrl apiUrl = new ApiUrl(apiKey, BASE_ACCOUNT, accountId + "/movie_watchlist");
apiUrl.addArgument(PARAM_SESSION, sessionId);
Map<String, Object> body = new HashMap<String, Object>();
body.put(MOVIE_ID, movieId);
body.put("movie_watchlist", add);
String jsonBody = convertToJson(body);
URL url = apiUrl.buildUrl();
String webpage = requestWebPage(url, jsonBody);
try {
return mapper.readValue(webpage, StatusCode.class);
} catch (IOException ex) {