An Ember Addon for The Echonest API using Ember and Ember CLI. The project is currently limited to providing an interface to fetch artists and songs, including basic playlisting.
##Configuration ###Calling Echonest directly Recommended for prototyping only as it exposes API key.
//config/environment.js
ENV.echonest = {
api_key: 'MY_API_KEY'
}
###Calling via a proxy
//config/environment.js
ENV.echonest = {
host: 'http://my.echonest.proxy.com',
namespace: 'api/v4'
}
Ember Echonest Adapter provides the following models:
- echonest-artist
- echonest-song
Model names are namespaced with 'echonest-' to avoid conflicts with other potential models in your application.
Ember Data convenience for Echonest Artists. For more information visit The Echonest Artist API docs
This is returns an artist profile with the buckets specified on the adapter.
this.store.find('echonest-artist', 'ARH6W4X1187B99274F')
.then(function (record) {
record.get('name'); // Radiohead
});
This returns a list of artist profiles with the buckets specified on the adapter.
this.store.find('echonest-artist', {
name: 'Radiohead'
}).then(function (records) {
records.get('content.0.name'); // Radiohead
});
Similar artists are available via an async relationship on an echonest-artist record. This calls the similar artsist API method with the echonest-artist id.
echonestArtistRecord.get('similar')
.then(function (records) {
records; // similar artists records
});
this.store.find('echonest-song', 'ARH6W4X1187B99274F')
.then(function (record) {
record.get('artist_name'); // 'Radiohead'
record.get('title'); // 'Stay fly'
});
});
this.store.find('echonest-song', {
playlist: 'basic',
artist_id: 'ARH6W4X1187B99274F'
}).then(function (records) {
records; // playlist of songs
});
- Add echonest-genre model
- Add echonest-track model
- Allow easy configuration of buckets
- Allow configuration of similar artists API params
- Standard playlisting
- Premium playlisting
- Taste profiles
- Demo app
ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.