Package com.echonest.api.v4

Examples of com.echonest.api.v4.Location


public class SearchSongsExample {

    private EchoNestAPI en;

    public SearchSongsExample() throws EchoNestException {
        en = new EchoNestAPI();
        en.setTraceSends(true);
        en.setTraceRecvs(false);
    }
View Full Code Here


import java.util.List;

public class SimlarArtists {

    public static void main(String[] args) throws EchoNestException {
        EchoNestAPI echoNest = new EchoNestAPI();
        echoNest.setTraceSends(true);
        List<Artist> artists = echoNest.searchArtists("Weezer");

        if (artists.size() > 0) {
            Artist weezer = artists.get(0);
            System.out.println("Similar artists for " + weezer.getName());
            for (Artist simArtist : weezer.getSimilar(10)) {
View Full Code Here

* @author plamere
*/
public class OldestTopArtist {

    public static void main(String[] args) throws EchoNestException {
        EchoNestAPI en = new EchoNestAPI();

        List<Artist> artists = en.topHotArtists(100);

        Collections.sort(artists,
                new Comparator<Artist>() {
                    @Override
                    public int compare(Artist t1, Artist t2) {
View Full Code Here

* @author plamere
*/
public class TopHotttestSongs {

    public static void main(String[] args) throws EchoNestException {
        EchoNestAPI en = new EchoNestAPI();

        SongParams p = new SongParams();
        p.setResults(100);
        p.sortBy("song_hotttnesss", false);
        List<Song> songs = en.searchSongs(p);


        String lastTitle = "";
        for (Song song : songs) {
            if (!lastTitle.toLowerCase().equals(song.getTitle().toLowerCase())) {
View Full Code Here

* @author plamere
*/
public class RosettaPlaylistExample {
   
    public static void main(String[] args) throws EchoNestException {
        EchoNestAPI en = new EchoNestAPI();
        PlaylistParams params = new PlaylistParams();
        params.addIDSpace("spotify-WW");
        params.setType(PlaylistParams.PlaylistType.GENRE_RADIO);
        params.addGenre("dance pop");
        params.includeTracks();
        params.setLimit(true);
       
        Playlist playlist = en.createStaticPlaylist(params);

        for (Song song : playlist.getSongs()) {
            Track track = song.getTrack("spotify-WW");
            System.out.println(track.getForeignID() + " " + song.getTitle() + " by " + song.getArtistName());
        }
View Full Code Here

* @author plamere
*/
public class BasicPlaylistExample {

    public static void main(String[] args) throws EchoNestException {
        EchoNestAPI en = new EchoNestAPI();

        BasicPlaylistParams params = new BasicPlaylistParams();
        params.addArtist("Weezer");
        params.setType(BasicPlaylistParams.PlaylistType.ARTIST_RADIO);
        params.setResults(10);
        Playlist playlist = en.createBasicPlaylist(params);

        for (Song song : playlist.getSongs()) {
            System.out.println(song.toString());
        }
    }
View Full Code Here

    private Set<Artist> done = new HashSet<Artist>();
    private List<Artist> todo = new ArrayList<Artist>();
    private Track currentTrack;

    public EchonestDevShell() throws EchoNestException {
        en = new EchoNestAPI();
        shell = new Shell();
        shell.setPrompt("nest% ");
        addEchoNestCommands();
    }
View Full Code Here

        }

        System.out.println(" =========  images ======== ");
        List<Image> images = artist.getImages();
        for (int i = 0; i < images.size(); i++) {
            Image image = images.get(i);
            image.dump();
        }

        System.out.println(" =========  news ======== ");
        List<News> newsList = artist.getNews();
        for (int i = 0; i < newsList.size(); i++) {
View Full Code Here

        }

        System.out.println(" =========  news ======== ");
        List<News> newsList = artist.getNews();
        for (int i = 0; i < newsList.size(); i++) {
            News news = newsList.get(i);
            news.dump();
        }

        System.out.println(" =========  reviews ======== ");
        List<Review> reviews = artist.getReviews();
        for (int i = 0; i < reviews.size(); i++) {
View Full Code Here

        }
    }

    public void searchArtistByName(String name, int results)
            throws EchoNestException {
        Params p = new Params();
        p.add("name", name);
        p.add("results", results);

        List<Artist> artists = en.searchArtists(p);
        for (Artist artist : artists) {
            dumpArtist(artist);
            System.out.println();
View Full Code Here

TOP

Related Classes of com.echonest.api.v4.Location

Copyright © 2018 www.massapicom. 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.