elwayman02/ember-data-echonest

View on GitHub
addon/adapters/echonest-artist.js

Summary

Maintainability
A
0 mins
Test Coverage
import EchonestAdapter from './echonest';

export default EchonestAdapter.extend({
    pathForType() {
        return 'artist';
    },

    buildURL() {
        let url = this._super.apply(this, arguments);

        // If the `genre` method is passed, refactor the url to point to the correct API
        return url.replace('artist/genre', 'genre/artists');
    }
});