Beispiel #1
0
        public Article GetArticleById(String id)
        {
            Article article = new Article();

            if (id.Length > 6)
            {
                IStoryRepository blogRepo = new BloggerRepository(System.Configuration.ConfigurationManager.AppSettings["blogger_access_token"]);
                article = blogRepo.GetArticleById(id);
            }
            else
            {
                IStoryRepository newsRepo = new NewsRepository();
                article = newsRepo.GetArticleById(id);
            }

            Context.Response.AddHeader("Access-Control-Allow-Origin", "*");
            Context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type");
            return(article);
        }