Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JQuery web service
[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
You can’t perform that action at this time.