angular.module('app.services', [])
.factory('Api', ['$http', 'Constants', function($http, Constants){
return {
hit: function( uuid, success, error ){
success = success || function(){}
error = error || function(){}
var uri = Constants.endpoint+'/hit/';
$http.get(uri, { params: { uuid: uuid } })
.success(success)
.error(error);
},
};
}])
.service('Constants', function(){
return {
endpoint: 'http://example.org/api',
}
})