insight-ui-excc
Version:
An open-source frontend for the Insight API compatible with Exchangecoin. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the Exchangecoin network and build your own services with it.
28 lines (26 loc) • 604 B
JavaScript
;
angular.module('insight.charts')
.factory('Chart',
function($resource) {
return $resource(window.apiPrefix + '/chart/:chartType', {
chartType: '@chartType'
}, {
get: {
method: 'GET',
interceptor: {
response: function (res) {
return res.data;
},
responseError: function (res) {
if (res.status === 404) {
return res;
}
}
}
}
});
})
.factory('Charts',
function($resource) {
return $resource(window.apiPrefix + '/charts');
});