public Lyrics getLyrics ( int trackID ) throws MusixMatchException { Lyrics lyrics = null ; LyricsGetMessage message = null ; Map < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( Constants . API_KEY , apiKey ) ; params . put ( Constants . TRACK_ID , new String ( "" + trackID ) ) ; String response = null ; response = MusixMatchRequest . sendRequest ( Helper . getURLString ( Methods . TRACK_LYRICS_GET , params ) ) ; Gson gson = new Gson ( ) ; try { message = gson . fromJson ( response , LyricsGetMessage . class ) ; } catch ( JsonParseException jpe ) { handleErrorResponse ( response ) ; } lyrics = message . getContainer ( ) . getBody ( ) . getLyrics ( ) ; return lyrics ; }
Get Lyrics for the specific trackID .