0.0.1 • Published 10 years ago

ember-cli-echonest v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

Ember-cli-echonest Circle CI

The aim of this project is to provide everything required to build an application on top of 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.

Models

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.

echonest-artist

Ember Data convenience for Echonest Artists. For more information visit The Echonest Artist API docs

Find an echonest-artist by id

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
  });

Find an echonest-artist by query

This is 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
});

Find similar echoest-artists

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
  });

Songs

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
});

To Do

  • 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

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.