private StatusCode modifyMovieList ( String sessionId , String listId , int movieId , MethodSub operation ) throws MovieDbException { TmdbParameters parameters = new TmdbParameters ( ) ; parameters . add ( Param . SESSION_ID , sessionId ) ; parameters . add ( Param . ID , listId ) ; String jsonBody = new PostTools ( ) . add ( PostBody . MEDIA_ID , movieId ) . build ( ) ; URL url = new ApiUrl ( apiKey , MethodBase . LIST ) . subMethod ( operation ) . buildUrl ( parameters ) ; String webpage = httpTools . postRequest ( url , jsonBody ) ; try { return MAPPER . readValue ( webpage , StatusCode . class ) ; } catch ( IOException ex ) { throw new MovieDbException ( ApiExceptionType . MAPPING_FAILED , "Failed to remove item from list" , url , ex ) ; } }
Modify a list