(function() {
'use strict';
app.factory('articles.repository', ['webApi', '$http', function(webApi, $http) {
	return {
		getArticles: _getArticles,
		getArticleById: _getArticleById
	};
	
	function _getArticles () {
		return $http.get(webApi.DOMAIN + '/api/v1/articles');
	}
	
	function _getArticleById(articleId) {
		return $http.get(webApi.DOMAIN + '/api/v1/articles/' + articleId);
	}
}]);
})();