/// <summary> /// metaWeblog.getCategories /// </summary> /// <param name="blogID">always 1000 in BlogEngine since it is a singlar blog instance</param> /// <param name="userName">login username</param> /// <param name="password">login password</param> /// <param name="rootUrl">The root URL.</param> /// <returns>array of category structs</returns> internal List <MWACategory> GetCategories(string blogID, string userName, string password, string rootUrl) { ValidateRequest(userName, password); List <MWACategory> categories = new List <MWACategory>(); foreach (CategoryInfo cat in CategoryManager.GetCategoryList()) { MWACategory temp = new MWACategory(); temp.title = StringHelper.HtmlDecode(cat.Name); temp.description = StringHelper.HtmlDecode(cat.Description); temp.htmlUrl = cat.Url; temp.rssUrl = cat.FeedUrl; categories.Add(temp); } return(categories); }
/// <summary> /// metaWeblog.getCategories /// </summary> /// <param name="blogID">always 1000 in BlogEngine since it is a singlar blog instance</param> /// <param name="userName">login username</param> /// <param name="password">login password</param> /// <param name="rootUrl">The root URL.</param> /// <returns>array of category structs</returns> internal List <MWACategory> GetCategories(string blogID, string userName, string password, string rootUrl) { ValidateRequest(userName, password); List <MWACategory> categories = new List <MWACategory>(); foreach (CategoryInfo cat in new CategoryService().GetCategoryList()) { MWACategory temp = new MWACategory(); temp.title = Jqpress.Framework.Web.HttpHelper.HtmlDecode(cat.CateName); temp.description = Jqpress.Framework.Web.HttpHelper.HtmlDecode(cat.Description); temp.htmlUrl = cat.Url; temp.rssUrl = cat.FeedUrl; categories.Add(temp); } return(categories); }