Last active
December 12, 2015 10:19
-
-
Save yetanotherchris/4757954 to your computer and use it in GitHub Desktop.
JQuery web service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[WebService(Namespace = "http://tempuri.org/")] | |
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] | |
[System.ComponentModel.ToolboxItem(false)] | |
public class GetFeeds : System.Web.Services.WebService | |
{ | |
[WebMethod] | |
public FeedItemSummary[] FilterFeeds(string arg1,string arg2) | |
{ | |
// Load a list of feeds based on the arguments | |
... | |
// Turn into HTML friendly format | |
List<FeedItemSummary> summaryList = new List<FeedItemSummary>(); | |
foreach (FeedItem item in list) | |
{ | |
FeedItemSummary summary = new FeedItemSummary(); | |
summary.Title = item.Title; | |
summary.PublishDate = item.PublishDate.ToString("dddd dd MMM yyyy"); | |
summary.Content = item.Html; | |
summary.Hash = item.Hash; | |
summary.FeedImage = item.ImageTag; | |
summary.Url = item.Url; | |
summary.TldName = "etc..."; | |
summaryList.Add(summary); | |
} | |
return summaryList.ToArray(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment