echonest / jEN

the java client for The Echo Nest API
67 stars 43 forks source link

jEN

jEN is an open source Java library for the Echo Nest API.

Quick Start

What is it?

This is a Java client API and assorted tools and helpers for the Echo Nest API (at developer.echonest.com). This client works with Version 4 of the Echo Nest API.

Artist Methods

Some of the Echo Nest artist capabilities:

Song methods

Some of the Echo Nest track capabilities:

Playlist Methods

Taste Profile Methods

Getting Started

Quick Start

Here's some sample code that shows how to get similar artists with the API:

public static void main(String[] args) throws EchoNestException {
    EchoNestAPI echoNest = new EchoNestAPI(API_KEY);
    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)) {
            System.out.println("   " + simArtist.getName());
        }
    }
}

Code Examples

Browse some of the code examples

Building the jar file

Grab the source, cd to the top leve directory and issue:

% ant jar

Running a test shell

Included with the API is a command line interface to the Echo Nest API. You can use this shell to interact with the Echo Nest. To run the shell invoke the 'enshell' script, or run the command:

java -DECHO_NEST_API_KEY=$MY_ECHO_NEST_KEY -jar jEN.jar

Type 'help' to show the list of available commands. Try some:

% scripts/enshell
  Welcome to The Echo Nest API Shell
  type 'help' 

nest% get_similar weezer

Similarity for Weezer
  Rivers Cuomo
  The Rentals
  Fountains of Wayne
  Jimmy Eat World
  Phantom Planet
  The Presidents of the United States of America
  Cake
  Harvey Danger
  The All-American Rejects
  Ben Folds Five
  Nerf Herder
  Motion City Soundtrack
  New Found Glory
  Superdrag
  Foo Fighters

nest% splaylist Muse

    Muse Time = Is Running Out
    Coldplay = Viva La Vida
    Travis = Sing
    The Killers = Here With Me
    The Subways = I Want To Hear What You Have Got To Say
    Bloc Party = Banquet
    Keane = Is It Any Wonder?
    The Cooper Temple Clause = Talking To A Brick Wall
    Richard Ashcroft = Check The Meaning
    Athlete Wires = (Album Version)

nest% 

Release History