(function() { "use strict"; angular.module("raz") .service("correlationApiService", ["createApi", function (createApi) { var api = createApi("/api/correlations"); function getResourceDrawerDetail(materialTypeId, materialId) { return api.get('/material/material_type/' + materialTypeId + '/material/' + materialId); } function getTierResources(tierId) { return api.get('/resources/tier/' + tierId); } function getCurTiers(grade) { return api.get('/tiers/correlation/1/grade/' + grade); } //TODO when more correlations are added, 1 will be replaced with correlationTypeId return { getResourceDrawerDetail: getResourceDrawerDetail, getTierResources: getTierResources, getCurTiers: getCurTiers, }; }]); })();