<commit_before>(function(){

	angular.module('ngpress.apis.posts').provider('PostsApi', PostsApi);

	function PostsApi(){
		var configure = {
			wordpressBaseUrl: null,
			setWordpressBaseUrl: setWordpressBaseUrl,
		}

        var provider = {
            $get: PostsApi,
            configure: configure
        };
        return provider;


        function setWordpressBaseUrl(wordpressBaseUrl){
            configure.wordpressBaseUrl = wordpressBaseUrl;
        }

        PostsApi.$inject = ['AjaxModel'];

        function PostsApi(AjaxModel){
            var sampleUrl = configure.wordpressBaseUrl + "/posts/";
        	var restApi = {
        		getAllPosts: getAllPosts,
                getPostBySlug: getPostBySlug
        	}

        	function getAllPosts(){
                var params = {
                    number: 10,
                    context: 'embed'
                };
                return AjaxModel.get(sampleUrl, params);
            }

            function getPostBySlug(postSlug){
                var params = {
                    slug: postSlug,
                };

                // var url = sampleUrl + '/slug:<post-slug>';
                // url = url.replace('<post-slug>', slug);
        		return AjaxModel.get(sampleUrl, params);
            }

        	return restApi;
        }
	}

})();<commit_msg>[#3] - Voltando a aparecer o detalhe de post<commit_after>(function(){

	angular.module('ngpress.apis.posts').provider('PostsApi', PostsApi);

	function PostsApi(){
		var configure = {
			wordpressBaseUrl: null,
			setWordpressBaseUrl: setWordpressBaseUrl,
		}

        var provider = {
            $get: PostsApi,
            configure: configure
        };
        return provider;


        function setWordpressBaseUrl(wordpressBaseUrl){
            configure.wordpressBaseUrl = wordpressBaseUrl;
        }

        PostsApi.$inject = ['AjaxModel'];

        function PostsApi(AjaxModel){
            var sampleUrl = configure.wordpressBaseUrl + "/posts/";
        	var restApi = {
        		getAllPosts: getAllPosts,
                getPostBySlug: getPostBySlug
        	}

        	function getAllPosts(){
                var params = {
                    number: 10,
                    context: 'embed'
                };
                return AjaxModel.get(sampleUrl, params);
            }

            function getPostBySlug(postSlug){
                var params = {
                    slug: postSlug,
                };

                var url = sampleUrl + 'slug:<post-slug>';
                url = url.replace('<post-slug>', postSlug);
                console.log(url);
        		return AjaxModel.get(url);
            }

        	return restApi;
        }
	}

})();
{'fraction_non_alphanumeric': 0.10220588235294117, 'fraction_numerical': 0.001838235294117647, 'mean_word_length': 1.5147874306839186, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4253615', 'n_tokens_mistral': 800, 'n_tokens_neox': 715, 'n_words': 139}