Skip to content

Instantly share code, notes, and snippets.

@daniel-nelson
Created December 9, 2011 23:48
Show Gist options
  • Select an option

  • Save daniel-nelson/1453873 to your computer and use it in GitHub Desktop.

Select an option

Save daniel-nelson/1453873 to your computer and use it in GitHub Desktop.
(function() {
window.angular.module.ResourcesModule = [
'$provide', '$resource', function($provide, $resource) {
$provide.value('DailyCount', $resource('/analytics/pop_totals/:pop_id?tz_offset=:tz_offset&start_date=:start_date&end_date=:end_date', {}, {
'get': {
method: 'GET',
isArray: false
}
}));
$provide.value('OpenEvents', $resource('/analytics/pops/:pop_id?tz_offset=:tz_offset&event=open&start_date=:start_date&end_date=:end_date', {}, {
'index': {
method: 'GET',
isArray: true
}
}));
return $provide.value('SessionEvents', $resource('/analytics/pops/:pop_id?session_id=:session_id', {}, {
'index': {
method: 'GET',
isArray: true
}
}));
}
];
window.angular.injector('ResourcesModule');
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment