diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..05e32f7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,82 @@
+###################
+# compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.pdb
+*.dll.config
+*.cache
+*.suo
+# Include dlls if they’re in the NuGet packages directory
+!/packages/*/lib/*.dll
+!/packages/*/lib/*/*.dll
+# Include dlls if they're in the CommonReferences directory
+!*CommonReferences/*.dll
+####################
+# VS Upgrade stuff #
+####################
+UpgradeLog.XML
+_UpgradeReport_Files/
+###############
+# Directories #
+###############
+bin/
+obj/
+TestResults/
+###################
+# Web publish log #
+###################
+*.Publish.xml
+#############
+# Resharper #
+#############
+/_ReSharper.*
+*.ReSharper.*
+############
+# Packages #
+############
+# it’s better to unpack these files and commit the raw source
+# git has its own built in compression methods
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.zip
+######################
+# Logs and databases #
+######################
+*.log
+*.sqlite
+# OS generated files #
+######################
+.DS_Store?
+ehthumbs.db
+Icon?
+Thumbs.db
+[Bb]in
+[Oo]bj
+[Tt]est[Rr]esults
+*.suo
+*.user
+*.[Cc]ache
+*[Rr]esharper*
+packages
+NuGet.exe
+_[Ss]cripts
+*.exe
+*.dll
+*.nupkg
+*.ncrunchsolution
+*.dot[Cc]over
+.vs/
+node_modules/
+*.lock
+*.DS_Store
+.idea/
+.vscode/
+*.xlsx
\ No newline at end of file
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Class1.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Class1.cs
new file mode 100644
index 0000000..f57cc89
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Class1.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace MinutoSeguros.FeedReader.Domain
+{
+ public class Class1
+ {
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Configuration/FeedConfiguration.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Configuration/FeedConfiguration.cs
new file mode 100644
index 0000000..d8838b4
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Configuration/FeedConfiguration.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MinutoSeguros.FeedReader.Domain.Configuration
+{
+ public class FeedConfiguration
+ {
+ public string Url { get; set; }
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/MainWord.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/MainWord.cs
new file mode 100644
index 0000000..74cf938
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/MainWord.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MinutoSeguros.FeedReader.Domain.DTO
+{
+ public class MainWord
+ {
+ public MainWord()
+ {
+
+ }
+
+ public MainWord(string word, int total)
+ {
+ Word = word;
+ Total = total;
+ }
+ public string Word { get; private set; }
+ public int Total { get; private set; }
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/OriginalFeed/rss.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/OriginalFeed/rss.cs
new file mode 100644
index 0000000..a972bf4
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/OriginalFeed/rss.cs
@@ -0,0 +1,485 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MinutoSeguros.FeedReader.Domain.DTO.OriginalFeed
+{
+ // NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
+ ///
+ [System.SerializableAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
+ [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
+ public partial class rss
+ {
+
+ private rssChannel channelField;
+
+ private decimal versionField;
+
+ ///
+ public rssChannel channel
+ {
+ get
+ {
+ return this.channelField;
+ }
+ set
+ {
+ this.channelField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public decimal version
+ {
+ get
+ {
+ return this.versionField;
+ }
+ set
+ {
+ this.versionField = value;
+ }
+ }
+ }
+
+ ///
+ [System.SerializableAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
+ public partial class rssChannel
+ {
+
+ private string titleField;
+
+ private link linkField;
+
+ private string link1Field;
+
+ private string descriptionField;
+
+ private string lastBuildDateField;
+
+ private string languageField;
+
+ private string updatePeriodField;
+
+ private byte updateFrequencyField;
+
+ private string generatorField;
+
+ private rssChannelItem[] itemField;
+
+ ///
+ public string title
+ {
+ get
+ {
+ return this.titleField;
+ }
+ set
+ {
+ this.titleField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://www.w3.org/2005/Atom")]
+ public link link
+ {
+ get
+ {
+ return this.linkField;
+ }
+ set
+ {
+ this.linkField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("link")]
+ public string link1
+ {
+ get
+ {
+ return this.link1Field;
+ }
+ set
+ {
+ this.link1Field = value;
+ }
+ }
+
+ ///
+ public string description
+ {
+ get
+ {
+ return this.descriptionField;
+ }
+ set
+ {
+ this.descriptionField = value;
+ }
+ }
+
+ ///
+ public string lastBuildDate
+ {
+ get
+ {
+ return this.lastBuildDateField;
+ }
+ set
+ {
+ this.lastBuildDateField = value;
+ }
+ }
+
+ ///
+ public string language
+ {
+ get
+ {
+ return this.languageField;
+ }
+ set
+ {
+ this.languageField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://purl.org/rss/1.0/modules/syndication/")]
+ public string updatePeriod
+ {
+ get
+ {
+ return this.updatePeriodField;
+ }
+ set
+ {
+ this.updatePeriodField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://purl.org/rss/1.0/modules/syndication/")]
+ public byte updateFrequency
+ {
+ get
+ {
+ return this.updateFrequencyField;
+ }
+ set
+ {
+ this.updateFrequencyField = value;
+ }
+ }
+
+ ///
+ public string generator
+ {
+ get
+ {
+ return this.generatorField;
+ }
+ set
+ {
+ this.generatorField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("item")]
+ public rssChannelItem[] item
+ {
+ get
+ {
+ return this.itemField;
+ }
+ set
+ {
+ this.itemField = value;
+ }
+ }
+ }
+
+ ///
+ [System.SerializableAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://www.w3.org/2005/Atom")]
+ [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://www.w3.org/2005/Atom", IsNullable = false)]
+ public partial class link
+ {
+
+ private string hrefField;
+
+ private string relField;
+
+ private string typeField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string href
+ {
+ get
+ {
+ return this.hrefField;
+ }
+ set
+ {
+ this.hrefField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string rel
+ {
+ get
+ {
+ return this.relField;
+ }
+ set
+ {
+ this.relField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string type
+ {
+ get
+ {
+ return this.typeField;
+ }
+ set
+ {
+ this.typeField = value;
+ }
+ }
+ }
+
+ ///
+ [System.SerializableAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
+ public partial class rssChannelItem
+ {
+
+ private string titleField;
+
+ private string linkField;
+
+ private string commentsField;
+
+ private string pubDateField;
+
+ private string creatorField;
+
+ private string[] categoryField;
+
+ private rssChannelItemGuid guidField;
+
+ private string descriptionField;
+
+ private string encodedField;
+
+ private string commentRssField;
+
+ private byte comments1Field;
+
+ ///
+ public string title
+ {
+ get
+ {
+ return this.titleField;
+ }
+ set
+ {
+ this.titleField = value;
+ }
+ }
+
+ ///
+ public string link
+ {
+ get
+ {
+ return this.linkField;
+ }
+ set
+ {
+ this.linkField = value;
+ }
+ }
+
+ ///
+ public string comments
+ {
+ get
+ {
+ return this.commentsField;
+ }
+ set
+ {
+ this.commentsField = value;
+ }
+ }
+
+ ///
+ public string pubDate
+ {
+ get
+ {
+ return this.pubDateField;
+ }
+ set
+ {
+ this.pubDateField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://purl.org/dc/elements/1.1/")]
+ public string creator
+ {
+ get
+ {
+ return this.creatorField;
+ }
+ set
+ {
+ this.creatorField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("category")]
+ public string[] category
+ {
+ get
+ {
+ return this.categoryField;
+ }
+ set
+ {
+ this.categoryField = value;
+ }
+ }
+
+ ///
+ public rssChannelItemGuid guid
+ {
+ get
+ {
+ return this.guidField;
+ }
+ set
+ {
+ this.guidField = value;
+ }
+ }
+
+ ///
+ public string description
+ {
+ get
+ {
+ return this.descriptionField;
+ }
+ set
+ {
+ this.descriptionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://purl.org/rss/1.0/modules/content/")]
+ public string encoded
+ {
+ get
+ {
+ return this.encodedField;
+ }
+ set
+ {
+ this.encodedField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://wellformedweb.org/CommentAPI/")]
+ public string commentRss
+ {
+ get
+ {
+ return this.commentRssField;
+ }
+ set
+ {
+ this.commentRssField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("comments", Namespace = "http://purl.org/rss/1.0/modules/slash/")]
+ public byte comments1
+ {
+ get
+ {
+ return this.comments1Field;
+ }
+ set
+ {
+ this.comments1Field = value;
+ }
+ }
+ }
+
+ ///
+ [System.SerializableAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
+ public partial class rssChannelItemGuid
+ {
+
+ private bool isPermaLinkField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool isPermaLink
+ {
+ get
+ {
+ return this.isPermaLinkField;
+ }
+ set
+ {
+ this.isPermaLinkField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value
+ {
+ get
+ {
+ return this.valueField;
+ }
+ set
+ {
+ this.valueField = value;
+ }
+ }
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/Topic.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/Topic.cs
new file mode 100644
index 0000000..59520d1
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DTO/Topic.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace MinutoSeguros.FeedReader.Domain.DTO
+{
+ public class Topic
+ {
+ #region Constructor
+ public Topic()
+ {
+
+ }
+
+ public Topic(string title, int totalWords, List mainWords)
+ {
+ int totalWordsToTake = mainWords.Count < 10 ? mainWords.Count : 10;
+
+ Title = title;
+ TotalWords = totalWords;
+ MainWords = mainWords.OrderByDescending(x => x.Total).ThenBy(y => y.Word).Take(totalWordsToTake).ToList();
+ }
+ #endregion
+ public string Title { get; private set; }
+ public int TotalWords { get; private set; }
+ public List MainWords { get; private set; }
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DomainServices/FeedService.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DomainServices/FeedService.cs
new file mode 100644
index 0000000..77b3685
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/DomainServices/FeedService.cs
@@ -0,0 +1,111 @@
+using Microsoft.Extensions.Options;
+using MinutoSeguros.FeedReader.Domain.Configuration;
+using MinutoSeguros.FeedReader.Domain.DTO;
+using MinutoSeguros.FeedReader.Domain.DTO.OriginalFeed;
+using MinutoSeguros.FeedReader.Domain.Helper;
+using MinutoSeguros.FeedReader.Domain.Interfaces;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Text.RegularExpressions;
+
+namespace MinutoSeguros.FeedReader.Domain.DomainServices
+{
+ public class FeedService : IFeedService
+ {
+ protected readonly FeedConfiguration _feedConfiguration;
+ public FeedService(IOptions feedConfiguration)
+ {
+ _feedConfiguration = feedConfiguration.Value;
+ }
+
+ public List GetFeeds()
+ {
+ var originalFeed = GetOriginalFeed();
+
+ string[] preprositions = TextHelper.prepositions;
+ string[] articles = TextHelper.articles;
+
+ List topics = new List();
+
+ foreach (var item in originalFeed.channel.item)
+ {
+ string cleanText = ClearText(item.description);
+
+ List splitWords = cleanText.Split(" ").ToList();
+
+ List wordsWithoutPreprositions = RemovePrepositionsAndArticles(preprositions, articles, splitWords);
+
+ List mainWords = GroupAndTakeMainWords(wordsWithoutPreprositions);
+
+ topics.Add(new Topic(item.title, wordsWithoutPreprositions.Count(), mainWords));
+ }
+
+ return topics;
+ }
+
+ #region Private Methods
+ private rss GetOriginalFeed()
+ {
+ string xmlString = "";
+
+ try
+ {
+ using (WebClient client = new WebClient())
+ {
+ xmlString = client.DownloadString(_feedConfiguration.Url);
+ }
+
+ rss originalFeed = new Serializer().Deserialize(xmlString, "rss");
+
+ return originalFeed;
+ }
+ catch(Exception ex)
+ {
+ throw new Exception("Não foi possível obter o feed", ex.InnerException);
+ }
+ }
+
+ private string ClearText(string text)
+ {
+ string cleanText = Regex.Replace(text, @"<[^>]*>", "");
+
+ cleanText = cleanText.ToLower();
+
+ cleanText = cleanText.Replace(".", "").Replace(",", "").Replace("?", "").Replace("!", "").Replace("/", "").Replace("\\", "");
+
+ return cleanText;
+ }
+
+ private List RemovePrepositionsAndArticles(string[] preprositions, string[] articles, List words)
+ {
+ List wordsWithoutPreprositions = new List();
+ foreach (var word in words)
+ {
+ if (!preprositions.Contains(word) && !articles.Contains(word))
+ wordsWithoutPreprositions.Add(word);
+ }
+
+ return wordsWithoutPreprositions;
+ }
+
+ private List GroupAndTakeMainWords(List words)
+ {
+ List mainWords = new List();
+
+ var groupedWords = words
+ .GroupBy(w => w)
+ .OrderBy(y => y.Key.Count());
+
+ foreach (var word in groupedWords)
+ {
+ mainWords.Add(new MainWord(word.Key, word.Count()));
+ }
+
+ return mainWords;
+ }
+
+ #endregion
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Helper/Serializer.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Helper/Serializer.cs
new file mode 100644
index 0000000..e02b125
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Helper/Serializer.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace MinutoSeguros.FeedReader.Domain.Helper
+{
+ public class Serializer
+ {
+ public T Deserialize(string input, string xmlRootAttribute) where T : class
+ {
+ XmlSerializer serializer = new XmlSerializer(typeof(T), new XmlRootAttribute(xmlRootAttribute));
+
+ using (StringReader sr = new StringReader(input))
+ {
+ return (T)serializer.Deserialize(sr);
+ }
+ }
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Helper/TextHelper.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Helper/TextHelper.cs
new file mode 100644
index 0000000..1be40f2
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Helper/TextHelper.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MinutoSeguros.FeedReader.Domain.Helper
+{
+ public class TextHelper
+ {
+ public static string[] prepositions =
+ {
+ "a", "ante", "após", "até", "com", "contra", "de", "desde", "em", "entre", "para",
+ "por", "perante", "sem", "sob", "sobre", "trás", "afora", "como", "conforme", "consoante",
+ "durante", "exceto", "feito", "fora", "mediante", "menos", "salvo", "segundo", "senão",
+ "tirante", "visto"
+ };
+
+ public static string[] articles =
+ {
+ "o", "os", "a", "as", "um", "uns", "uma", "umas", "ao", "aos", "à", "às", "do", "dos",
+ "dum", "duns", "duma", "dumas", "no", "nos", "na", "nas", "num", "nuns", "numa", "numas",
+ "pelo", "pelos", "pela", "pelas"
+ };
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Interfaces/IFeedService.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Interfaces/IFeedService.cs
new file mode 100644
index 0000000..8c52bc5
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/Interfaces/IFeedService.cs
@@ -0,0 +1,12 @@
+using MinutoSeguros.FeedReader.Domain.DTO;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MinutoSeguros.FeedReader.Domain.Interfaces
+{
+ public interface IFeedService
+ {
+ List GetFeeds();
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/MinutoSeguros.FeedReader.Domain.csproj b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/MinutoSeguros.FeedReader.Domain.csproj
new file mode 100644
index 0000000..fd828ef
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.Domain/MinutoSeguros.FeedReader.Domain.csproj
@@ -0,0 +1,12 @@
+
+
+
+ netcoreapp2.1
+
+
+
+
+
+
+
+
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.sln b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.sln
new file mode 100644
index 0000000..35babbd
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.705
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinutoSeguros.FeedReader.API", "MinutoSeguros.FeedReader\MinutoSeguros.FeedReader.API.csproj", "{A6574572-4995-46F1-9828-499F9296E59E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinutoSeguros.FeedReader.Domain", "MinutoSeguros.FeedReader.Domain\MinutoSeguros.FeedReader.Domain.csproj", "{C0F32D0E-5CED-4FA8-A379-D44026007DB7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A6574572-4995-46F1-9828-499F9296E59E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A6574572-4995-46F1-9828-499F9296E59E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A6574572-4995-46F1-9828-499F9296E59E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A6574572-4995-46F1-9828-499F9296E59E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C0F32D0E-5CED-4FA8-A379-D44026007DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C0F32D0E-5CED-4FA8-A379-D44026007DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C0F32D0E-5CED-4FA8-A379-D44026007DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C0F32D0E-5CED-4FA8-A379-D44026007DB7}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {1BFEBAB5-4619-48CF-B4FE-60684E18F556}
+ EndGlobalSection
+EndGlobal
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Controllers/FeedController.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Controllers/FeedController.cs
new file mode 100644
index 0000000..050cd71
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Controllers/FeedController.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using MinutoSeguros.FeedReader.Domain.Interfaces;
+
+namespace MinutoSeguros.FeedReader.API.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class FeedController : ControllerBase
+ {
+ protected readonly IFeedService _feedService;
+ public FeedController(IFeedService feedService)
+ {
+ _feedService = feedService;
+ }
+
+ [HttpGet]
+ public IActionResult Get()
+ {
+ return Ok(_feedService.GetFeeds());
+ }
+ }
+}
\ No newline at end of file
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.API.csproj b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.API.csproj
new file mode 100644
index 0000000..2c47951
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader.API.csproj
@@ -0,0 +1,24 @@
+
+
+
+ netcoreapp2.1
+ true
+ $(NoWarn);1591
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Program.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Program.cs
new file mode 100644
index 0000000..f095e92
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Program.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Logging;
+
+namespace MinutoSeguros.FeedReader
+{
+ #pragma warning disable CS1591
+ public class Program
+ {
+ public static void Main(string[] args) =>
+ BuildWebHost(args).Run();
+
+ public static IWebHost BuildWebHost(string[] args) =>
+ WebHost.CreateDefaultBuilder(args)
+ .UseStartup()
+ .Build();
+ }
+ #pragma warning restore CS1591
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Properties/launchSettings.json b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Properties/launchSettings.json
new file mode 100644
index 0000000..ef6999b
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Properties/launchSettings.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:60753",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "api/values",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "MinutoSeguros.FeedReader": {
+ "commandName": "Project",
+ "launchBrowser": false,
+ "launchUrl": "api/values",
+ "applicationUrl": "http://localhost:5000",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Startup.cs b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Startup.cs
new file mode 100644
index 0000000..4bb102f
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/Startup.cs
@@ -0,0 +1,77 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.OpenApi.Models;
+using MinutoSeguros.FeedReader.Domain.Configuration;
+using MinutoSeguros.FeedReader.Domain.DomainServices;
+using MinutoSeguros.FeedReader.Domain.Interfaces;
+using System;
+using System.IO;
+using System.Reflection;
+
+namespace MinutoSeguros.FeedReader
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
+
+ #region Swagger
+ services.AddSwaggerGen(c =>
+ {
+ c.SwaggerDoc("v1", new OpenApiInfo()
+ {
+ Title = "MinutoSeguros.FeedReader.API",
+ Version = "v1",
+ Contact = new OpenApiContact
+ {
+ Name = "Gilmar Oliveira",
+ Email = "giilmaroliveira@outlook.com"
+ }
+ });
+
+ // Set the comments path for the Swagger JSON and UI.
+ var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
+ var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
+ c.IncludeXmlComments(xmlPath);
+ });
+ #endregion
+
+ #region Services
+ services.AddSingleton();
+ #endregion
+
+ #region Configs
+ services.Configure(Configuration.GetSection("Feed"));
+ #endregion
+ }
+
+ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
+ {
+ app.UseSwagger();
+
+ app.UseSwaggerUI(c =>
+ {
+ c.SwaggerEndpoint("/swagger/v1/swagger.json", "MinutoSeguros.FeedReader.API V1");
+ c.RoutePrefix = "swagger";
+ });
+
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+
+ app.UseMvc();
+ }
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/appsettings.Development.json b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/appsettings.Development.json
new file mode 100644
index 0000000..e203e94
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Debug",
+ "System": "Information",
+ "Microsoft": "Information"
+ }
+ }
+}
diff --git a/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/appsettings.json b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/appsettings.json
new file mode 100644
index 0000000..39642ff
--- /dev/null
+++ b/MinutoSeguros.FeedReader/MinutoSeguros.FeedReader/appsettings.json
@@ -0,0 +1,11 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Warning"
+ }
+ },
+ "AllowedHosts": "*",
+ "Feed": {
+ "url": "https://www.minutoseguros.com.br/blog/feed/"
+ }
+}