{"size": 520, "ext": "js", "max_stars_repo_path": "js/StoryFactory.js", "max_stars_repo_name": "hpp3/OEC2016", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/StoryFactory.js", "max_issues_repo_name": "hpp3/OEC2016", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/StoryFactory.js", "max_forks_repo_name": "hpp3/OEC2016", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.6363636364, "max_line_length": 63, "alphanum_fraction": 0.5903846154}
app.factory('StoryFactory', function($http) {

    function getStories(successCallback, errorCallback) {
        $http({
          method: 'GET',
          url: '/stories'
        }).then(successCallback, errorCallback);
    }

    function getCodeTemplates(successCallback, errorCallback) {
        $http({
          method: 'GET',
          url: '/code_templates'
        }).then(successCallback, errorCallback);
    }

    return {
        getStories: getStories,
        getCodeTemplates: getCodeTemplates
    }

});