Package com.echonest.api.v4.examples

Source Code of com.echonest.api.v4.examples.StaticPlaylistExample

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.echonest.api.v4.examples;

import com.echonest.api.v4.EchoNestAPI;
import com.echonest.api.v4.EchoNestException;
import com.echonest.api.v4.Playlist;
import com.echonest.api.v4.PlaylistParams;
import com.echonest.api.v4.Song;

/**
*
* @author plamere
*/
public class StaticPlaylistExample {
    public static void main(String[] args) throws EchoNestException {
        EchoNestAPI en = new EchoNestAPI();

        // play fast songs by metal bands

        PlaylistParams params = new PlaylistParams();
        params.setType(PlaylistParams.PlaylistType.GENRE_RADIO);
        params.addGenre("metal");
        params.setMinTempo(150);
        params.setResults(10);
        params.includeAudioSummary();
        Playlist playlist = en.createStaticPlaylist(params);

        for (Song song : playlist.getSongs()) {
            System.out.println(song.toString());
        }
    }
}
TOP

Related Classes of com.echonest.api.v4.examples.StaticPlaylistExample

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.