'use strict';

var MusicServices = angular.module('MusicServices', ['ngResource']);

/**
 * Handle the music stored on the server
 */
MusicServices.factory('Api', ['$resource',
    function($resource) {
        return {
            Music: $resource('api/music/:musicId.json', {}, {
                query: {method: 'GET', params: {musicId: 'music'}, isArray: true} //Return all music
            }),

            Labels: $resource('api/labels/:labelId.json',{},{
                query: {method:'GET',params:{labelId:'labels'},isArray:true} //Return all labels
            })
        };
    }]);

'use strict';

var MusicServices = angular.module('MusicServices', ['ngResource']);

/**
 * Handle the resources on the server
 */
MusicServices.factory('Api', ['$resource',
    function($resource) {
        return {
            Music: $resource('api/music/:musicId.json', {}, {
                query: {method: 'GET', params: {musicId: 'music'}, isArray: true} //Return all music
            }),

            Labels: $resource('api/labels/:labelId.json',{},{
                query: {method:'GET',params:{labelId:'labels'},isArray:true} //Return all labels
            }),

            Features: $resource('api/features/:featureId.json',{},{
                query: {method:'GET',params:{featureId:'features'},isArray:true} //Return all features
            })
        };
    }]);

Support for retrieving perceptual features
Support for retrieving perceptual features
