public ResultsMap < String , List < Certification > > getMoviesCertification ( ) throws MovieDbException { URL url = new ApiUrl ( apiKey , MethodBase . CERTIFICATION ) . subMethod ( MethodSub . MOVIE_LIST ) . buildUrl ( ) ; String webpage = httpTools . getRequest ( url ) ; try { JsonNode node = MAPPER . readTree ( webpage ) ; Map < String , List < Certification > > results = MAPPER . readValue ( node . elements ( ) . next ( ) . traverse ( ) , new TypeReference < Map < String , List < Certification > > > ( ) { } ) ; return new ResultsMap <> ( results ) ; } catch ( IOException ex ) { throw new MovieDbException ( ApiExceptionType . MAPPING_FAILED , "Failed to get movie certifications" , url , ex ) ; } }
Get a list of movies certification .